/** * INTERNAL: * Called when the selection query is being initialize to add the fields for the key to the query */ @Override public void addAdditionalFieldsToQuery(ReadQuery selectionQuery, Expression baseExpression) { keyMapping.addAdditionalFieldsToQuery(selectionQuery, baseExpression); }
/** * Build a clone for the key of a Map represented by this container policy. */ @Override public Object buildCloneForKey(Object key, Object parent, CacheKey parentCacheKey, Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isCacheCheckComplete){ return keyMapping.buildElementClone(key, parent, parentCacheKey, refreshCascade, cloningSession, isExisting, isCacheCheckComplete); }
/** * INTERNAL: * Certain key mappings favor different types of selection query. Return the appropriate * type of selectionQuery. */ @Override public ReadQuery buildSelectionQueryForDirectCollectionMapping(){ ReadQuery query = keyMapping.buildSelectionQueryForDirectCollectionKeyMapping(this); return query; }
/** * Extract the key for the map from the provided row. */ @Override public Object buildKey(AbstractRecord row, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected){ return keyMapping.createMapComponentFromRow(row, query, parentCacheKey, session, isTargetProtected); }
/** * INTERNAL: * Create a query key that links to the map key. */ @Override public QueryKey createQueryKeyForMapKey() { return keyMapping.createQueryKeyForMapKey(); }
/** * Extract the key for the map from the provided row. */ @Override public Object buildKeyFromJoinedRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected){ return keyMapping.createMapComponentFromJoinedRow(row, joinManager, query, parentCacheKey, session, isTargetProtected); }
/** * INTERNAL: * Cascade discover and persist new objects during commit to the map key */ @Override public void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, UnitOfWorkImpl uow, Set cascadeErrors) { keyMapping.cascadeDiscoverAndPersistUnregisteredNewObjects(((Map.Entry)object).getKey(), newObjects, unregisteredExistingObjects, visitedObjects, uow, false, cascadeErrors); }
/** * INTERNAL: * Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping. */ @Override public void cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, Map visitedObjects) { keyMapping.cascadePerformRemoveIfRequired(((Map.Entry)object).getKey(), uow, visitedObjects, false); }
/** * INTERNAL: * Called when the insert query is being initialized to ensure the fields for the key are in the insert query * * @see MappedKeyMapContainerPolicy */ public void addFieldsForMapKey(AbstractRecord joinRow){ if (((DatabaseMapping)keyMapping).isReadOnly()){ return; } keyMapping.addFieldsForMapKey(joinRow); }
/** * INTERNAL: * Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping. */ @Override public void cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, Map visitedObjects) { keyMapping.cascadeRegisterNewIfRequired(((Map.Entry)object).getKey(), uow, visitedObjects, false); }
/** * Extract the key for the map from the provided row. */ @Override public Object buildKey(AbstractRecord row, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected){ return keyMapping.createMapComponentFromRow(row, query, parentCacheKey, session, isTargetProtected); }
/** * INTERNAL: * Create a query key that links to the map key * @return */ public QueryKey createQueryKeyForMapKey(){ return keyMapping.createQueryKeyForMapKey(); }
/** * Extract the key for the map from the provided row. */ @Override public Object buildKeyFromJoinedRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, CacheKey parentCacheKey, AbstractSession session, boolean isTargetProtected){ return keyMapping.createMapComponentFromJoinedRow(row, joinManager, query, parentCacheKey, session, isTargetProtected); }
/** * INTERNAL: * Cascade discover and persist new objects during commit to the map key */ @Override public void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, UnitOfWorkImpl uow, Set cascadeErrors) { keyMapping.cascadeDiscoverAndPersistUnregisteredNewObjects(((Map.Entry)object).getKey(), newObjects, unregisteredExistingObjects, visitedObjects, uow, false, cascadeErrors); }
/** * INTERNAL: * Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping. */ public void cascadePerformRemoveIfRequired(Object object, UnitOfWorkImpl uow, Map visitedObjects) { keyMapping.cascadePerformRemoveIfRequired(((Map.Entry)object).getKey(), uow, visitedObjects, false); }
/** * INTERNAL: * Called when the insert query is being initialized to ensure the fields for the key are in the insert query * * @see MappedKeyMapContainerPolicy */ @Override public void addFieldsForMapKey(AbstractRecord joinRow) { if (((DatabaseMapping)keyMapping).isReadOnly()) { return; } keyMapping.addFieldsForMapKey(joinRow); }
/** * INTERNAL: * Cascade registerNew to any mappings managed by the container policy. This will cascade the register to the key mapping. */ @Override public void cascadeRegisterNewIfRequired(Object object, UnitOfWorkImpl uow, Map visitedObjects) { keyMapping.cascadeRegisterNewIfRequired(((Map.Entry)object).getKey(), uow, visitedObjects, false); }
/** * Extract the key for the map from the provided row * @param row * @param query * @param session * @return */ public Object buildKey(AbstractRecord row, ObjectBuildingQuery query, AbstractSession session){ return keyMapping.createMapComponentFromRow(row, query, session); }
/** * INTERNAL: * Create a query key that links to the map key. */ @Override public QueryKey createQueryKeyForMapKey() { return keyMapping.createQueryKeyForMapKey(); }
/** * Extract the key for the map from the provided row * @param row * @param query * @param session * @return */ public Object buildKeyFromJoinedRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery query, AbstractSession session){ return keyMapping.createMapComponentFromJoinedRow(row, joinManager, query, session); }