Predicate predicate = getQueryRestriction(builder, businessObjectFormatEntity, fileTypeEntity, businessObjectDefinitionEntity, getBusinessObjectFormatKey(businessObjectDataKey), false); predicate = builder.and(predicate, getQueryRestrictionOnPartitionValues(builder, businessObjectDataEntity, businessObjectDataKey));
/** * {@inheritDoc} * <p/> * This method overwrites the base class method by first updating an entity's audit fields if the entity is of type AuditableEntity. */ @Override public <T> T save(T entity) { updateAuditFields(entity); return super.save(entity); }
builder.and(subQueryRestriction, getQueryRestrictionOnPartitionValues(builder, subBusinessObjectDataEntity, businessObjectDataEntity)); getQueryRestrictionOnStorage(builder, subStorageEntity, subStoragePlatformEntity, storageNames, storagePlatformType, excludedStoragePlatformType));
/** * TODO This method may be bdata specific. Consider creating new abstract class to group all bdata related DAO. Builds a query restriction predicate for the * specified business object data entity as per primary and sub-partition values in the business object data key. * * @param builder the criteria builder * @param businessObjectDataEntity the business object data entity that appears in the from clause * @param businessObjectDataKey the business object data key * * @return the query restriction predicate */ protected Predicate getQueryRestrictionOnPartitionValues(CriteriaBuilder builder, From<?, BusinessObjectDataEntity> businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey) { return getQueryRestrictionOnPartitionValues(builder, businessObjectDataEntity, businessObjectDataKey.getPartitionValue(), businessObjectDataKey.getSubPartitionValues()); }
builder.and(subQueryRestriction, getQueryRestrictionOnPartitionValues(builder, subBusinessObjectDataEntity, businessObjectDataEntity)); getQueryRestrictionOnStorage(builder, subStorageEntity, subStoragePlatformEntity, storageNames, storagePlatformType, excludedStoragePlatformType));
/** * TODO This method may be bdata specific. Consider creating new abstract class to group all bdata related DAO. Builds a query restriction predicate for the * specified business object data entity as per primary and sub-partition values in the business object data key. * * @param builder the criteria builder * @param businessObjectDataEntity the business object data entity that appears in the from clause * @param businessObjectDataKey the business object data key * * @return the query restriction predicate */ protected Predicate getQueryRestrictionOnPartitionValues(CriteriaBuilder builder, From<?, BusinessObjectDataEntity> businessObjectDataEntity, BusinessObjectDataKey businessObjectDataKey) { return getQueryRestrictionOnPartitionValues(builder, businessObjectDataEntity, businessObjectDataKey.getPartitionValue(), businessObjectDataKey.getSubPartitionValues()); }
Predicate predicate = getQueryRestriction(builder, businessObjectFormatEntity, fileTypeEntity, businessObjectDefinitionEntity, getBusinessObjectFormatKey(businessObjectDataKey), false); predicate = builder.and(predicate, getQueryRestrictionOnPartitionValues(builder, businessObjectDataEntity, businessObjectDataKey));
/** * {@inheritDoc} * <p/> * This method overwrites the base class method by first updating an entity's audit fields if the entity is of type AuditableEntity. */ @Override public <T> T save(T entity) { updateAuditFields(entity); return super.save(entity); }