|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.DynamicRestriction
class DynamicRestriction
Creates a restriction that compares a dynamic column with a constant
value: tableAlias.column = value
or
queryRootAlias.column = value
Field Summary | |
---|---|
private VirtualColumn |
column
|
private VirtualTable |
table
|
private int |
value
|
Constructor Summary | |
---|---|
DynamicRestriction(VirtualColumn column,
int value)
Create a new restriction for column in the root entity of the query: queryRootAlias.column = value . |
|
DynamicRestriction(VirtualTable table,
VirtualColumn column,
int value)
Create a new restriction for column in a joined table: tableAlias.column = value . |
Method Summary | |
---|---|
boolean |
equals(Object other)
This restriction is equal to another DynamicRestriction if their table, column and values are equal. |
Collection<? extends QueryElement> |
getChildren()
Get the children of this query element or null if it has no children. |
int |
hashCode()
|
String |
toQl(Query query,
DbControl dc)
Create a query language string of the query element. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final VirtualTable table
private final VirtualColumn column
private final int value
Constructor Detail |
---|
DynamicRestriction(VirtualColumn column, int value)
queryRootAlias.column = value
.
column
- The column to use in the restrictionvalue
- The value to look forDynamicRestriction(VirtualTable table, VirtualColumn column, int value)
tableAlias.column = value
. It is assumed that
the table specified has been joined in the query.
table
- The table the column is located incolumn
- The column to use in the restrictionvalue
- The value to look forDynamicJoin
Method Detail |
---|
public String toQl(Query query, DbControl dc) throws BaseException
QueryElement
Query.getQueryType()
method to find out which query language is wanted
in case the element requires different syntax for different languages.
toQl
in interface QueryElement
query
- The query that is about to be executeddc
- The DbControl
object used to execute the query
BaseException
- If there is any other errorpublic Collection<? extends QueryElement> getChildren()
QueryElement
AddExpression
has two children, the expression
beeing added.
getChildren
in interface QueryElement
public String toString()
toString
in class Object
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |