|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cpa.persistence.sql.query.visitor.DefaultQueryVisitor
public class DefaultQueryVisitor
Class representing a alias of a specific table or a database.
| Field Summary | |
|---|---|
protected StringBuilder |
_queryString
StringBuilder used to append query string. |
protected static org.apache.commons.logging.Log |
LOG
The Jakarta Commons Logging instance used for all logging. |
| Constructor Summary | |
|---|---|
DefaultQueryVisitor()
|
|
| Method Summary | |
|---|---|
protected void |
addTableNames(Qualifier qualifier)
Method adding table-names in case of joins. |
protected String |
getSequenceNextValString(String seqName)
Returns the database engine specific string to fetch sequence next value. |
protected void |
handleJoinConstruction(Qualifier qualifier)
Method handling construction of joins. |
protected void |
handleLock(Select select)
Method appending lock clauses as "FOR UPDATE" when needed. |
protected String |
quoteName(String name)
Method returning prepared string to match requirements of specific databases if needed. |
String |
toString()
Method returning constructed String. |
void |
visit(AndCondition andCondition)
Visit method to handle AndCondition elements. |
void |
visit(Assignment assignment)
Visit method to handle Assignment elements. |
void |
visit(Column column)
Visit method to handle Column elements. |
void |
visit(Compare compare)
Visit method to handle Compare elements. |
void |
visit(Delete delete)
Visit method to handle Delete elements. |
void |
visit(Insert insert)
Visit method to handle Insert elements. |
void |
visit(IsNullPredicate isNullPredicate)
Visit method to handle IsNullPredicate elements. |
void |
visit(Join join)
Visit method to handle Join elements. |
void |
visit(NextVal nextVal)
Visit method to handle NextVal elements. |
void |
visit(OrCondition orCondition)
Visit method to handle OrCondition elements. |
void |
visit(Parameter parameter)
Visit method to handle Parameter elements. |
void |
visit(Select select)
Visit method to handle select elements. |
void |
visit(Table table)
Visit method to handle Table elements. |
void |
visit(TableAlias tableAlias)
Visit method to handle TableAlias elements. |
void |
visit(Update update)
Visit method to handle update elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final StringBuilder _queryString
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public DefaultQueryVisitor()
| Method Detail |
|---|
public void visit(Assignment assignment)
Assignment elements.
visit in interface Visitorassignment - Assignment object to be handled.public void visit(Delete delete)
Delete elements.
visit in interface Visitordelete - Delete object to be handled.public void visit(Insert insert)
Insert elements.
visit in interface Visitorinsert - Insert object to be handled.public void visit(Join join)
Join elements.
visit in interface Visitorjoin - Join object to be handledpublic void visit(Select select)
visit in interface Visitorselect - Select object to be handled.protected void handleJoinConstruction(Qualifier qualifier)
qualifier - Qualifier to process joins from.protected void addTableNames(Qualifier qualifier)
qualifier - Qualifier to add names frompublic void visit(Table table)
Table elements.
visit in interface Visitortable - Table object to be handled.public void visit(TableAlias tableAlias)
TableAlias elements.
visit in interface VisitortableAlias - TableAlias object to be handled.public void visit(Update update)
visit in interface Visitorupdate - Update object to be handled.public void visit(AndCondition andCondition)
AndCondition elements.
visit in interface VisitorandCondition - AndCondition object to be handled.public void visit(Compare compare)
Compare elements.
visit in interface Visitorcompare - Compare object to be handled.public void visit(IsNullPredicate isNullPredicate)
IsNullPredicate elements.
visit in interface VisitorisNullPredicate - IsNullPredicate object to be handled.public void visit(OrCondition orCondition)
OrCondition elements.
visit in interface VisitororCondition - OrCondition object to be handled.public void visit(Column column)
Column elements.
visit in interface Visitorcolumn - Column object to be handled.public void visit(NextVal nextVal)
NextVal elements.
visit in interface VisitornextVal - NextVal object to be handled.public void visit(Parameter parameter)
Parameter elements.
visit in interface Visitorparameter - Parameter object to be handled.protected String quoteName(String name)
name - String to be prepared.
protected String getSequenceNextValString(String seqName)
seqName - Name of the sequence.
protected void handleLock(Select select)
select - Select to check if locking-clauses have to be appended or not.public String toString()
toString in interface VisitortoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||