use of org.datanucleus.store.rdbms.request.Request in project datanucleus-rdbms by datanucleus.
the class RDBMSPersistenceHandler method getInsertRequest.
/**
* Returns a request object that will insert a row in the given table.
* The store manager will cache the request object for re-use by subsequent requests to the same table.
* @param table The table into which to insert.
* @param cmd ClassMetaData of the object of the request
* @param clr ClassLoader resolver
* @return An insertion request object.
*/
private Request getInsertRequest(DatastoreClass table, AbstractClassMetaData cmd, ClassLoaderResolver clr) {
RequestIdentifier reqID = new RequestIdentifier(table, null, RequestType.INSERT, cmd.getFullClassName());
Request req = requestsByID.get(reqID);
if (req == null) {
req = new InsertRequest(table, cmd, clr);
requestsByID.put(reqID, req);
}
return req;
}
use of org.datanucleus.store.rdbms.request.Request in project datanucleus-rdbms by datanucleus.
the class RDBMSPersistenceHandler method getLocateRequest.
/**
* Returns a request object that will locate a row from the given table.
* The store manager will cache the request object for re-use by subsequent requests to the same table.
* @param table The table from which to locate.
* @param className the class name of the object of the request
* @return A locate request object.
*/
private Request getLocateRequest(DatastoreClass table, String className) {
RequestIdentifier reqID = new RequestIdentifier(table, null, RequestType.LOCATE, className);
Request req = requestsByID.get(reqID);
if (req == null) {
req = new LocateRequest(table);
requestsByID.put(reqID, req);
}
return req;
}
use of org.datanucleus.store.rdbms.request.Request in project datanucleus-rdbms by datanucleus.
the class RDBMSPersistenceHandler method getUpdateRequest.
/**
* Returns a request object that will update a row in the given table.
* The store manager will cache the request object for re-use by subsequent requests to the same table.
* @param table The table in which to update.
* @param mmds The metadata corresponding to the columns to be updated.
* MetaData whose columns exist in supertables will be ignored.
* @param cmd ClassMetaData of the object of the request
* @param clr ClassLoader resolver
* @return An update request object.
*/
private Request getUpdateRequest(DatastoreClass table, AbstractMemberMetaData[] mmds, AbstractClassMetaData cmd, ClassLoaderResolver clr) {
RequestIdentifier reqID = new RequestIdentifier(table, mmds, RequestType.UPDATE, cmd.getFullClassName());
Request req = requestsByID.get(reqID);
if (req == null) {
req = new UpdateRequest(table, mmds, cmd, clr);
requestsByID.put(reqID, req);
}
return req;
}
use of org.datanucleus.store.rdbms.request.Request in project datanucleus-rdbms by datanucleus.
the class RDBMSPersistenceHandler method getFetchRequest.
/**
* Returns a request object that will fetch a row from the given table.
* The store manager will cache the request object for re-use by subsequent requests to the same table.
* @param table The table from which to fetch.
* @param mmds MetaData for the members corresponding to the columns to be fetched.
* @param cmd ClassMetaData of the object of the request
* @param clr ClassLoader resolver
* @return A fetch request object.
*/
private Request getFetchRequest(DatastoreClass table, AbstractMemberMetaData[] mmds, AbstractClassMetaData cmd, ClassLoaderResolver clr) {
RequestIdentifier reqID = new RequestIdentifier(table, mmds, RequestType.FETCH, cmd.getFullClassName());
Request req = requestsByID.get(reqID);
if (req == null) {
req = new FetchRequest(table, mmds, cmd, clr);
requestsByID.put(reqID, req);
}
return req;
}
use of org.datanucleus.store.rdbms.request.Request in project datanucleus-rdbms by datanucleus.
the class RDBMSPersistenceHandler method getDeleteRequest.
/**
* Returns a request object that will delete a row from the given table.
* The store manager will cache the request object for re-use by subsequent requests to the same table.
* @param table The table from which to delete.
* @param acmd ClassMetaData of the object of the request
* @param clr ClassLoader resolver
* @return A deletion request object.
*/
private Request getDeleteRequest(DatastoreClass table, AbstractClassMetaData acmd, ClassLoaderResolver clr) {
RequestIdentifier reqID = new RequestIdentifier(table, null, RequestType.DELETE, acmd.getFullClassName());
Request req = requestsByID.get(reqID);
if (req == null) {
req = new DeleteRequest(table, acmd, clr);
requestsByID.put(reqID, req);
}
return req;
}
Aggregations