Tidy IdBinderEmbedded - merge use of getIdProperty() and idSelect() to use idSelect()

Means we can remove getIdProperty()
This commit is contained in:
Rob Bygrave
2023-08-15 23:36:59 +12:00
parent 7c16694d4b
commit ea55f25d44
6 changed files with 2 additions and 26 deletions
@@ -87,7 +87,7 @@ final class DefaultBeanLoader {
query.setLoadDescription("+lazy", null);
}
query.select(parentDesc.idBinder().getIdProperty());
query.select(parentDesc.idBinder().idSelect());
if (onlyIds) {
query.fetch(many.name(), many.targetIdProperty());
} else {
@@ -122,7 +122,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
targetInheritInfo = targetDescriptor.inheritInfo();
saveRecurseSkippable = targetDescriptor.isSaveRecurseSkippable();
if (!targetIdBinder.isComplexId()) {
targetIdProperty = targetIdBinder.getIdProperty();
targetIdProperty = targetIdBinder.idSelect();
}
}
}
@@ -43,15 +43,6 @@ public interface IdBinder {
*/
Object readData(DataInput dataInput) throws IOException;
/**
* Return the name(s) of the Id property(s). Comma delimited if there is more
* than one.
* <p>
* This can be used to include in a query.
* </p>
*/
String getIdProperty();
/**
* Return the Id BeanProperty.
*/
@@ -89,11 +89,6 @@ public final class IdBinderEmbedded implements IdBinder {
return idDesc;
}
@Override
public String getIdProperty() {
return embIdProperty.name();
}
@Override
public void buildRawSqlSelectChain(String prefix, List<String> selectChain) {
if (!idClass) {
@@ -51,11 +51,6 @@ final class IdBinderEmpty implements IdBinder {
return null;
}
@Override
public String getIdProperty() {
return null;
}
@Override
public BeanProperty findBeanProperty(String dbColumnName) {
return null;
@@ -78,11 +78,6 @@ public final class IdBinderSimple implements IdBinder {
return idProperty;
}
@Override
public String getIdProperty() {
return idProperty.name();
}
@Override
public BeanProperty findBeanProperty(String dbColumnName) {
if (dbColumnName.equalsIgnoreCase(idProperty.dbColumn())) {