Search in sources :

Example 1 with LocateRequest

use of org.datanucleus.store.rdbms.request.LocateRequest 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;
}
Also used : LocateRequest(org.datanucleus.store.rdbms.request.LocateRequest) Request(org.datanucleus.store.rdbms.request.Request) FetchRequest(org.datanucleus.store.rdbms.request.FetchRequest) DeleteRequest(org.datanucleus.store.rdbms.request.DeleteRequest) InsertRequest(org.datanucleus.store.rdbms.request.InsertRequest) LocateBulkRequest(org.datanucleus.store.rdbms.request.LocateBulkRequest) UpdateRequest(org.datanucleus.store.rdbms.request.UpdateRequest) RequestIdentifier(org.datanucleus.store.rdbms.request.RequestIdentifier) LocateRequest(org.datanucleus.store.rdbms.request.LocateRequest)

Aggregations

DeleteRequest (org.datanucleus.store.rdbms.request.DeleteRequest)1 FetchRequest (org.datanucleus.store.rdbms.request.FetchRequest)1 InsertRequest (org.datanucleus.store.rdbms.request.InsertRequest)1 LocateBulkRequest (org.datanucleus.store.rdbms.request.LocateBulkRequest)1 LocateRequest (org.datanucleus.store.rdbms.request.LocateRequest)1 Request (org.datanucleus.store.rdbms.request.Request)1 RequestIdentifier (org.datanucleus.store.rdbms.request.RequestIdentifier)1 UpdateRequest (org.datanucleus.store.rdbms.request.UpdateRequest)1