|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.criteria.FromElement
public class FromElement
This class describes an Element in the From-part of a SQL clause. It must contain the name of the database table. It might contain an alias for the table name, a join type a join condition and prepared statement replacements. The class is immutable.
Constructor Summary | |
---|---|
FromElement(String tableName)
Constructor with join type null and joinCondition null. |
|
FromElement(String fromExpression,
JoinType joinType,
PreparedStatementPart joinCondition)
Constructor. |
|
FromElement(String fromExpression,
JoinType joinType,
String joinCondition)
Constructor. |
|
FromElement(String fromExpression,
JoinType joinType,
String joinCondition,
List<Object> preparedStatementReplacements)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getFromExpression()
Returns the fromExpression, which might e.g. |
String |
getJoinCondition()
Returns the join condition. |
JoinType |
getJoinType()
Returns the join type. |
List<Object> |
getPreparedStatementReplacements()
Returns the replacements for prepared statement placeholders in the fromExpression. |
int |
hashCode()
|
String |
toString()
Returns a SQL representation of the element. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FromElement(String tableName)
tableName
- the table name, might contain an appended alias name
e.g. public FromElement(String fromExpression, JoinType joinType, String joinCondition)
fromExpression
- the expression to add to the from clause,
e.g. a simple table name or a table name with an alias,
e.g. joinType
- the type of the join, e.g. JoinType.LEFT_JOIN,
or null if no excplicit join is wantedjoinCondition
- the join condition,
e.g. table_a.id = table_b.a_id,
or null if no explicit join is wanted
(In this case, the join condition is appended to the
whereClause instead)public FromElement(String fromExpression, JoinType joinType, String joinCondition, List<Object> preparedStatementReplacements)
fromExpression
- the expression to add to the from clause,
e.g. a simple table name or a table name with an alias,
e.g. joinType
- the type of the join, e.g. JoinType.LEFT_JOIN,
or null if no explicit join is wantedjoinCondition
- the join condition,
e.g. table_a.id = table_b.a_id,
or null if no explicit join is wanted
(In this case, the join condition is appended to the
whereClause instead)preparedStatementReplacements
- the replacements for placeholders
which might occur in the fromExpression, may be null.public FromElement(String fromExpression, JoinType joinType, PreparedStatementPart joinCondition)
fromExpression
- the expression to add to the from clause,
e.g. a simple table name or a table name with an alias,
e.g. joinType
- the type of the join, e.g. JoinType.LEFT_JOIN,
or null if no explicit join is wantedjoinCondition
- the join condition,
e.g. table_a.id = table_b.a_id, not null.Method Detail |
---|
public String getJoinCondition()
public JoinType getJoinType()
public String getFromExpression()
public List<Object> getPreparedStatementReplacements()
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |