|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.persist.sqlConstruction.SqlQueryBuilder
Utility class to build SQL statements.
Nested Class Summary | |
static class |
SqlQueryBuilder.Test
|
Constructor Summary | |
SqlQueryBuilder()
|
Method Summary | |
protected void |
buildAttributeWhereClause(SQLQuery query,
SQLSelect sql,
RDBPersistence pObj,
RDBPersistence pRef)
Look at all of our attribute values. |
void |
buildCountStatement(SQLSelect sql,
SQLQuery obj)
Update the sql object with the information necessary to perform a count statement as requested by the query obj. |
void |
buildFindStatement(RDBPersistence pObj,
RDBPersistence pRef,
SQLSelect sql)
Create a find statement. |
void |
buildFindStatement(RDBPersistence pObj,
RDBPersistence pRef,
SQLSelect sql,
java.util.List constraints)
Create a find statement. |
void |
buildFindStatement(SQLSelect sqlObj,
RDBPersistence pObj,
RDBPersistence pRef)
|
void |
buildFindStatement(SQLSelect sqlObj,
RDBPersistence pObj,
RDBPersistence pRef,
java.util.List constraints)
|
void |
buildFindStatement(SQLSelect sqlObj,
SQLQuery obj)
Build a SQLSelect object from the SQLQuery. |
protected void |
buildForeignKeyWhereClause(SQLQuery query,
SQLSelect sql,
RDBPersistence pObj,
RDBPersistence pRef)
Builds the where clause from the values of the foreign key instance variables that are not nil as defined in the foreign key map. |
protected void |
buildInstanceLinkWhereClause(SQLQuery query,
SQLSelect sql,
RDBPersistence pObj,
RDBPersistence pRef)
Builds the where clause from the values of the instance link instance variables that are not nil as defined in the instance link map. |
protected void |
checkFieldForWhereClause(AttributeTypeColumn col,
SQLQuery query,
SQLSelect sql,
Persistence obj)
|
protected SQLSelect |
createJoinObject(SQLSelect sql,
RDBPersistence forObj,
RDBPersistence obj)
Takes care of building a find statement for obj and join it to sql. |
protected SQLSelect |
createJoinObject(SQLSelect sql,
RDBPersistence forObj,
RDBPersistence obj,
java.util.List constraints)
Takes care of building a find statement for obj and join it to sql. |
static boolean |
defaultValue(java.lang.Object obj)
Some objects will have a default value. |
protected java.lang.String[] |
getSelectColumnList(RDBPersistence pObj,
RDBPersistence pRef)
Get a list of all of the columns to be used in the selecte statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SqlQueryBuilder()
Method Detail |
public static boolean defaultValue(java.lang.Object obj)
obj
-
protected java.lang.String[] getSelectColumnList(RDBPersistence pObj, RDBPersistence pRef)
pObj
- pRef
-
public void buildCountStatement(SQLSelect sql, SQLQuery obj)
sql
- The instance that is modified with the SQL code.obj
- SQLQuery The details of the count request.public void buildFindStatement(SQLSelect sqlObj, RDBPersistence pObj, RDBPersistence pRef)
sqlObj
- The instance that is modified with the SQL code.pObj
- pRef
- public void buildFindStatement(SQLSelect sqlObj, RDBPersistence pObj, RDBPersistence pRef, java.util.List constraints)
sqlObj
- The instance that is modified with the SQL code.pObj
- pRef
- constraints
- public void buildFindStatement(RDBPersistence pObj, RDBPersistence pRef, SQLSelect sql)
pObj
- pRef
- sql
- The instance that is modified with the SQL code.public void buildFindStatement(RDBPersistence pObj, RDBPersistence pRef, SQLSelect sql, java.util.List constraints)
pObj
- pRef
- sql
- The instance that is modified with the SQL code.constraints
- public void buildFindStatement(SQLSelect sqlObj, SQLQuery obj)
sqlObj
- The instance that is modified with the SQL code.obj
- protected void buildAttributeWhereClause(SQLQuery query, SQLSelect sql, RDBPersistence pObj, RDBPersistence pRef)
query
- sql
- pObj
- pRef
- defaultValue(java.lang.Object)
protected void checkFieldForWhereClause(AttributeTypeColumn col, SQLQuery query, SQLSelect sql, Persistence obj)
col
- query
- sql
- obj
- protected void buildForeignKeyWhereClause(SQLQuery query, SQLSelect sql, RDBPersistence pObj, RDBPersistence pRef)
sql
- is the SQLObject that we are currently building.query
- pObj
- pRef
- protected void buildInstanceLinkWhereClause(SQLQuery query, SQLSelect sql, RDBPersistence pObj, RDBPersistence pRef)
sql
- is the SQLObject that we are currently building.query
- pObj
- pRef
- protected SQLSelect createJoinObject(SQLSelect sql, RDBPersistence forObj, RDBPersistence obj)
sql
- is the find statement built for forObj.forObj
- is the object from the search object that is referencing obj.
It is needed to calculate the recordOffset for obj.obj
-
protected SQLSelect createJoinObject(SQLSelect sql, RDBPersistence forObj, RDBPersistence obj, java.util.List constraints)
sql
- is the find statement built for forObj.forObj
- is the object from the search object that is referencing obj.
It is needed to calculate the recordOffset for obj.obj
- constraints
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |