|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.sql.SqlBuilder
public final class SqlBuilder
Factored out code that is used to process SQL tables. This code comes from BasePeer and is put here to reduce complexity in the BasePeer class. You should not use the methods here directly!
Field Summary | |
---|---|
static String[] |
FUNCTION_DELIMITERS
Delimiters for SQL functions. |
protected static org.apache.commons.logging.Log |
log
Logging |
Method Summary | |
---|---|
static Query |
buildQuery(Criteria crit)
Deprecated. please use org.apache.torque.criteria.Criteria instead of org.apache.torque.util.Criteria. |
static Query |
buildQuery(Criteria crit)
Builds a Query from a criteria. |
static String |
getFullTableName(String table,
String dbName)
Fully qualify a table name with an optional schema reference. |
static TableMap |
getTableMap(String tableName,
String dbName)
Returns the table map for a table. |
static String |
getUnqualifiedName(String name,
String dbName)
Unqualify a table or column name. |
static List<WhereClausePsPartBuilder> |
getWhereClausePsPartBuilders()
Returns the Builders which are responsible to render single where clause conditions. |
static String |
guessFullTableFromCriteria(Criteria criteria)
Guesses a table name from a criteria by inspecting the first column in the criteria. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
public static final String[] FUNCTION_DELIMITERS
Method Detail |
---|
public static List<WhereClausePsPartBuilder> getWhereClausePsPartBuilders()
@Deprecated public static Query buildQuery(Criteria crit) throws TorqueException
crit
- the criteria to build the query from, not null.
TorqueException
- if an error occurspublic static Query buildQuery(Criteria crit) throws TorqueException
crit
- the criteria to build the query from, not null.
TorqueException
- if an error occurspublic static String getFullTableName(String table, String dbName) throws TorqueException
table
- The table name to use.
If null is passed in, null is returned.dbName
- The name of the database to which this tables belongs.
If null is passed, the default database is used.
TorqueException
- if an error occurspublic static String getUnqualifiedName(String name, String dbName) throws TorqueException
name
- the name to unqualify.
If null is passed in, null is returned.
TorqueException
public static String guessFullTableFromCriteria(Criteria criteria) throws TorqueException
criteria
- the criteria to guess the table name from.
TorqueException
- if the table name cannot be determined.public static TableMap getTableMap(String tableName, String dbName) throws TorqueException
tableName
- the name of the table.dbName
- the name of the database, null for the default db.
TorqueException
- if the database or table is unknown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |