mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2359 - Rename internal methods - STreeProperty
This commit is contained in:
@@ -49,8 +49,8 @@ public final class ManyWhereJoins implements Serializable {
|
||||
*/
|
||||
public void add(ElPropertyDeploy elProp) {
|
||||
|
||||
String join = elProp.getElPrefix();
|
||||
BeanProperty p = elProp.getBeanProperty();
|
||||
String join = elProp.elPrefix();
|
||||
BeanProperty p = elProp.beanProperty();
|
||||
if (p instanceof BeanPropertyAssocMany<?>) {
|
||||
join = addManyToJoin(join, p.name());
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
* Return the Encrypt key given the BeanProperty.
|
||||
*/
|
||||
public EncryptKey getEncryptKey(BeanProperty p) {
|
||||
return owner.getEncryptKey(baseTable, p.getDbColumn());
|
||||
return owner.getEncryptKey(baseTable, p.dbColumn());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2805,14 +2805,14 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType, SpiBeanType {
|
||||
if (elProp == null) {
|
||||
throw new PersistenceException("Invalid path " + propertyPath + " from " + fullName());
|
||||
}
|
||||
return elProp.getBeanProperty().isEmbedded();
|
||||
return elProp.beanProperty().isEmbedded();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExtraJoin extraJoin(String propertyPath) {
|
||||
ElPropertyValue elGetValue = getElGetValue(propertyPath);
|
||||
if (elGetValue != null) {
|
||||
BeanProperty beanProperty = elGetValue.getBeanProperty();
|
||||
BeanProperty beanProperty = elGetValue.beanProperty();
|
||||
if (beanProperty instanceof BeanPropertyAssoc<?>) {
|
||||
BeanPropertyAssoc<?> assocProp = (BeanPropertyAssoc<?>) beanProperty;
|
||||
if (!assocProp.isEmbedded()) {
|
||||
|
||||
@@ -52,7 +52,7 @@ abstract class BeanDescriptorElement<T> extends BeanDescriptor<T> {
|
||||
if (props.length != 1) {
|
||||
throw new IllegalStateException("Expecting 1 property for element scalar but got " + Arrays.toString(props));
|
||||
}
|
||||
return props[0].getScalarType();
|
||||
return props[0].scalarType();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ class BeanDescriptorElementScalarMap<T> extends BeanDescriptorElement<T> {
|
||||
if (props.length != 2) {
|
||||
throw new IllegalStateException("Expecting 2 properties for key and value but got " + Arrays.toString(props));
|
||||
}
|
||||
this.scalarTypeKey = props[0].getScalarType();
|
||||
this.scalarTypeVal = props[1].getScalarType();
|
||||
this.scalarTypeKey = props[0].scalarType();
|
||||
this.scalarTypeVal = props[1].scalarType();
|
||||
this.stringKey = String.class.equals(scalarTypeKey.getType());
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ final class BeanEmbeddedMetaFactory {
|
||||
}
|
||||
|
||||
private static String dbColumn(String prefix, Column override, BeanProperty source) {
|
||||
String dbCol = (override != null && !override.name().isEmpty()) ? override.name() : source.getDbColumn();
|
||||
String dbCol = (override != null && !override.name().isEmpty()) ? override.name() : source.dbColumn();
|
||||
return prefix == null ? dbCol : prefix + dbCol;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchPreference() {
|
||||
public int fetchPreference() {
|
||||
// return some decently high value
|
||||
return 1000;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDbColumn() {
|
||||
public String dbColumn() {
|
||||
return dbColumn;
|
||||
}
|
||||
|
||||
@@ -171,12 +171,12 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPlaceholder(boolean encrypted) {
|
||||
public String elPlaceholder(boolean encrypted) {
|
||||
return placeHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPrefix() {
|
||||
public String elPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ public final class BeanFkeyProperty implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeanProperty getBeanProperty() {
|
||||
public BeanProperty beanProperty() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEncryptKeyAsString() {
|
||||
public String encryptKeyAsString() {
|
||||
return getEncryptKey().getStringValue();
|
||||
}
|
||||
|
||||
@@ -441,11 +441,11 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
* Return the SQL for the column including decryption function and column alias.
|
||||
*/
|
||||
private String getDecryptSqlWithColumnAlias(String tableAlias) {
|
||||
return dbEncryptFunction.getDecryptSql(tableAlias + "." + this.getDbColumn()) + ENC_PREFIX + tableAlias + "_" + this.getDbColumn();
|
||||
return dbEncryptFunction.getDecryptSql(tableAlias + "." + this.dbColumn()) + ENC_PREFIX + tableAlias + "_" + this.dbColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchPreference() {
|
||||
public int fetchPreference() {
|
||||
// return some decently high value - override on ToMany property
|
||||
return 1000;
|
||||
}
|
||||
@@ -567,7 +567,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeanProperty getBeanProperty() {
|
||||
public BeanProperty beanProperty() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -904,12 +904,12 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPlaceholder(boolean encrypted) {
|
||||
public String elPlaceholder(boolean encrypted) {
|
||||
return encrypted ? elPlaceHolderEncrypted : elPlaceHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPrefix() {
|
||||
public String elPrefix() {
|
||||
return elPrefix;
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
* Return the full name of this property.
|
||||
*/
|
||||
@Override
|
||||
public String getFullBeanName() {
|
||||
public String fullName() {
|
||||
return descriptor.fullName() + "." + name;
|
||||
}
|
||||
|
||||
@@ -934,7 +934,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings(value = "unchecked")
|
||||
public ScalarType<Object> getScalarType() {
|
||||
public ScalarType<Object> scalarType() {
|
||||
return scalarType;
|
||||
}
|
||||
|
||||
@@ -1117,7 +1117,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
* The database column name this is mapped to.
|
||||
*/
|
||||
@Override
|
||||
public String getDbColumn() {
|
||||
public String dbColumn() {
|
||||
return dbColumn;
|
||||
}
|
||||
|
||||
@@ -1411,7 +1411,7 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
|
||||
// change in behavior for #318
|
||||
objValue = null;
|
||||
String msg = "Error trying to use Jackson ObjectMapper to read transient property "
|
||||
+ getFullBeanName() + " - consider marking this property with @JsonIgnore";
|
||||
+ fullName() + " - consider marking this property with @JsonIgnore";
|
||||
logger.error(msg, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchPreference() {
|
||||
public int fetchPreference() {
|
||||
return fetchPreference;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
BeanProperty idProp = target.idProperty();
|
||||
BeanProperty[] others = target.propertiesBaseScalar();
|
||||
if (descriptor.isRawSqlBased()) {
|
||||
String dbColumn = owner.getDbColumn();
|
||||
String dbColumn = owner.dbColumn();
|
||||
return new ImportedIdSimple(owner, dbColumn, null, idProp, 0);
|
||||
}
|
||||
if (idProp == null) {
|
||||
@@ -466,16 +466,16 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
boolean insertable = col.isInsertable();
|
||||
boolean updateable = col.isUpdateable();
|
||||
for (int j = 0; j < props.length; j++) {
|
||||
if (props[j].getDbColumn().equalsIgnoreCase(matchColumn)) {
|
||||
if (props[j].dbColumn().equalsIgnoreCase(matchColumn)) {
|
||||
return new ImportedIdSimple(owner, localColumn, localSqlFormula, props[j], j, insertable, updateable);
|
||||
}
|
||||
}
|
||||
for (int j = 0; j < others.length; j++) {
|
||||
if (others[j].getDbColumn().equalsIgnoreCase(matchColumn)) {
|
||||
if (others[j].dbColumn().equalsIgnoreCase(matchColumn)) {
|
||||
return new ImportedIdSimple(owner, localColumn, localSqlFormula, others[j], j + props.length, insertable, updateable);
|
||||
}
|
||||
}
|
||||
String msg = "Error with the Join on [" + getFullBeanName()
|
||||
String msg = "Error with the Join on [" + fullName()
|
||||
+ "]. Could not find the local match for [" + matchColumn + "] "//in table["+searchTable+"]?"
|
||||
+ " Perhaps an error in a @JoinColumn";
|
||||
throw new PersistenceException(msg);
|
||||
@@ -566,7 +566,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
||||
}
|
||||
}
|
||||
|
||||
String msg = "Error with the Join on [" + getFullBeanName()
|
||||
String msg = "Error with the Join on [" + fullName()
|
||||
+ "]. Could not find the matching foreign key for [" + matchColumn + "] in table[" + searchTable + "]?"
|
||||
+ " Perhaps using a @JoinColumn with the name/referencedColumnName attributes swapped? "
|
||||
+ " or a @JoinColumn needs an explicit referencedColumnName specified?";
|
||||
|
||||
@@ -680,9 +680,9 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
||||
private ExportedProperty findMatch(boolean embedded, BeanProperty prop) {
|
||||
if (hasJoinTable()) {
|
||||
// look for column going to intersection
|
||||
return findMatch(embedded, prop, prop.getDbColumn(), intersectionJoin);
|
||||
return findMatch(embedded, prop, prop.dbColumn(), intersectionJoin);
|
||||
} else {
|
||||
return findMatch(embedded, prop, prop.getDbColumn(), tableJoin);
|
||||
return findMatch(embedded, prop, prop.dbColumn(), tableJoin);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ class BeanPropertyAssocManyJsonHelp {
|
||||
*/
|
||||
private void jsonReadTransientUsingObjectMapper(SpiJsonReader readJson, EntityBean parentBean) throws IOException {
|
||||
if (jsonTransient == null) {
|
||||
throw new IllegalStateException("Jackson ObjectMapper is required to read this Transient property " + many.getFullBeanName());
|
||||
throw new IllegalStateException("Jackson ObjectMapper is required to read this Transient property " + many.fullName());
|
||||
}
|
||||
jsonTransient.jsonReadUsingObjectMapper(many, readJson, parentBean);
|
||||
}
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@ class BeanPropertyAssocManySqlHelp<T> {
|
||||
|
||||
@Override
|
||||
public void visitEmbeddedScalar(BeanProperty p, BeanPropertyAssocOne<?> embedded) {
|
||||
sb.append(",").append(p.getDbColumn());
|
||||
sb.append(",").append(p.dbColumn());
|
||||
colCount++;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ class BeanPropertyAssocManySqlHelp<T> {
|
||||
|
||||
@Override
|
||||
public void visitScalar(BeanProperty p, boolean allowNonNull) {
|
||||
sb.append(",").append(p.getDbColumn());
|
||||
sb.append(",").append(p.dbColumn());
|
||||
colCount++;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,9 +129,9 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
// limit JoinColumn mapping to the @Id / primary key
|
||||
TableJoinColumn[] columns = tableJoin.columns();
|
||||
String foreignJoinColumn = columns[0].getForeignDbColumn();
|
||||
String foreignIdColumn = targetDescriptor.idProperty().getDbColumn();
|
||||
String foreignIdColumn = targetDescriptor.idProperty().dbColumn();
|
||||
if (!foreignJoinColumn.equalsIgnoreCase(foreignIdColumn)) {
|
||||
throw new PersistenceException("Mapping limitation - @JoinColumn on " + getFullBeanName() + " needs to map to a primary key as per Issue #529 "
|
||||
throw new PersistenceException("Mapping limitation - @JoinColumn on " + fullName() + " needs to map to a primary key as per Issue #529 "
|
||||
+ " - joining to " + foreignJoinColumn + " and not " + foreignIdColumn);
|
||||
}
|
||||
}
|
||||
@@ -218,7 +218,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
if (embedded) {
|
||||
BeanProperty embProp = embeddedPropsMap.get(remainder);
|
||||
if (embProp == null) {
|
||||
String msg = "Embedded Property " + remainder + " not found in " + getFullBeanName();
|
||||
String msg = "Embedded Property " + remainder + " not found in " + fullName();
|
||||
throw new PersistenceException(msg);
|
||||
}
|
||||
if (chain == null) {
|
||||
@@ -232,7 +232,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPlaceholder(boolean encrypted) {
|
||||
public String elPlaceholder(boolean encrypted) {
|
||||
return encrypted ? elPlaceHolderEncrypted : elPlaceHolder;
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
selectChain.add(discProperty);
|
||||
}
|
||||
if (targetIdBinder == null) {
|
||||
throw new IllegalStateException("No Id binding property for " + getFullBeanName()
|
||||
throw new IllegalStateException("No Id binding property for " + fullName()
|
||||
+ ". Probably a missing @OneToOne mapping annotation on this relationship?");
|
||||
}
|
||||
targetIdBinder.buildRawSqlSelectChain(prefix, selectChain);
|
||||
@@ -591,7 +591,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> implements STr
|
||||
* Find the matching foreignDbColumn for a given local property.
|
||||
*/
|
||||
private ExportedProperty findMatch(boolean embeddedProp, BeanProperty prop) {
|
||||
return findMatch(embeddedProp, prop, prop.getDbColumn(), tableJoin);
|
||||
return findMatch(embeddedProp, prop, prop.dbColumn(), tableJoin);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,7 +100,7 @@ public final class BeanTable {
|
||||
}
|
||||
|
||||
private void addToJoin(String foreignKeyPrefix, DeployTableJoin join, boolean reverse, String sqlFormulaSelect, boolean complexKey, BeanProperty prop) {
|
||||
String lc = prop.getDbColumn();
|
||||
String lc = prop.dbColumn();
|
||||
String fk = lc;
|
||||
if (foreignKeyPrefix != null) {
|
||||
fk = owner.getNamingConvention().getForeignKey(foreignKeyPrefix, fk);
|
||||
|
||||
@@ -63,8 +63,8 @@ public final class DeployPropertyParser extends DeployParser {
|
||||
if (catchFirst && firstProp == null) {
|
||||
firstProp = elProp;
|
||||
}
|
||||
addIncludes(elProp.getElPrefix());
|
||||
return elProp.getElPlaceholder(encrypted);
|
||||
addIncludes(elProp.elPrefix());
|
||||
return elProp.elPlaceholder(encrypted);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public final class DeployUpdateParser extends DeployParser {
|
||||
return beanDescriptor.baseTable();
|
||||
}
|
||||
ElPropertyDeploy elProp = beanDescriptor.getElPropertyDeploy(expression);
|
||||
return elProp != null ? elProp.getDbColumn() : null;
|
||||
return elProp != null ? elProp.dbColumn() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ abstract class DynamicPropertyBase implements STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFullBeanName() {
|
||||
public String fullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
@@ -49,12 +49,12 @@ abstract class DynamicPropertyBase implements STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPrefix() {
|
||||
public String elPrefix() {
|
||||
return elPrefix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScalarType<?> getScalarType() {
|
||||
public ScalarType<?> scalarType() {
|
||||
return scalarType;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ abstract class DynamicPropertyBase implements STreeProperty {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEncryptKeyAsString() {
|
||||
public String encryptKeyAsString() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ final class FormulaPropertyPath {
|
||||
throw new IllegalStateException("unable to determine scalarType of formula [" + formula + "] for type " + descriptor + " - maybe use a cast like ::String ?");
|
||||
}
|
||||
// determine scalarType based on first property found by parser
|
||||
final BeanProperty property = firstProp.getBeanProperty();
|
||||
final BeanProperty property = firstProp.beanProperty();
|
||||
if (!property.isAssocId()) {
|
||||
return create(property.getScalarType());
|
||||
return create(property.scalarType());
|
||||
} else {
|
||||
return createManyToOne(property);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
if (i > 0) {
|
||||
sb.append(" and ");
|
||||
}
|
||||
sb.append(idDesc.getBaseTableAlias()).append(".").append(props[i].getDbColumn()).append("=?");
|
||||
sb.append(idDesc.getBaseTableAlias()).append(".").append(props[i].dbColumn()).append("=?");
|
||||
}
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
@@ -123,7 +123,7 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
@Override
|
||||
public BeanProperty findBeanProperty(String dbColumnName) {
|
||||
for (BeanProperty prop : props) {
|
||||
if (dbColumnName.equalsIgnoreCase(prop.getDbColumn())) {
|
||||
if (dbColumnName.equalsIgnoreCase(prop.dbColumn())) {
|
||||
return prop;
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
if (i > 0) {
|
||||
sb.append(" and ");
|
||||
}
|
||||
sb.append(props[i].getDbColumn()).append("=?");
|
||||
sb.append(props[i].dbColumn()).append("=?");
|
||||
}
|
||||
sb.append(")");
|
||||
}
|
||||
@@ -392,7 +392,7 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
if (baseTableAlias != null) {
|
||||
sb.append(baseTableAlias).append(".");
|
||||
}
|
||||
sb.append(props[i].getDbColumn()).append("=?");
|
||||
sb.append(props[i].dbColumn()).append("=?");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -411,7 +411,7 @@ public final class IdBinderEmbedded implements IdBinder {
|
||||
if (baseTableAlias != null) {
|
||||
sb.append(baseTableAlias).append(".");
|
||||
}
|
||||
sb.append(props[i].getDbColumn());
|
||||
sb.append(props[i].dbColumn());
|
||||
}
|
||||
sb.append(")");
|
||||
return sb.toString();
|
||||
|
||||
@@ -34,9 +34,9 @@ public final class IdBinderSimple implements IdBinder {
|
||||
|
||||
public IdBinderSimple(BeanProperty idProperty, MultiValueBind multiValueBind) {
|
||||
this.idProperty = idProperty;
|
||||
this.scalarType = idProperty.getScalarType();
|
||||
this.scalarType = idProperty.scalarType();
|
||||
this.expectedType = idProperty.type();
|
||||
bindIdSql = InternString.intern(idProperty.getDbColumn() + " = ? ");
|
||||
bindIdSql = InternString.intern(idProperty.dbColumn() + " = ? ");
|
||||
this.multiValueBind = multiValueBind;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public final class IdBinderSimple implements IdBinder {
|
||||
|
||||
@Override
|
||||
public BeanProperty findBeanProperty(String dbColumnName) {
|
||||
if (dbColumnName.equalsIgnoreCase(idProperty.getDbColumn())) {
|
||||
if (dbColumnName.equalsIgnoreCase(idProperty.dbColumn())) {
|
||||
return idProperty;
|
||||
}
|
||||
return null;
|
||||
@@ -99,9 +99,9 @@ public final class IdBinderSimple implements IdBinder {
|
||||
@Override
|
||||
public String getBindIdInSql(String baseTableAlias) {
|
||||
if (baseTableAlias == null) {
|
||||
return idProperty.getDbColumn();
|
||||
return idProperty.dbColumn();
|
||||
} else {
|
||||
return baseTableAlias + "." + idProperty.getDbColumn();
|
||||
return baseTableAlias + "." + idProperty.dbColumn();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ public final class DeployBeanPropertyLists {
|
||||
if (versionProperty == null) {
|
||||
versionProperty = prop;
|
||||
} else {
|
||||
logger.warn("Multiple @Version properties - property " + prop.getFullBeanName() + " not treated as a version property");
|
||||
logger.warn("Multiple @Version properties - property " + prop.fullName() + " not treated as a version property");
|
||||
}
|
||||
} else if (prop.isDraftDirty()) {
|
||||
draftDirty = prop;
|
||||
|
||||
+1
-3
@@ -3,8 +3,6 @@ package io.ebeaninternal.server.deploy.meta;
|
||||
import io.ebeaninternal.server.deploy.BeanProperty;
|
||||
import io.ebeaninternal.server.deploy.BeanTable;
|
||||
|
||||
import javax.persistence.JoinColumn;
|
||||
|
||||
/**
|
||||
* A join pair of local and foreign properties.
|
||||
*/
|
||||
@@ -87,7 +85,7 @@ public final class DeployTableJoinColumn {
|
||||
if (localDbColumn == null) {
|
||||
BeanProperty idProperty = beanTable.getIdProperty();
|
||||
if (idProperty != null) {
|
||||
localDbColumn = idProperty.getDbColumn();
|
||||
localDbColumn = idProperty.dbColumn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -199,7 +199,7 @@ final class AnnotationAssocManys extends AnnotationAssoc {
|
||||
if (localId != null) {
|
||||
// add foreign key based on convention
|
||||
String fkColName = namingConvention.getForeignKey(descriptor.getBaseTable(), localId.name());
|
||||
prop.getTableJoin().addJoinColumn(new DeployTableJoinColumn(localId.getDbColumn(), fkColName));
|
||||
prop.getTableJoin().addJoinColumn(new DeployTableJoinColumn(localId.dbColumn(), fkColName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -386,8 +386,8 @@ final class AnnotationAssocManys extends AnnotationAssoc {
|
||||
BeanProperty localId = localTable.getIdProperty();
|
||||
if (localId != null) {
|
||||
// add the source to intersection join columns
|
||||
String fkCol = namingConvention.deriveM2MColumn(localTableName, localId.getDbColumn());
|
||||
intJoin.addJoinColumn(new DeployTableJoinColumn(localId.getDbColumn(), fkCol));
|
||||
String fkCol = namingConvention.deriveM2MColumn(localTableName, localId.dbColumn());
|
||||
intJoin.addJoinColumn(new DeployTableJoinColumn(localId.dbColumn(), fkCol));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,8 +396,8 @@ final class AnnotationAssocManys extends AnnotationAssoc {
|
||||
BeanProperty otherId = otherTable.getIdProperty();
|
||||
if (otherId != null) {
|
||||
// set the intersection to dest table join columns
|
||||
String fkCol = namingConvention.deriveM2MColumn(otherTableName, otherId.getDbColumn());
|
||||
destJoin.addJoinColumn(new DeployTableJoinColumn(fkCol, otherId.getDbColumn()));
|
||||
String fkCol = namingConvention.deriveM2MColumn(otherTableName, otherId.dbColumn());
|
||||
destJoin.addJoinColumn(new DeployTableJoinColumn(fkCol, otherId.dbColumn()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,9 +59,9 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
this.assocId = chain[chain.length - 1].isAssocId();
|
||||
|
||||
this.last = chain.length - 1;
|
||||
this.lastBeanProperty = chain[chain.length - 1].getBeanProperty();
|
||||
this.lastBeanProperty = chain[chain.length - 1].beanProperty();
|
||||
if (lastBeanProperty != null) {
|
||||
this.scalarType = lastBeanProperty.getScalarType();
|
||||
this.scalarType = lastBeanProperty.scalarType();
|
||||
} else {
|
||||
// case for nested compound type (non-scalar)
|
||||
this.scalarType = null;
|
||||
@@ -77,8 +77,8 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFetchPreference() {
|
||||
return chain[0].getFetchPreference();
|
||||
public int fetchPreference() {
|
||||
return chain[0].fetchPreference();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,9 +88,9 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
|
||||
private String getElPlaceHolder(String prefix, ElPropertyValue lastElPropertyValue, boolean encrypted) {
|
||||
if (prefix == null) {
|
||||
return lastElPropertyValue.getElPlaceholder(encrypted);
|
||||
return lastElPropertyValue.elPlaceholder(encrypted);
|
||||
}
|
||||
String el = lastElPropertyValue.getElPlaceholder(encrypted);
|
||||
String el = lastElPropertyValue.elPlaceholder(encrypted);
|
||||
if (!el.contains("${}")) {
|
||||
// typically a secondary table property
|
||||
return el.replace("${", "${" + prefix + ".");
|
||||
@@ -113,7 +113,7 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
}
|
||||
int i = 1 + SplitName.count(sinceProperty);
|
||||
for (; i < chain.length; i++) {
|
||||
if (chain[i].getBeanProperty().containsMany()) {
|
||||
if (chain[i].beanProperty().containsMany()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPrefix() {
|
||||
public String elPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getElPlaceholder(boolean encrypted) {
|
||||
public String elPlaceholder(boolean encrypted) {
|
||||
return encrypted ? placeHolderEncrypted : placeHolder;
|
||||
}
|
||||
|
||||
@@ -218,12 +218,12 @@ public final class ElPropertyChain implements ElPropertyValue {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDbColumn() {
|
||||
return lastElPropertyValue.getDbColumn();
|
||||
public String dbColumn() {
|
||||
return lastElPropertyValue.dbColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeanProperty getBeanProperty() {
|
||||
public BeanProperty beanProperty() {
|
||||
return lastBeanProperty;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface ElPropertyDeploy {
|
||||
* this property.
|
||||
* </p>
|
||||
*/
|
||||
String getElPrefix();
|
||||
String elPrefix();
|
||||
|
||||
/**
|
||||
* Return the place holder in the form of ${elPrefix}dbColumn.
|
||||
@@ -48,7 +48,7 @@ public interface ElPropertyDeploy {
|
||||
* The ${elPrefix} is replaced by the appropriate table alias.
|
||||
* </p>
|
||||
*/
|
||||
String getElPlaceholder(boolean encrypted);
|
||||
String elPlaceholder(boolean encrypted);
|
||||
|
||||
/**
|
||||
* Return the name of the property.
|
||||
@@ -63,12 +63,12 @@ public interface ElPropertyDeploy {
|
||||
/**
|
||||
* Return the deployment db column for this property.
|
||||
*/
|
||||
String getDbColumn();
|
||||
String dbColumn();
|
||||
|
||||
/**
|
||||
* Return the underlying bean property.
|
||||
*/
|
||||
BeanProperty getBeanProperty();
|
||||
BeanProperty beanProperty();
|
||||
|
||||
/**
|
||||
* Return true if this is an aggregation property.
|
||||
@@ -79,5 +79,5 @@ public interface ElPropertyDeploy {
|
||||
* Return the fetch preference. This can be used to control which ToMany relationship
|
||||
* is left as a 'join' and which get converted to query join.
|
||||
*/
|
||||
int getFetchPreference();
|
||||
int fetchPreference();
|
||||
}
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ final class CaseInsensitiveEqualExpression extends AbstractValueExpression {
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
// bind the key as well as the value
|
||||
String encryptKey = prop.getBeanProperty().getEncryptKey().getStringValue();
|
||||
String encryptKey = prop.beanProperty().getEncryptKey().getStringValue();
|
||||
request.addBindEncryptKey(encryptKey);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ final class CaseInsensitiveEqualExpression extends AbstractValueExpression {
|
||||
String pname = propName;
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
pname = prop.getBeanProperty().getDecryptProperty(propName);
|
||||
pname = prop.beanProperty().getDecryptProperty(propName);
|
||||
}
|
||||
if (not) {
|
||||
request.append("lower(").append(pname).append(") != ?");
|
||||
|
||||
@@ -29,7 +29,7 @@ final class LikeExpression extends AbstractValueExpression {
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
// bind the key as well as the value
|
||||
String encryptKey = prop.getBeanProperty().getEncryptKey().getStringValue();
|
||||
String encryptKey = prop.beanProperty().getEncryptKey().getStringValue();
|
||||
request.addBindEncryptKey(encryptKey);
|
||||
}
|
||||
String bindValue = getValue(strValue(), caseInsensitive, type, request);
|
||||
@@ -41,7 +41,7 @@ final class LikeExpression extends AbstractValueExpression {
|
||||
String pname = propName;
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
pname = prop.getBeanProperty().getDecryptProperty(propName);
|
||||
pname = prop.beanProperty().getDecryptProperty(propName);
|
||||
}
|
||||
if (caseInsensitive) {
|
||||
request.append("lower(").append(pname).append(")");
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ final class NativeILikeExpression extends AbstractExpression {
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
// bind the key as well as the value
|
||||
String encryptKey = prop.getBeanProperty().getEncryptKey().getStringValue();
|
||||
String encryptKey = prop.beanProperty().getEncryptKey().getStringValue();
|
||||
request.addBindEncryptKey(encryptKey);
|
||||
}
|
||||
request.addBindValue(val);
|
||||
@@ -40,7 +40,7 @@ final class NativeILikeExpression extends AbstractExpression {
|
||||
String pname = propName;
|
||||
ElPropertyValue prop = getElProp(request);
|
||||
if (prop != null && prop.isDbEncrypted()) {
|
||||
pname = prop.getBeanProperty().getDecryptProperty(propName);
|
||||
pname = prop.beanProperty().getDecryptProperty(propName);
|
||||
}
|
||||
|
||||
request.append(pname).append(" ilike ?");
|
||||
|
||||
@@ -83,7 +83,7 @@ public final class SimpleExpression extends AbstractValueExpression {
|
||||
}
|
||||
if (prop.isDbEncrypted()) {
|
||||
// bind the key as well as the value
|
||||
String encryptKey = prop.getBeanProperty().getEncryptKey().getStringValue();
|
||||
String encryptKey = prop.beanProperty().getEncryptKey().getStringValue();
|
||||
request.addBindEncryptKey(encryptKey);
|
||||
} else if (prop.isLocalEncrypted()) {
|
||||
Object bindVal = prop.localEncrypt(value());
|
||||
@@ -105,7 +105,7 @@ public final class SimpleExpression extends AbstractValueExpression {
|
||||
return;
|
||||
}
|
||||
if (prop.isDbEncrypted()) {
|
||||
String dsql = prop.getBeanProperty().getDecryptProperty(propName);
|
||||
String dsql = prop.beanProperty().getDecryptProperty(propName);
|
||||
request.append(dsql).append(type.bind());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public final class DLoadContext implements LoadContext {
|
||||
*/
|
||||
private void registerSecondaryQuery(OrmQueryProperties props) {
|
||||
ElPropertyValue elGetValue = rootDescriptor.getElGetValue(props.getPath());
|
||||
boolean many = elGetValue.getBeanProperty().containsMany();
|
||||
boolean many = elGetValue.beanProperty().containsMany();
|
||||
registerSecondaryNode(many, props);
|
||||
}
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@ public final class DefaultPersister implements Persister {
|
||||
for (BeanPropertyAssocMany<?> many : manys) {
|
||||
SqlUpdate sqlDelete = many.deleteByParentId(id, idList);
|
||||
if (t.isLogSummary()) {
|
||||
t.logSummary("-- Deleting intersection table entries: " + many.getFullBeanName());
|
||||
t.logSummary("-- Deleting intersection table entries: " + many.fullName());
|
||||
}
|
||||
executeSqlUpdate(sqlDelete, t);
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ public final class SaveManyBeans extends SaveManyBase {
|
||||
} else if (value instanceof Collection<?>) {
|
||||
additions = (Collection<?>) value;
|
||||
} else {
|
||||
throw new PersistenceException("Unhandled ManyToMany type " + value.getClass().getName() + " for " + many.getFullBeanName());
|
||||
throw new PersistenceException("Unhandled ManyToMany type " + value.getClass().getName() + " for " + many.fullName());
|
||||
}
|
||||
if (!vanillaCollection) {
|
||||
BeanCollection<?> manyValue = (BeanCollection<?>) value;
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ final class BindableEncryptedProperty implements Bindable {
|
||||
public void dmlAppend(GenerateDmlRequest request) {
|
||||
|
||||
// columnName = AES_ENCRYPT(?,?)
|
||||
request.appendColumn(prop.getDbColumn(), prop.getDbBind());
|
||||
request.appendColumn(prop.dbColumn(), prop.getDbBind());
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@ final class BindableIdEmbedded implements BindableId {
|
||||
@Override
|
||||
public void dmlAppend(GenerateDmlRequest request) {
|
||||
for (BeanProperty prop : props) {
|
||||
request.appendColumn(prop.getDbColumn());
|
||||
request.appendColumn(prop.dbColumn());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ final class BindableIdEmbedded implements BindableId {
|
||||
public boolean deriveConcatenatedId(PersistRequestBean<?> persist) {
|
||||
|
||||
if (matches == null) {
|
||||
String m = "No matches for " + embId.getFullBeanName() + " the concatenated key columns where not found?"
|
||||
String m = "No matches for " + embId.fullName() + " the concatenated key columns where not found?"
|
||||
+ " I expect that the concatenated key was null, and this bean does"
|
||||
+ " not have ManyToOne assoc beans matching the primary key columns?";
|
||||
throw new PersistenceException(m);
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ final class BindableIdScalar implements BindableId {
|
||||
|
||||
@Override
|
||||
public String getIdentityColumn() {
|
||||
return uidProp.getDbColumn();
|
||||
return uidProp.dbColumn();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,7 +64,7 @@ final class BindableIdScalar implements BindableId {
|
||||
@Override
|
||||
public void dmlAppend(GenerateDmlRequest request) {
|
||||
|
||||
request.appendColumn(uidProp.getDbColumn());
|
||||
request.appendColumn(uidProp.dbColumn());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class BindableProperty implements Bindable {
|
||||
|
||||
@Override
|
||||
public final void dmlAppend(GenerateDmlRequest request) {
|
||||
request.appendColumn(prop.getDbColumn());
|
||||
request.appendColumn(prop.dbColumn());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ final class BindablePropertyVersion implements Bindable {
|
||||
|
||||
@Override
|
||||
public void dmlAppend(GenerateDmlRequest request) {
|
||||
request.appendColumn(prop.getDbColumn());
|
||||
request.appendColumn(prop.dbColumn());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ final class MatchedImportedFactory {
|
||||
|
||||
private static MatchedImportedProperty findMatch(BeanProperty prop, BeanDescriptor<?> desc) {
|
||||
// find matching against the local database column
|
||||
String dbColumn = prop.getDbColumn();
|
||||
String dbColumn = prop.dbColumn();
|
||||
for (BeanPropertyAssocOne<?> assocOne1 : desc.propertiesOne()) {
|
||||
if (assocOne1.isImportedPrimaryKey()) {
|
||||
// search using the ImportedId from the assoc one
|
||||
@@ -35,7 +35,7 @@ final class MatchedImportedFactory {
|
||||
}
|
||||
}
|
||||
for (BeanProperty beanProperty : desc.propertiesBaseScalar()) {
|
||||
if (dbColumn.equals(beanProperty.getDbColumn())) {
|
||||
if (dbColumn.equals(beanProperty.dbColumn())) {
|
||||
return new MatchedImportedScalar(prop, beanProperty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ final class CQueryBuilder {
|
||||
}
|
||||
|
||||
private void addRawColumnMapping(PathProperties pathProps, Column column, String propertyName, ElPropertyValue el) {
|
||||
BeanProperty beanProperty = el.getBeanProperty();
|
||||
BeanProperty beanProperty = el.beanProperty();
|
||||
if (beanProperty.isId()) {
|
||||
if (propertyName.contains(".")) {
|
||||
// For @Id properties we chop off the last part of the path
|
||||
@@ -583,7 +583,7 @@ final class CQueryBuilder {
|
||||
sb.append("r1.attribute_, count(*) from (select ");
|
||||
if (distinct) {
|
||||
sb.append("distinct t0.");
|
||||
sb.append(request.descriptor().idProperty().getDbColumn()).append(", ");
|
||||
sb.append(request.descriptor().idProperty().dbColumn()).append(", ");
|
||||
}
|
||||
sb.append(select.getSelectSql()).append(" as attribute_");
|
||||
} else {
|
||||
|
||||
@@ -59,7 +59,7 @@ final class CQueryOrderBy {
|
||||
return p.toStringFormat();
|
||||
}
|
||||
|
||||
BeanProperty beanProperty = el.getBeanProperty();
|
||||
BeanProperty beanProperty = el.beanProperty();
|
||||
if (beanProperty instanceof BeanPropertyAssoc<?>) {
|
||||
BeanPropertyAssoc<?> ap = (BeanPropertyAssoc<?>) beanProperty;
|
||||
IdBinder idBinder = ap.getTargetDescriptor().getIdBinder();
|
||||
|
||||
@@ -221,7 +221,7 @@ public class CQueryPlan implements SpiQueryPlan {
|
||||
DataBind dataBind = new DataBind(dataTimeZone, stmt, conn);
|
||||
if (encryptedProps != null) {
|
||||
for (STreeProperty encryptedProp : encryptedProps) {
|
||||
dataBind.setString(encryptedProp.getEncryptKeyAsString());
|
||||
dataBind.setString(encryptedProp.encryptKeyAsString());
|
||||
}
|
||||
}
|
||||
return dataBind;
|
||||
@@ -231,7 +231,7 @@ public class CQueryPlan implements SpiQueryPlan {
|
||||
DataBindCapture dataBind = DataBindCapture.of(dataTimeZone);
|
||||
if (encryptedProps != null) {
|
||||
for (STreeProperty encryptedProp : encryptedProps) {
|
||||
dataBind.setString(encryptedProp.getEncryptKeyAsString());
|
||||
dataBind.setString(encryptedProp.encryptKeyAsString());
|
||||
}
|
||||
}
|
||||
return dataBind;
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface STreeProperty extends ScalarDataReader<Object> {
|
||||
/**
|
||||
* Return the full property name (for error messages).
|
||||
*/
|
||||
String getFullBeanName();
|
||||
String fullName();
|
||||
|
||||
/**
|
||||
* Return true if the property is the Id.
|
||||
@@ -54,17 +54,17 @@ public interface STreeProperty extends ScalarDataReader<Object> {
|
||||
/**
|
||||
* Return the encryption key as a string value (when the property is encrypted).
|
||||
*/
|
||||
String getEncryptKeyAsString();
|
||||
String encryptKeyAsString();
|
||||
|
||||
/**
|
||||
* Return the Expression language prefix (join path).
|
||||
*/
|
||||
String getElPrefix();
|
||||
String elPrefix();
|
||||
|
||||
/**
|
||||
* Return the underlying scalar type for the property (for findSingleAttribute).
|
||||
*/
|
||||
ScalarType<?> getScalarType();
|
||||
ScalarType<?> scalarType();
|
||||
|
||||
/**
|
||||
* For RawSql build the select chain.
|
||||
|
||||
@@ -63,7 +63,7 @@ public final class SqlBeanLoad {
|
||||
return prop.readSet(ctx, bean);
|
||||
} catch (Exception e) {
|
||||
bean._ebean_getIntercept().setLoadError(prop.getPropertyIndex(), e);
|
||||
ctx.handleLoadError(prop.getFullBeanName(), e);
|
||||
ctx.handleLoadError(prop.fullName(), e);
|
||||
return prop.getValue(bean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public final class SqlTreeBuilder {
|
||||
// add the embedded bean or the *ToOne assoc bean. We skip the check that the *ToOne propName maps to Id property ...
|
||||
selectProps.add(p);
|
||||
} else {
|
||||
logger.error("property [" + p.getFullBeanName() + "] expected to be an embedded or *ToOne bean for query - excluding it.");
|
||||
logger.error("property [" + p.fullName() + "] expected to be an embedded or *ToOne bean for query - excluding it.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public final class SqlTreeProperties {
|
||||
if (prop.isAggregation()) {
|
||||
if (!aggregation) {
|
||||
aggregation = true;
|
||||
aggregationPath = prop.getElPrefix();
|
||||
aggregationPath = prop.elPrefix();
|
||||
}
|
||||
if (prop.isAggregationManyToOne()) {
|
||||
aggregationManyToOne = true;
|
||||
|
||||
@@ -28,7 +28,7 @@ public final class DefaultUpdateQuery<T> implements UpdateQuery<T> {
|
||||
values.setNull(property);
|
||||
} else {
|
||||
final BeanProperty beanProperty = descriptor.getBeanProperty(property);
|
||||
final ScalarType<Object> scalarType = (beanProperty == null) ? null: beanProperty.getScalarType();
|
||||
final ScalarType<Object> scalarType = (beanProperty == null) ? null: beanProperty.scalarType();
|
||||
values.set(property, value, scalarType);
|
||||
}
|
||||
return this;
|
||||
|
||||
@@ -312,7 +312,7 @@ public final class OrmQueryDetail implements Serializable {
|
||||
throw new PersistenceException("Path [" + parentPath + "] not valid from " + d.fullName());
|
||||
}
|
||||
// add a missing parent path just fetching the Id property
|
||||
BeanPropertyAssoc<?> assocOne = (BeanPropertyAssoc<?>) el.getBeanProperty();
|
||||
BeanPropertyAssoc<?> assocOne = (BeanPropertyAssoc<?>) el.beanProperty();
|
||||
if (addId) {
|
||||
parentProp = new OrmQueryProperties(parentPath, assocOne.getTargetIdProperty());
|
||||
} else {
|
||||
@@ -549,8 +549,8 @@ public final class OrmQueryDetail implements Serializable {
|
||||
*/
|
||||
@Override
|
||||
public int compareTo(FetchEntry other) {
|
||||
int fp = elProp.getFetchPreference();
|
||||
int op = other.elProp.getFetchPreference();
|
||||
int fp = elProp.fetchPreference();
|
||||
int op = other.elProp.fetchPreference();
|
||||
if (fp == op) {
|
||||
return Integer.compare(index, other.index);
|
||||
} else {
|
||||
|
||||
@@ -247,7 +247,7 @@ public class TCsvReader<T> implements CsvReader<T> {
|
||||
addDateTime(aLine, null, null);
|
||||
|
||||
} else if (elProp.isAssocProperty()) {
|
||||
BeanPropertyAssocOne<?> assocOne = (BeanPropertyAssocOne<?>) elProp.getBeanProperty();
|
||||
BeanPropertyAssocOne<?> assocOne = (BeanPropertyAssocOne<?>) elProp.beanProperty();
|
||||
String idProp = assocOne.getBeanDescriptor().getIdBinder().getIdProperty();
|
||||
addProperty(aLine + "." + idProp);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user