mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
No effective change - code cleanup - remove unused - TableJoin properties
This commit is contained in:
1 parent
1ce84ec343
commit
2e1f02163c
9 files changed
+9
-136
No files matched your search
@@ -77,13 +77,6 @@ public abstract class DeployBeanPropertyAssoc<T> extends DeployBeanProperty {
|
||||
return isOuterJoin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify that this bean should use an outer join.
|
||||
*/
|
||||
public void setOuterJoin(boolean isOuterJoin) {
|
||||
this.isOuterJoin = isOuterJoin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a literal expression that is added to the query that lazy loads
|
||||
* the collection.
|
||||
|
||||
+2
-2
@@ -115,7 +115,7 @@ public class DeployBeanPropertyAssocMany<T> extends DeployBeanPropertyAssoc<T> {
|
||||
*/
|
||||
public TableJoin createIntersectionTableJoin() {
|
||||
if (intersectionJoin != null){
|
||||
return new TableJoin(intersectionJoin, null);
|
||||
return new TableJoin(intersectionJoin);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class DeployBeanPropertyAssocMany<T> extends DeployBeanPropertyAssoc<T> {
|
||||
*/
|
||||
public TableJoin createInverseTableJoin() {
|
||||
if (inverseJoin != null){
|
||||
return new TableJoin(inverseJoin, null);
|
||||
return new TableJoin(inverseJoin);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
-7
@@ -77,11 +77,4 @@ public class DeployBeanPropertyAssocOne<T> extends DeployBeanPropertyAssoc<T> {
|
||||
return importedPrimaryKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set to true if the bean maps to the primary key.
|
||||
*/
|
||||
public void setImportedPrimaryKey(boolean importedPrimaryKey) {
|
||||
this.importedPrimaryKey = importedPrimaryKey;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-6
@@ -104,9 +104,8 @@ public class DeployBeanPropertyLists {
|
||||
List<DeployTableJoin> deployTableJoins = deploy.getTableJoins();
|
||||
tableJoins = new TableJoin[deployTableJoins.size()];
|
||||
for (int i = 0; i < deployTableJoins.size(); i++) {
|
||||
tableJoins[i] = new TableJoin(deployTableJoins.get(i), propertyMap);
|
||||
tableJoins[i] = new TableJoin(deployTableJoins.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,10 +230,6 @@ public class DeployBeanPropertyLists {
|
||||
return embedded.toArray(new BeanPropertyAssocOne[embedded.size()]);
|
||||
}
|
||||
|
||||
public BeanPropertyAssocOne<?>[] getOneExported() {
|
||||
return onesExported.toArray(new BeanPropertyAssocOne[onesExported.size()]);
|
||||
}
|
||||
|
||||
public BeanPropertyAssocOne<?>[] getOneImported() {
|
||||
return onesImported.toArray(new BeanPropertyAssocOne[onesImported.size()]);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.avaje.ebeaninternal.server.deploy.meta;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import javax.persistence.JoinColumn;
|
||||
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanCascadeInfo;
|
||||
import com.avaje.ebeaninternal.server.deploy.BeanTable;
|
||||
import com.avaje.ebeaninternal.server.deploy.InheritInfo;
|
||||
import com.avaje.ebeaninternal.server.query.SqlJoinType;
|
||||
|
||||
import javax.persistence.JoinColumn;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Represents a join to another table during deployment phase.
|
||||
* <p>
|
||||
@@ -17,12 +15,6 @@ import com.avaje.ebeaninternal.server.query.SqlJoinType;
|
||||
*/
|
||||
public class DeployTableJoin {
|
||||
|
||||
/**
|
||||
* Flag set when the imported key maps to the primary key. This occurs for intersection tables
|
||||
* (ManyToMany).
|
||||
*/
|
||||
private boolean importedPrimaryKey;
|
||||
|
||||
/**
|
||||
* The joined table.
|
||||
*/
|
||||
@@ -33,21 +25,11 @@ public class DeployTableJoin {
|
||||
*/
|
||||
private SqlJoinType type = SqlJoinType.INNER;
|
||||
|
||||
/**
|
||||
* The list of properties mapped to this joined table.
|
||||
*/
|
||||
private final ArrayList<DeployBeanProperty> properties = new ArrayList<DeployBeanProperty>();
|
||||
|
||||
/**
|
||||
* The list of join column pairs. Used to generate the on clause.
|
||||
*/
|
||||
private ArrayList<DeployTableJoinColumn> columns = new ArrayList<DeployTableJoinColumn>(4);
|
||||
|
||||
/**
|
||||
* The persist cascade info.
|
||||
*/
|
||||
private final BeanCascadeInfo cascadeInfo = new BeanCascadeInfo();
|
||||
|
||||
private InheritInfo inheritInfo;
|
||||
|
||||
/**
|
||||
@@ -60,21 +42,6 @@ public class DeployTableJoin {
|
||||
return type + " " + table + " " + columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the imported foreign key maps to the primary key.
|
||||
*/
|
||||
public boolean isImportedPrimaryKey() {
|
||||
return importedPrimaryKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag set when the imported key maps to the primary key. This occurs for intersection tables
|
||||
* (ManyToMany).
|
||||
*/
|
||||
public void setImportedPrimaryKey(boolean importedPrimaryKey) {
|
||||
this.importedPrimaryKey = importedPrimaryKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the JoinOnPair have been set.
|
||||
*/
|
||||
@@ -82,13 +49,6 @@ public class DeployTableJoin {
|
||||
return columns.size() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the persist info.
|
||||
*/
|
||||
public BeanCascadeInfo getCascadeInfo() {
|
||||
return cascadeInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy all the columns to this join potentially reversing the columns.
|
||||
*/
|
||||
@@ -138,13 +98,6 @@ public class DeployTableJoin {
|
||||
return columns.toArray(new DeployTableJoinColumn[columns.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* For secondary table joins returns the properties mapped to that table.
|
||||
*/
|
||||
public DeployBeanProperty[] properties() {
|
||||
return properties.toArray(new DeployBeanProperty[properties.size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the joined table name.
|
||||
*/
|
||||
@@ -166,13 +119,6 @@ public class DeployTableJoin {
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this join is a left outer join.
|
||||
*/
|
||||
public boolean isOuterJoin() {
|
||||
return type == SqlJoinType.OUTER;
|
||||
}
|
||||
|
||||
public void setType(SqlJoinType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user