/** * INTERNAL: Return the lowlevel database accessor. The database accessor is used for direct * database access. The right accessor for this broker will be returned. */ public Accessor getAccessor(Class domainClass) { if (domainClass == null) { // CR#... this occurs if a data query is used without a session-name, needs to throw an error throw QueryException.unnamedQueryOnSessionBroker(null); } // session may be a broker too. Eventually a non session broker wil be found return getSessionForClass(domainClass).getAccessor(domainClass); }
/** INTERNAL: Answers the session to be used for the given query. */ protected AbstractSession getSessionForQuery(DatabaseQuery query) { if (query.hasSessionName()) { return getSessionForName(query.getSessionName()); } Class queryClass; if (query.getDescriptor() != null) { queryClass = query.getDescriptor().getJavaClass(); } else { queryClass = query.getReferenceClass(); if (queryClass == null) { throw QueryException.unnamedQueryOnSessionBroker(query); } } return getSessionForClass(queryClass); }
/** * INTERNAL: Possible for future development, not currently supported. * * <p>Retrieve the value through using batch reading. This executes a single query to read the * target for all of the objects and stores the result of the batch query in the original query to * allow the other objects to share the results. */ @Override protected Object batchedValueFromRow(AbstractRecord row, ReadAllQuery query) { throw QueryException.batchReadingNotSupported(this, query); }