|
Oracle Application Server TopLink API Reference 10g Release 2 (10.1.2) B15903-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.toplink.publicinterface.DescriptorQueryManager
Purpose: The query manager allows for the database opperations that TopLink performs to be customized by the application. For each descriptor a query can be given that controls how a operation will occur. A common example is if the application requires a stored procedure to be used to insert the object, it can override the SQL call in the insert query that TopLink will use to insert the object. Queries can be customized to extend TopLink behavior, access non-relational data or use stored procedures or customized SQL calls.
The queries that can be customized include:
Descriptor
, Serialized FormMethod Summary | |
void |
addQuery(DatabaseQuery query) PUBLIC: Add the query to the session queries |
void |
addQuery(java.lang.String name, DatabaseQuery query) PUBLIC: Add the query to the descriptor queries with the given name |
void |
assumeExistenceForDoesExist() PUBLIC: Assume that if the objects primary key does not include null then it must exist. |
void |
assumeNonExistenceForDoesExist() PUBLIC: Assume that the object does not exist. |
void |
checkCacheForDoesExist() PUBLIC: Default behavior. |
void |
checkDatabaseForDoesExist() PUBLIC: Perform does exist check on the database |
boolean |
containsQuery(java.lang.String queryName) PUBLIC: Return true if the query is defined on the session |
Expression |
getAdditionalJoinExpression() PUBLIC: Returns the join expression that should be appended to all of the descriptors expressions Contains any multiple table or inheritance dependencies |
java.util.Vector |
getAllQueries() PUBLIC: Return the pre-defined queries for the descriptor. |
DeleteObjectQuery |
getDeleteQuery() PUBLIC: Return the receiver's delete query. |
java.lang.String |
getDeleteSQLString() PUBLIC: Return the receiver's delete SQL string. |
DoesExistQuery |
getDoesExistQuery() PUBLIC: Return the receiver's does exist query. |
java.lang.String |
getDoesExistSQLString() PUBLIC: Return the receiver's does exist SQL string. |
InsertObjectQuery |
getInsertQuery() PUBLIC: Return the receiver's insert query. |
java.lang.String |
getInsertSQLString() PUBLIC: Return the receiver's insert SQL string. |
Expression |
getMultipleTableJoinExpression() PUBLIC: This is normally generated for descriptors that have multiple tables. |
java.util.Hashtable |
getQueries() PUBLIC: Return the pre-defined queries for the descriptor. |
DatabaseQuery |
getQuery(java.lang.String queryName) PUBLIC: Return the query name from the set of pre-defined queries If only one query exists with this name, it will be returned. |
DatabaseQuery |
getQuery(java.lang.String name, java.util.Vector arguments) PUBLIC: Return the query from the set of pre-defined queries with the given name and argument types. |
ReadAllQuery |
getReadAllQuery() PUBLIC: Return the receiver's read query. |
java.lang.String |
getReadAllSQLString() PUBLIC: Return the receiver's read SQL string. |
ReadObjectQuery |
getReadObjectQuery() PUBLIC: Return the receiver's read query. |
java.lang.String |
getReadObjectSQLString() PUBLIC: Return the receiver's read SQL string. |
UpdateObjectQuery |
getUpdateQuery() PUBLIC: Return the receiver's update query. |
java.lang.String |
getUpdateSQLString() PUBLIC: Return the receiver's update SQL string. |
void |
removeQuery(java.lang.String queryName) PUBLIC: Remove all queries with the given query name from the set of pre-defined queries |
void |
removeQuery(java.lang.String queryName, java.util.Vector argumentTypes) PUBLIC: Remove the specific query with the given queryName and argumentTypes. |
void |
setAdditionalJoinExpression(Expression additionalJoinExpression) PUBLIC: Set the additional join expression. |
void |
setDeleteQuery(DeleteObjectQuery query) PUBLIC: Set the receiver's delete query. |
void |
setDeleteSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's delete SQL string. |
void |
setDoesExistQuery(DoesExistQuery query) PUBLIC: Set the receiver's does exist query. |
void |
setDoesExistSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's does exist SQL string. |
void |
setInsertQuery(InsertObjectQuery insertQuery) PUBLIC: Set the receiver's insert query. |
void |
setInsertSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's insert SQL string. |
void |
setMultipleTableJoinExpression(Expression multipleTableJoinExpression) PUBLIC: This is normally generated for descriptors that have multiple tables. |
void |
setQueries(java.util.Hashtable hashtable) PUBLIC: set the pre-defined queries for the descriptor. |
void |
setReadAllQuery(ReadAllQuery query) PUBLIC: Set the receiver's read all query. |
void |
setReadAllSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's read SQL string. |
void |
setReadObjectQuery(ReadObjectQuery query) PUBLIC: Set the receiver's read query. |
void |
setReadObjectSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's read SQL string. |
void |
setUpdateQuery(UpdateObjectQuery updateQuery) PUBLIC: Set the receiver's update query. |
void |
setUpdateSQLString(java.lang.String sqlString) PUBLIC: Set the receiver's update SQL string. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void addQuery(java.lang.String name, DatabaseQuery query)
name
- This is the name of the query. It will be set on the query and used to look it up.query
- This is the query that will be added. If the query being added has parameters, the existing list of queries will be checked for matching queries. If a matching query exists, it will be replaced.public void addQuery(DatabaseQuery query)
query
- DatabaseQuery This is the query that will be added. If the query being added has parameters, the existing list of queries will be checked for matching queries. If a matching query exists, it will be replaced.public void assumeExistenceForDoesExist()
public void assumeNonExistenceForDoesExist()
public void checkCacheForDoesExist()
public void checkDatabaseForDoesExist()
public boolean containsQuery(java.lang.String queryName)
public Expression getAdditionalJoinExpression()
public DeleteObjectQuery getDeleteQuery()
public java.lang.String getDeleteSQLString()
Example, "delete from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID".
public DoesExistQuery getDoesExistQuery()
public java.lang.String getDoesExistSQLString()
Example, "select EMPLOYEE_ID from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID".
public InsertObjectQuery getInsertQuery()
public java.lang.String getInsertSQLString()
Example, "insert into EMPLOYEE (F_NAME, L_NAME) values (#F_NAME, #L_NAME)".
public Expression getMultipleTableJoinExpression()
public java.util.Hashtable getQueries()
getAllQueries()
public java.util.Vector getAllQueries()
getQueries()
public void setQueries(java.util.Hashtable hashtable)
public DatabaseQuery getQuery(java.lang.String queryName)
getQuery(String, Vector)
public DatabaseQuery getQuery(java.lang.String name, java.util.Vector arguments)
getQuery(String)
public ReadAllQuery getReadAllQuery()
public java.lang.String getReadAllSQLString()
Example, "select * from EMPLOYEE"
public ReadObjectQuery getReadObjectQuery()
public java.lang.String getReadObjectSQLString()
Example, "select * from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID"
public UpdateObjectQuery getUpdateQuery()
public java.lang.String getUpdateSQLString()
Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID".
public void removeQuery(java.lang.String queryName)
removeQuery(String, Vector)
public void removeQuery(java.lang.String queryName, java.util.Vector argumentTypes)
removeQuery(String)
public void setAdditionalJoinExpression(Expression additionalJoinExpression)
public void setDeleteQuery(DeleteObjectQuery query)
public void setDeleteSQLString(java.lang.String sqlString)
Example, "delete from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID".
public void setDoesExistQuery(DoesExistQuery query)
public void setDoesExistSQLString(java.lang.String sqlString)
Example, "select EMPLOYEE_ID from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID".
public void setInsertQuery(InsertObjectQuery insertQuery)
public void setInsertSQLString(java.lang.String sqlString)
Example, "insert into EMPLOYEE (F_NAME, L_NAME) values (#F_NAME, #L_NAME)".
public void setMultipleTableJoinExpression(Expression multipleTableJoinExpression)
public void setReadAllQuery(ReadAllQuery query)
public void setReadAllSQLString(java.lang.String sqlString)
Example, "select * from EMPLOYEE"
public void setReadObjectQuery(ReadObjectQuery query)
public void setReadObjectSQLString(java.lang.String sqlString)
Example, "select * from EMPLOYEE where EMPLOYEE_ID = #EMPLOYEE_ID"
public void setUpdateQuery(UpdateObjectQuery updateQuery)
public void setUpdateSQLString(java.lang.String sqlString)
Example, "update EMPLOYEE set F_NAME to #F_NAME, L_NAME to #L_NAME where EMPLOYEE_ID = #EMPLOYEE_ID".
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |