Package org.apache.torque.criteria
Klasse FromElement
java.lang.Object
org.apache.torque.criteria.FromElement
- Alle implementierten Schnittstellen:
Serializable
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.
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFromElement
(String tableName) Constructor with join type null and joinCondition null.FromElement
(String fromExpression, JoinType joinType, String joinCondition) Constructor.FromElement
(String fromExpression, JoinType joinType, String joinCondition, List<Object> preparedStatementReplacements) Constructor.FromElement
(String fromExpression, JoinType joinType, PreparedStatementPart joinCondition) Constructor. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Returns the fromExpression, which might e.g. be a simple table name or a table name or a subquery with an alias appended.Returns the join condition.Returns the join type.Returns the replacements for prepared statement placeholders in the fromExpression.int
hashCode()
toString()
Returns a SQL representation of the element.
-
Konstruktordetails
-
FromElement
Constructor with join type null and joinCondition null.- Parameter:
tableName
- the table name, might contain an appended alias name, e.g.table_1
table_1 alias_for_table_1
-
FromElement
Constructor.- Parameter:
fromExpression
- the expression to add to the from clause, e.g. a simple table name or a table name with an alias,table_1
table_1 alias_for_table_1
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)
-
FromElement
public FromElement(String fromExpression, JoinType joinType, String joinCondition, List<Object> preparedStatementReplacements) Constructor.- Parameter:
fromExpression
- the expression to add to the from clause, e.g. a simple table name or a table name with an alias,table_1
table_1 alias_for_table_1
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.
-
FromElement
Constructor.- Parameter:
fromExpression
- the expression to add to the from clause, e.g. a simple table name or a table name with an alias,table_1
table_1 alias_for_table_1
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.
-
-
Methodendetails
-
getJoinCondition
Returns the join condition.- Gibt zurück:
- the join condition, e.g. table_a.id = table_b.a_id, or null if the join is not an explicit join
-
getJoinType
Returns the join type.- Gibt zurück:
- the type of the join, e.g. JoinType.LEFT_JOIN, or null if the join is not an explicit join
-
getFromExpression
Returns the fromExpression, which might e.g. be a simple table name or a table name or a subquery with an alias appended.- Gibt zurück:
- the tablename, might contain an appended alias name, e.g.
table_1
table_1 alias_for_table_1
-
getPreparedStatementReplacements
Returns the replacements for prepared statement placeholders in the fromExpression.- Gibt zurück:
- the replacements, not null.
-
toString
Returns a SQL representation of the element. -
hashCode
public int hashCode() -
equals
-