@Service(value="blAdminEntityService") public class AdminEntityServiceImpl extends java.lang.Object implements AdminEntityService
| Modifier and Type | Field and Description |
|---|---|
protected PersistencePackageFactory |
persistencePackageFactory |
protected DynamicEntityService |
service |
| Constructor and Description |
|---|
AdminEntityServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Entity |
add(PersistencePackageRequest request) |
Entity |
addEntity(EntityForm entityForm,
java.lang.String[] customCriteria)
Persists the given entity
|
Entity |
addSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity)
Adds an item into the specified collection
|
protected DynamicResultSet |
fetch(PersistencePackageRequest request) |
Entity |
getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
java.lang.String collectionItemId)
Gets an Entity representing a specific collection item
|
ClassMetadata |
getClassMetadata(PersistencePackageRequest request)
Returns class metadata for the given request object
|
java.lang.String |
getContextSpecificRelationshipId(ClassMetadata cmd,
Entity entity,
java.lang.String propertyName)
Returns the appropriate id to use for the given entity/metadata and prefix when dealing with collections.
|
protected CriteriaTransferObject |
getDefaultCto() |
java.lang.String |
getIdProperty(ClassMetadata cmd)
Returns the name of the property in this ClassMetadata that has field type set to
SupportedFieldType.ID |
protected java.util.List<Property> |
getPropertiesFromEntityForm(EntityForm entityForm) |
Entity |
getRecord(PersistencePackageRequest request,
java.lang.String id,
ClassMetadata cmd,
boolean isCollectionRequest)
Returns a specific record for the given request and primary key id/property
|
DynamicResultSet |
getRecords(PersistencePackageRequest request)
Returns the DynamicResultSet containing the total records for the query and the currently fetched Entity[]
|
java.util.Map<java.lang.String,DynamicResultSet> |
getRecordsForAllSubCollections(PersistencePackageRequest ppr,
Entity containingEntity)
Returns all records for all subcollections of the specified request and its primary key
|
DynamicResultSet |
getRecordsForCollection(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
FilterAndSortCriteria[] fascs,
java.lang.Integer startIndex,
java.lang.Integer maxIndex)
Returns the DynamicResultSet representing the records that belong to the specified collectionProperty for the
given containingClass and the primary key for the containingClass
|
protected PersistencePackageRequest |
getRequestForEntityForm(EntityForm entityForm,
java.lang.String[] customCriteria) |
protected DynamicResultSet |
inspect(PersistencePackageRequest request) |
protected void |
remove(PersistencePackageRequest request) |
void |
removeEntity(EntityForm entityForm,
java.lang.String[] customCriteria)
Removes the given entity
|
void |
removeSubCollectionEntity(ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
java.lang.String itemId,
java.lang.String priorKey)
Removes the given item from the specified collection.
|
protected Entity |
update(PersistencePackageRequest request) |
Entity |
updateEntity(EntityForm entityForm,
java.lang.String[] customCriteria)
Updates the given entity
|
Entity |
updateSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
java.lang.String collectionItemId)
Updates the specified collection item
|
protected DynamicEntityService service
protected PersistencePackageFactory persistencePackageFactory
public ClassMetadata getClassMetadata(PersistencePackageRequest request) throws ServiceException
AdminEntityServicegetClassMetadata in interface AdminEntityServiceServiceExceptionpublic DynamicResultSet getRecords(PersistencePackageRequest request) throws ServiceException
AdminEntityServicegetRecords in interface AdminEntityServiceServiceExceptionpublic Entity getRecord(PersistencePackageRequest request, java.lang.String id, ClassMetadata cmd, boolean isCollectionRequest) throws ServiceException
AdminEntityServicegetRecord in interface AdminEntityServiceisCollectionRequest - whether or not this record request was initiated from a collection on a parent entityServiceExceptionpublic Entity addEntity(EntityForm entityForm, java.lang.String[] customCriteria) throws ServiceException
AdminEntityServiceaddEntity in interface AdminEntityServiceServiceException@Transactional(value="blTransactionManager") public Entity updateEntity(EntityForm entityForm, java.lang.String[] customCriteria) throws ServiceException
AdminEntityServiceupdateEntity in interface AdminEntityServiceServiceExceptionpublic void removeEntity(EntityForm entityForm, java.lang.String[] customCriteria) throws ServiceException
AdminEntityServiceremoveEntity in interface AdminEntityServiceServiceExceptionprotected java.util.List<Property> getPropertiesFromEntityForm(EntityForm entityForm)
protected PersistencePackageRequest getRequestForEntityForm(EntityForm entityForm, java.lang.String[] customCriteria)
public Entity getAdvancedCollectionRecord(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, java.lang.String collectionItemId) throws ServiceException
AdminEntityServicegetAdvancedCollectionRecord in interface AdminEntityServiceServiceExceptionpublic DynamicResultSet getRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, java.lang.Integer startIndex, java.lang.Integer maxIndex) throws ServiceException
AdminEntityServicegetRecordsForCollection in interface AdminEntityServiceServiceExceptionpublic java.util.Map<java.lang.String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr, Entity containingEntity) throws ServiceException
AdminEntityServicegetRecordsForAllSubCollections in interface AdminEntityServiceServiceException#getRecordsForCollection(ClassMetadata, String, Property)public Entity addSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity) throws ServiceException, java.lang.ClassNotFoundException
AdminEntityServiceaddSubCollectionEntity in interface AdminEntityServiceServiceExceptionjava.lang.ClassNotFoundExceptionpublic Entity updateSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, java.lang.String collectionItemId) throws ServiceException, java.lang.ClassNotFoundException
AdminEntityServiceupdateSubCollectionEntity in interface AdminEntityServiceServiceExceptionjava.lang.ClassNotFoundExceptionpublic void removeSubCollectionEntity(ClassMetadata mainMetadata, Property field, Entity parentEntity, java.lang.String itemId, java.lang.String priorKey) throws ServiceException
AdminEntityServiceremoveSubCollectionEntity in interface AdminEntityServicepriorKey - - only needed for Map type collectionsServiceExceptionpublic java.lang.String getContextSpecificRelationshipId(ClassMetadata cmd, Entity entity, java.lang.String propertyName)
AdminEntityServicegetContextSpecificRelationshipId in interface AdminEntityServicepublic java.lang.String getIdProperty(ClassMetadata cmd) throws ServiceException
AdminEntityServiceSupportedFieldType.IDgetIdProperty in interface AdminEntityServiceServiceExceptionprotected Entity add(PersistencePackageRequest request) throws ServiceException
ServiceExceptionprotected Entity update(PersistencePackageRequest request) throws ServiceException
ServiceExceptionprotected DynamicResultSet inspect(PersistencePackageRequest request) throws ServiceException
ServiceExceptionprotected void remove(PersistencePackageRequest request) throws ServiceException
ServiceExceptionprotected DynamicResultSet fetch(PersistencePackageRequest request) throws ServiceException
ServiceExceptionprotected CriteriaTransferObject getDefaultCto()
Copyright © 2018. All Rights Reserved.