|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.cpa.query.object.AbstractQueryObject
org.castor.cpa.query.object.SelectQueryImpl
public final class SelectQueryImpl
Final class that implements SelectQuery.
Constructor Summary | |
---|---|
SelectQueryImpl()
|
Method Summary | |
---|---|
void |
addProjection(Field field)
Adds the projection. |
void |
addProjection(Field field,
java.lang.String alias)
|
void |
addSchema(Schema schema)
Adds the schema. |
Literal |
newBoolean(boolean value)
New boolean. |
Literal |
newEnum(java.lang.Enum<?> identifier)
New enum. |
Literal |
newNumeric(java.math.BigDecimal value)
New numeric. |
Literal |
newNumeric(double value)
New numeric. |
Literal |
newNumeric(long value)
New numeric. |
Order |
newOrder(Field field)
New order. |
Order |
newOrder(Field field,
OrderDirection direction)
New order. |
Parameter |
newParameter(int position)
Factory method to create new Parameter. |
Parameter |
newParameter(java.lang.String name)
New parameter. |
Schema |
newSchema(java.lang.Class<?> type,
java.lang.String identifier)
Factory method to create new Schema. |
Schema |
newSchema(java.lang.String name,
java.lang.String identifier)
Factory method to create new Schema. |
Literal |
newString(java.lang.String value)
New string. |
Expression |
newTemporal(TemporalType temporalType)
New temporal. |
Expression |
newTemporal(TemporalType temporalType,
java.util.Calendar value)
New temporal. |
Expression |
newTemporal(TemporalType temporalType,
java.util.Date value)
New temporal. |
void |
setDistinct(boolean distinct)
Sets the distinct. |
void |
setLimit(int limit)
Sets the limit. |
void |
setLimit(int limit,
int offset)
Sets the limit. |
void |
setLimit(Parameter limit)
Sets the limit. |
void |
setLimit(Parameter limit,
Parameter offset)
Sets the limit. |
void |
setOrder(Order order)
Sets the order. |
void |
setWhere(Condition condition)
Sets the where. |
java.lang.StringBuilder |
toString(java.lang.StringBuilder sb)
Append a string representation of the object to the given StringBuilder . |
Methods inherited from class org.castor.cpa.query.object.AbstractQueryObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SelectQueryImpl()
Method Detail |
---|
public Schema newSchema(java.lang.String name, java.lang.String identifier)
newSchema
in interface SelectQuery
name
- the schemaidentifier
- the identifier
public Schema newSchema(java.lang.Class<?> type, java.lang.String identifier)
newSchema
in interface SelectQuery
type
- the schemaidentifier
- the identifier
public Parameter newParameter(int position)
newParameter
in interface SelectQuery
position
- the int
public Parameter newParameter(java.lang.String name)
newParameter
in interface SelectQuery
name
- the name
public Literal newBoolean(boolean value)
newBoolean
in interface SelectQuery
value
- the value
public Literal newNumeric(long value)
newNumeric
in interface SelectQuery
value
- the value
public Literal newNumeric(double value)
newNumeric
in interface SelectQuery
value
- the value
public Literal newNumeric(java.math.BigDecimal value)
newNumeric
in interface SelectQuery
value
- the value
public Literal newString(java.lang.String value)
newString
in interface SelectQuery
value
- the value
public Literal newEnum(java.lang.Enum<?> identifier)
newEnum
in interface SelectQuery
identifier
- the identifier
public Order newOrder(Field field)
newOrder
in interface SelectQuery
field
- the field
public Order newOrder(Field field, OrderDirection direction)
newOrder
in interface SelectQuery
field
- the fielddirection
- the direction
public Expression newTemporal(TemporalType temporalType)
newTemporal
in interface SelectQuery
temporalType
- the temporal type
public Expression newTemporal(TemporalType temporalType, java.util.Date value)
newTemporal
in interface SelectQuery
temporalType
- the temporal typevalue
- the value
public Expression newTemporal(TemporalType temporalType, java.util.Calendar value)
newTemporal
in interface SelectQuery
temporalType
- the temporal typevalue
- the value
public void setDistinct(boolean distinct)
setDistinct
in interface SelectQuery
distinct
- the new distinctpublic void addProjection(Field field)
addProjection
in interface SelectQuery
field
- the fieldpublic void addProjection(Field field, java.lang.String alias)
public void addSchema(Schema schema)
addSchema
in interface SelectQuery
schema
- the schemapublic void setWhere(Condition condition)
setWhere
in interface SelectQuery
condition
- the new wherepublic void setOrder(Order order)
setOrder
in interface SelectQuery
order
- the new orderpublic void setLimit(int limit)
setLimit
in interface SelectQuery
limit
- the new limitpublic void setLimit(Parameter limit)
setLimit
in interface SelectQuery
limit
- the new limitpublic void setLimit(int limit, int offset)
setLimit
in interface SelectQuery
limit
- the limitoffset
- the offsetpublic void setLimit(Parameter limit, Parameter offset)
setLimit
in interface SelectQuery
limit
- the limitoffset
- the offsetpublic java.lang.StringBuilder toString(java.lang.StringBuilder sb)
StringBuilder
.
In general, the toString method for query objects appends a string that textually
represents this object. The result should be a query string that complies to EJB QL
specification as long as the query object represents a syntay element of it. It is
required that all subclasses override this method.
The toString method defined at class Object is overwritten and calls this method.
toString
in interface QueryObject
sb
- StringBuilder to append the string representation of this object to.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |