mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#616 - No effective change - rename methods
This commit is contained in:
@@ -67,10 +67,10 @@ public interface ExpressionPath {
|
||||
* Typically used to produce id = ? expression strings.
|
||||
* </p>
|
||||
*/
|
||||
String getAssocOneIdExpr(String propName, String bindOperator);
|
||||
String getAssocIdExpression(String propName, String bindOperator);
|
||||
|
||||
/**
|
||||
* Return the Id values for the given bean value.
|
||||
*/
|
||||
Object[] getAssocOneIdValues(EntityBean bean);
|
||||
Object[] getAssocIdValues(EntityBean bean);
|
||||
}
|
||||
|
||||
@@ -98,14 +98,14 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
/**
|
||||
* Returns null as not an AssocOne.
|
||||
*/
|
||||
public Object[] getAssocOneIdValues(EntityBean value) {
|
||||
public Object[] getAssocIdValues(EntityBean value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns null as not an AssocOne.
|
||||
*/
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -834,12 +834,12 @@ public class BeanProperty implements ElPropertyValue, Property {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Object[] getAssocOneIdValues(EntityBean bean) {
|
||||
public Object[] getAssocIdValues(EntityBean bean) {
|
||||
// Returns null as not an AssocOne.
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
// Returns null as not an AssocOne.
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -485,14 +485,14 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> {
|
||||
* Return the Id values from the given bean.
|
||||
*/
|
||||
@Override
|
||||
public Object[] getAssocOneIdValues(EntityBean bean) {
|
||||
public Object[] getAssocIdValues(EntityBean bean) {
|
||||
return targetDescriptor.getIdBinder().getIdValues(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Id expression to add to where clause etc.
|
||||
*/
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
return targetDescriptor.getIdBinder().getAssocOneIdExpr(prefix, operator);
|
||||
}
|
||||
|
||||
|
||||
@@ -415,14 +415,14 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
|
||||
* Return the Id values from the given bean.
|
||||
*/
|
||||
@Override
|
||||
public Object[] getAssocOneIdValues(EntityBean bean) {
|
||||
public Object[] getAssocIdValues(EntityBean bean) {
|
||||
return targetDescriptor.getIdBinder().getIdValues(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Id expression to add to where clause etc.
|
||||
*/
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
return targetDescriptor.getIdBinder().getAssocOneIdExpr(prefix, operator);
|
||||
}
|
||||
|
||||
|
||||
@@ -154,14 +154,14 @@ public class ElPropertyChain implements ElPropertyValue {
|
||||
return lastElPropertyValue.isLocalEncrypted();
|
||||
}
|
||||
|
||||
public Object[] getAssocOneIdValues(EntityBean bean) {
|
||||
public Object[] getAssocIdValues(EntityBean bean) {
|
||||
// Don't navigate the object graph as bean
|
||||
// is assumed to be the appropriate type
|
||||
return lastElPropertyValue.getAssocOneIdValues(bean);
|
||||
return lastElPropertyValue.getAssocIdValues(bean);
|
||||
}
|
||||
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
return lastElPropertyValue.getAssocOneIdExpr(expression, operator);
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
return lastElPropertyValue.getAssocIdExpression(expression, operator);
|
||||
}
|
||||
|
||||
public String getAssocIdInExpr(String prefix) {
|
||||
|
||||
@@ -46,7 +46,7 @@ class InExpression extends AbstractExpression {
|
||||
|
||||
} else {
|
||||
// extract the id values from the bean
|
||||
Object[] ids = prop.getAssocOneIdValues((EntityBean) values[i]);
|
||||
Object[] ids = prop.getAssocIdValues((EntityBean) values[i]);
|
||||
if (ids != null) {
|
||||
for (int j = 0; j < ids.length; j++) {
|
||||
request.addBindValue(ids[j]);
|
||||
|
||||
@@ -39,7 +39,7 @@ class NullExpression extends AbstractExpression {
|
||||
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isAssocId()) {
|
||||
request.append(prop.getAssocOneIdExpr(propertyName, nullExpr));
|
||||
request.append(prop.getAssocIdExpression(propertyName, nullExpr));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ public class SimpleExpression extends AbstractExpression {
|
||||
}
|
||||
ExpressionPath prop = context.getExpressionPath(propName);
|
||||
if (prop != null && prop.isAssocId()) {
|
||||
String idName = prop.getAssocOneIdExpr(propName, "");
|
||||
Object[] ids = prop.getAssocOneIdValues((EntityBean) value);
|
||||
String idName = prop.getAssocIdExpression(propName, "");
|
||||
Object[] ids = prop.getAssocIdValues((EntityBean) value);
|
||||
if (ids == null || ids.length != 1) {
|
||||
throw new IllegalArgumentException("Expecting 1 Id value for " + idName + " but got " + ids);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class SimpleExpression extends AbstractExpression {
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null) {
|
||||
if (prop.isAssocId()) {
|
||||
Object[] ids = prop.getAssocOneIdValues((EntityBean) value);
|
||||
Object[] ids = prop.getAssocIdValues((EntityBean) value);
|
||||
if (ids != null) {
|
||||
for (int i = 0; i < ids.length; i++) {
|
||||
request.addBindValue(ids[i]);
|
||||
@@ -84,7 +84,7 @@ public class SimpleExpression extends AbstractExpression {
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null) {
|
||||
if (prop.isAssocId()) {
|
||||
request.append(prop.getAssocOneIdExpr(propName, type.bind()));
|
||||
request.append(prop.getAssocIdExpression(propName, type.bind()));
|
||||
return;
|
||||
}
|
||||
if (prop.isDbEncrypted()) {
|
||||
|
||||
@@ -48,11 +48,11 @@ public class CtCompoundPropertyElAdapter implements ElPropertyValue {
|
||||
prop.setValue(bean, value);
|
||||
}
|
||||
|
||||
public String getAssocOneIdExpr(String prefix, String operator) {
|
||||
public String getAssocIdExpression(String prefix, String operator) {
|
||||
throw new RuntimeException("Not Supported or Expected");
|
||||
}
|
||||
|
||||
public Object[] getAssocOneIdValues(EntityBean bean) {
|
||||
public Object[] getAssocIdValues(EntityBean bean) {
|
||||
throw new RuntimeException("Not Supported or Expected");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user