No effective change - tidy FactoryProperty

This commit is contained in:
rbygrave
2021-07-29 13:30:15 +12:00
parent 2bc5d3d325
commit 991c6d6b5c
2 changed files with 3 additions and 7 deletions
@@ -31,8 +31,7 @@ class BindablePropertyJsonUpdate extends BindableProperty {
final MutableValueInfo hash = prop.createMutableInfo(json);
bean._ebean_getIntercept().mutableInfo(propertyIndex, hash);
request.pushJson(json);
final Object value = prop.getValue(bean);
request.bind(value, prop);
request.bind(prop.getValue(bean), prop);
}
}
}
@@ -2,6 +2,7 @@ package io.ebeaninternal.server.persist.dmlbind;
import io.ebeaninternal.server.deploy.BeanProperty;
import io.ebeaninternal.server.deploy.BeanPropertyAssocOne;
import io.ebeaninternal.server.deploy.BeanPropertyJsonMapper;
import io.ebeaninternal.server.persist.dml.DmlMode;
/**
@@ -23,14 +24,12 @@ class FactoryProperty {
* Create a Bindable for the property given the mode and withLobs flag.
*/
public Bindable create(BeanProperty prop, DmlMode mode, boolean withLobs, boolean allowManyToOne) {
if (DmlMode.INSERT == mode && !prop.isDbInsertable()) {
return null;
}
if (DmlMode.UPDATE == mode && !prop.isDbUpdatable()) {
return null;
}
if (prop.isLob() && !withLobs) {
// Lob exclusion
return null;
@@ -38,12 +37,10 @@ class FactoryProperty {
if (prop.isDbEncrypted()){
return new BindableEncryptedProperty(prop, bindEncryptDataFirst);
}
if (allowManyToOne && prop instanceof BeanPropertyAssocOne) {
return new BindableAssocOne((BeanPropertyAssocOne<?>)prop);
}
if (prop.getScalarType().isJsonMapper()) {
if (prop instanceof BeanPropertyJsonMapper) {
if (DmlMode.INSERT == mode) {
return new BindablePropertyJsonInsert(prop);
} else if (DmlMode.UPDATE == mode) {