|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cpa.persistence.sql.query.Select
public final class Select
Class to generate SQL select query statements.
Note: Be aware that the SQL statement will be invalid for empty compound conditions.
| Constructor Summary | |
|---|---|
Select(Qualifier qualifier)
Construct a SQL select statement that selects records of the table provided. |
|
Select(String name)
Construct a SQL select statement that selects records of the table provided. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor visitor)
Accept method to handle incoming visitors. |
void |
addFrom(Qualifier qualifier)
Appends the provided qualifier to the list of qualifiers to be used to build from-clause. |
void |
addSelect(Column name)
Appends the provided field to the list of fields to be fetched from table. |
Condition |
getCondition()
Get condition that specifies which records to select. |
List<Qualifier> |
getFrom()
Getter returning from-list currently set. |
List<Expression> |
getSelect()
Getter returning list of Expressions currently set. |
boolean |
hasFrom()
Method to check if qualifiers exist to add to from-clause. |
boolean |
isLocked()
Get locked-flag that specifies if query has to be executed in locked mode or not. |
void |
setCondition(Condition condition)
Set condition that specifies which records to select. |
void |
setLocked(boolean locked)
Set locked-flag that specifies if query has to be executed in locked mode or not. |
String |
toString()
Method constructing query string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Select(String name)
name - Name of the table to select records of.public Select(Qualifier qualifier)
qualifier - Qualifier to select records of.| Method Detail |
|---|
public void addSelect(Column name)
name - Column object representing a column to be fetched.public void addFrom(Qualifier qualifier)
qualifier - Qualifier to be added to from-clause.public List<Expression> getSelect()
public List<Qualifier> getFrom()
public Condition getCondition()
public void setCondition(Condition condition)
condition - Condition that specifies which records to select.public boolean isLocked()
public void setLocked(boolean locked)
locked - True: execute query in locked mode, False: execute without lock.public boolean hasFrom()
public String toString()
toString in class Objectpublic void accept(Visitor visitor)
accept in interface QueryObjectvisitor - Visitor to be handled.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||