/** * INTERNAL: * Possible for future development, not currently supported. * * 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. */ protected Object batchedValueFromRow(AbstractRecord row, ReadAllQuery query) { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Extract the source primary key value from the target row. * Used for batch reading, most following same order and fields as in the mapping. * The method should be overridden by classes that support batch reading. */ protected Object extractKeyFromTargetRow(AbstractRecord row, AbstractSession session) { throw QueryException.batchReadingNotSupported(this, null); }
/** * INTERNAL: * Prepare and execute the batch query and store the * results for each source object in a map keyed by the * mappings source keys of the source objects. */ protected void executeBatchQuery(DatabaseQuery query, CacheKey parentCacheKey, Map referenceObjectsByKey, AbstractSession session, AbstractRecord row) { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Extract the source primary key value from the target row. * Used for batch reading, most following same order and fields as in the mapping. * The method should be overridden by classes that support batch reading. */ protected Object extractKeyFromTargetRow(AbstractRecord row, AbstractSession session) { throw QueryException.batchReadingNotSupported(this, null); }
/** * INTERNAL: * Possible for future development, not currently supported. * * 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, ObjectLevelReadQuery query, CacheKey parentCacheKey) { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Extract the value from the batch optimized query, this should be supported by most query types. */ public Object extractResultFromBatchQuery(DatabaseQuery query, AbstractRecord Record, AbstractSession session, AbstractRecord argumentRow) throws QueryException { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Possible for future development, not currently supported. * * 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, ObjectLevelReadQuery query, CacheKey parentCacheKey) { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Extract the batch key value from the source row. * Used for batch reading, most following same order and fields as in the mapping. * The method should be overridden by classes that support batch reading. */ protected Object extractBatchKeyFromRow(AbstractRecord targetRow, AbstractSession session) { throw QueryException.batchReadingNotSupported(this, null); }
/** * INTERNAL: * Return the selection criteria used to IN batch fetching. */ protected Expression buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query) { throw QueryException.batchReadingNotSupported(this, null); }
/** * INTERNAL: * Extract the batch key value from the source row. * Used for batch reading, most following same order and fields as in the mapping. * The method should be overridden by classes that support batch reading. */ protected Object extractBatchKeyFromRow(AbstractRecord targetRow, AbstractSession session) { throw QueryException.batchReadingNotSupported(this, null); }
/** * INTERNAL: * Prepare and execute the batch query and store the * results for each source object in a map keyed by the * mappings source keys of the source objects. */ protected void executeBatchQuery(DatabaseQuery query, CacheKey parentCacheKey, Map referenceObjectsByKey, AbstractSession session, AbstractRecord row) { throw QueryException.batchReadingNotSupported(this, query); }
/** * INTERNAL: * Return the selection criteria used to IN batch fetching. */ protected Expression buildBatchCriteria(ExpressionBuilder builder, ObjectLevelReadQuery query) { throw QueryException.batchReadingNotSupported(this, null); }
/** * PUBLIC: * Specify the foreign-reference mapped attribute to be optimized in this query. * The query will execute normally, however when any of the batched parts is accessed, * the parts will all be read in a single query, * this allows all of the data required for the parts to be read in a single query instead of (n) queries. * This should be used when the application knows that it requires the part for all of the objects being read. * This can be used for one-to-one, one-to-many, many-to-many and direct collection mappings. * * The use of the expression allows for nested batch reading to be expressed. * <p>Example: query.addBatchReadAttribute(query.getExpressionBuilder().get("policies").get("claims")) * * @see #setBatchFetchType(BatchFetchType) * @see ObjectLevelReadQuery#addJoinedAttribute(String) */ public void addBatchReadAttribute(Expression attributeExpression) { if (! getQueryMechanism().isExpressionQueryMechanism()){ throw QueryException.batchReadingNotSupported(this); } getBatchReadAttributeExpressions().add(attributeExpression); setIsPrepared(false); }
/** * PUBLIC: * Specify the foreign-reference mapped attribute to be optimized in this query. * The query will execute normally, however when any of the batched parts is accessed, * the parts will all be read in a single query, * this allows all of the data required for the parts to be read in a single query instead of (n) queries. * This should be used when the application knows that it requires the part for all of the objects being read. * This can be used for one-to-one, one-to-many, many-to-many and direct collection mappings. * * The use of the expression allows for nested batch reading to be expressed. * <p>Example: query.addBatchReadAttribute(query.getExpressionBuilder().get("policies").get("claims")) * * @see #setBatchFetchType(BatchFetchType) * @see ObjectLevelReadQuery#addJoinedAttribute(String) */ public void addBatchReadAttribute(Expression attributeExpression) { if (! getQueryMechanism().isExpressionQueryMechanism()){ throw QueryException.batchReadingNotSupported(this); } getBatchReadAttributeExpressions().add(attributeExpression); setIsPrepared(false); }
/** * PUBLIC: * Specify the foreign-reference mapped attribute to be optimized in this query. * The query will execute normally, however when any of the batched parts is accessed, * the parts will all be read in a single query, * this allows all of the data required for the parts to be read in a single query instead of (n) queries. * This should be used when the application knows that it requires the part for all of the objects being read. * This can be used for one-to-one, one-to-many, many-to-many and direct collection mappings. * * The use of the expression allows for nested batch reading to be expressed. * <p>Example: query.addBatchReadAttribute("phoneNumbers") * * @see #addBatchReadAttribute(Expression) * @see ObjectLevelReadQuery#addJoinedAttribute(String) */ public void addBatchReadAttribute(String attributeName) { if (! getQueryMechanism().isExpressionQueryMechanism()){ throw QueryException.batchReadingNotSupported(this); } getBatchReadAttributeExpressions().add(getExpressionBuilder().get(attributeName)); }