mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - code cleanup of BindableProperty to remove unused parameter (property name)
This commit is contained in:
@@ -107,7 +107,7 @@ public class ImportedIdEmbedded implements ImportedId {
|
||||
if (embeddedId == null){
|
||||
for (int i = 0; i < imported.length; i++) {
|
||||
if (imported[i].owner.isUpdateable()) {
|
||||
request.bind(null, imported[i].foreignProperty, imported[i].localDbColumn);
|
||||
request.bind(null, imported[i].foreignProperty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class ImportedIdEmbedded implements ImportedId {
|
||||
for (int i = 0; i < imported.length; i++) {
|
||||
if (imported[i].owner.isUpdateable()) {
|
||||
Object scalarValue = imported[i].foreignProperty.getValue(embedded);
|
||||
request.bind(scalarValue, imported[i].foreignProperty, imported[i].localDbColumn);
|
||||
request.bind(scalarValue, imported[i].foreignProperty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ImportedIdMultiple implements ImportedId {
|
||||
for (int i = 0; i < imported.length; i++) {
|
||||
if (imported[i].owner.isUpdateable()) {
|
||||
Object scalarValue = imported[i].foreignProperty.getValue(bean);
|
||||
request.bind(scalarValue, imported[i].foreignProperty, imported[i].localDbColumn);
|
||||
request.bind(scalarValue, imported[i].foreignProperty);
|
||||
}
|
||||
}
|
||||
// hmmm, not worrying about this just yet
|
||||
|
||||
@@ -135,7 +135,7 @@ public final class ImportedIdSimple implements ImportedId, Comparable<ImportedId
|
||||
if (bean != null){
|
||||
value = getIdValue(bean);
|
||||
}
|
||||
request.bind(value, foreignProperty, localDbColumn);
|
||||
request.bind(value, foreignProperty);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,18 +176,18 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
|
||||
/**
|
||||
* Bind the value to the preparedStatement.
|
||||
*/
|
||||
public Object bind(Object value, BeanProperty prop, String propName) throws SQLException {
|
||||
return bindInternal(logLevelSql, value, prop, propName);
|
||||
public Object bind(Object value, BeanProperty prop) throws SQLException {
|
||||
return bindInternal(logLevelSql, value, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bind the value to the preparedStatement without logging.
|
||||
*/
|
||||
public Object bindNoLog(Object value, BeanProperty prop, String propName) throws SQLException {
|
||||
return bindInternal(false, value, prop, propName);
|
||||
public Object bindNoLog(Object value, BeanProperty prop) throws SQLException {
|
||||
return bindInternal(false, value, prop);
|
||||
}
|
||||
|
||||
private Object bindInternal(boolean log, Object value, BeanProperty prop, String propName) throws SQLException {
|
||||
private Object bindInternal(boolean log, Object value, BeanProperty prop) throws SQLException {
|
||||
|
||||
if (log) {
|
||||
if (prop.isLob()) {
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class BindableEncryptedProperty implements Bindable {
|
||||
// H2 encrypt function ... different parameter order
|
||||
request.bindNoLog(encryptKeyValue, Types.VARCHAR, prop.getName() + "=****");
|
||||
}
|
||||
request.bindNoLog(value, prop, prop.getName());
|
||||
request.bindNoLog(value, prop);
|
||||
|
||||
if (bindEncryptDataFirst){
|
||||
// MySql, Postgres, Oracle
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ public final class BindableIdEmbedded implements BindableId {
|
||||
for (int i = 0; i < props.length; i++) {
|
||||
|
||||
Object value = props[i].getValue(idValue);
|
||||
request.bind(value, props[i], props[i].getDbColumn());
|
||||
request.bind(value, props[i]);
|
||||
}
|
||||
|
||||
request.setIdValue(idValue);
|
||||
|
||||
@@ -64,7 +64,7 @@ public final class BindableIdMap implements BindableId {
|
||||
for (int i = 0; i < uids.length; i++) {
|
||||
Object value = uids[i].getValue(bean);
|
||||
|
||||
request.bind(value, uids[i], uids[i].getName());
|
||||
request.bind(value, uids[i]);
|
||||
|
||||
// putting logicalType into map rather than
|
||||
// the dbType (which may have been converted).
|
||||
|
||||
@@ -61,7 +61,7 @@ public final class BindableIdScalar implements BindableId {
|
||||
|
||||
Object value = uidProp.getValue(bean);
|
||||
|
||||
request.bind(value, uidProp, uidProp.getName());
|
||||
request.bind(value, uidProp);
|
||||
|
||||
// used for summary logging
|
||||
request.setIdValue(value);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class BindableProperty implements Bindable {
|
||||
if (bean != null) {
|
||||
value = prop.getValue(bean);
|
||||
}
|
||||
request.bind(value, prop, prop.getName());
|
||||
request.bind(value, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,6 +54,6 @@ public class BindableProperty implements Bindable {
|
||||
if (bean != null) {
|
||||
value = prop.getValueObject(bean);
|
||||
}
|
||||
request.bind(value, prop, prop.getName());
|
||||
request.bind(value, prop);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public class BindablePropertyInsertGenerated extends BindableProperty {
|
||||
//prop.setValueIntercept(bean, value);
|
||||
prop.setValue(bean, value);
|
||||
}
|
||||
request.bind(value, prop, prop.getName());
|
||||
request.bind(value, prop);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class BindablePropertyUpdateGenerated extends BindableProperty {
|
||||
Object value = gen.getUpdateValue(prop, bean);
|
||||
|
||||
// generated value should be the correct type
|
||||
request.bind(value, prop, prop.getName());
|
||||
request.bind(value, prop);
|
||||
|
||||
// only register the update value if it was included
|
||||
// in the bean in the first place
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface BindableRequest {
|
||||
* logicalType to dbType.
|
||||
* </p>
|
||||
*/
|
||||
public Object bind(Object value, BeanProperty prop, String propName) throws SQLException;
|
||||
public Object bind(Object value, BeanProperty prop) throws SQLException;
|
||||
|
||||
/**
|
||||
* Bind a raw value. Used to bind the discriminator column.
|
||||
@@ -42,7 +42,7 @@ public interface BindableRequest {
|
||||
/**
|
||||
* Bind the value to the preparedStatement without logging.
|
||||
*/
|
||||
public Object bindNoLog(Object value, BeanProperty prop, String propName) throws SQLException;
|
||||
public Object bindNoLog(Object value, BeanProperty prop) throws SQLException;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user