|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectavignon.handlers.database.DLookupQuery
Helper class for looking up a single value in a table or view.
| Field Summary | |
protected java.lang.String |
fieldName
|
protected java.lang.String |
tableName
|
protected java.lang.String |
whereCondition
|
| Constructor Summary | |
DLookupQuery(java.lang.String tableName,
java.lang.String fieldName)
Constructs a query that assumes that there will be only one row in the given table/view or that the row is not significant to the result. |
|
DLookupQuery(java.lang.String tableName,
java.lang.String fieldName,
java.lang.String whereCondition)
Constructs a query that will lookup a particular value in a table/view based on the given where condition. |
|
| Method Summary | |
java.lang.Object |
getObject(java.sql.Connection database)
Executes the query against the given database. |
protected java.lang.String |
getWhereClause()
Returns the empty string if no where condition has been specified, otherwise returns WHERE followed by the where condition. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String tableName
protected java.lang.String fieldName
protected java.lang.String whereCondition
| Constructor Detail |
public DLookupQuery(java.lang.String tableName,
java.lang.String fieldName)
tableName - Table or view in which the query will be run.fieldName - Name of the field to return.
public DLookupQuery(java.lang.String tableName,
java.lang.String fieldName,
java.lang.String whereCondition)
tableName - fieldName - whereCondition - | Method Detail |
public java.lang.String toString()
public java.lang.Object getObject(java.sql.Connection database)
throws java.sql.SQLException
database -
java.sql.SQLExceptionprotected java.lang.String getWhereClause()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||