|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.cortex.PropertyList atg.cortex.ResultSetProcessor atg.cortex.Query
public class Query
A Query is a subclass of ResultSetProcessor that can help construct SQL select statements. When constructing the Query, the Query should be created by adding a set of PropertyColumn objects, which map bean properties to table columns. The query can then construct a "SELECT {columns} FROM {tables}" statement. The application can modify this statement to add appropriate "WHERE" clauses. The ResultSet from the statement can then be processed by calling processResultSet.
Note that there are no restrictions on the property to column mappings. One column can map to several properties, and one property can map to several columsn. The properties can span multiple classes, and the columns can span multiple tables.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Constructor Summary | |
---|---|
Query()
Constructs a new Query |
Method Summary | |
---|---|
void |
addColumnProperties(ColumnProperty[] pProperties)
Adds a list of properties. |
void |
addColumnProperty(ColumnProperty pProperty)
Adds a new ColumnProperty to the list of properties. |
ColumnProperty[] |
getColumnProperties()
Returns the list of ColumnProperties as an array |
ColumnProperty |
getColumnProperty(int pIndex)
Returns the ColumnProperty at the given index |
int |
getColumnPropertyCount()
Returns the number of ColumnProperty objects in the list |
java.lang.String |
getSelectStatement()
Returns the "SELECT {columns} FROM {tables}" statement corresponding to the tables and columns referenced by the PropertyColumns added to this Query. |
java.lang.String |
getTableName()
Returns the table name referenced by the property columns. |
java.lang.String[] |
getTableNames()
Returns the list of tables referenced by the columns added to the Query. |
Methods inherited from class atg.cortex.ResultSetProcessor |
---|
processResultSet, processResultSet, processResultSetRow, processResultSetRow, processResultSetRow |
Methods inherited from class atg.cortex.PropertyList |
---|
addProperties, addProperty, getBeanClass, getBeanClasses, getClassProperties, getProperties, getProperty, getPropertyCount, getPropertyToClassTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public Query()
Method Detail |
---|
public void addColumnProperty(ColumnProperty pProperty)
public void addColumnProperties(ColumnProperty[] pProperties)
public int getColumnPropertyCount()
public ColumnProperty getColumnProperty(int pIndex)
public ColumnProperty[] getColumnProperties()
public java.lang.String[] getTableNames()
public java.lang.String getTableName()
public java.lang.String getSelectStatement()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |