public interface AdminEntityService
| Modifier and Type | Method and Description |
|---|---|
Entity |
addEntity(EntityForm entityForm,
String[] customCriteria)
Persists the given entity
|
Entity |
addSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity)
Adds an item into the specified collection
|
Entity |
getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
String collectionItemId)
Gets an Entity representing a specific collection item
|
ClassMetadata |
getClassMetadata(PersistencePackageRequest request)
Returns class metadata for the given request object
|
String |
getContextSpecificRelationshipId(ClassMetadata cmd,
Entity entity,
String propertyName)
Returns the appropriate id to use for the given entity/metadata and prefix when dealing with collections.
|
String |
getIdProperty(ClassMetadata cmd)
Returns the name of the property in this ClassMetadata that has field type set to
SupportedFieldType.ID |
Entity |
getRecord(PersistencePackageRequest request,
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[]
|
Map<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,
Integer startIndex,
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
|
void |
removeEntity(EntityForm entityForm,
String[] customCriteria)
Removes the given entity
|
void |
removeSubCollectionEntity(ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String itemId,
String priorKey)
Removes the given item from the specified collection.
|
Entity |
updateEntity(EntityForm entityForm,
String[] customCriteria)
Updates the given entity
|
Entity |
updateSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String collectionItemId)
Updates the specified collection item
|
ClassMetadata getClassMetadata(PersistencePackageRequest request) throws ServiceException
request - ServiceExceptionDynamicResultSet getRecords(PersistencePackageRequest request) throws ServiceException
request - ServiceExceptionEntity getRecord(PersistencePackageRequest request, String id, ClassMetadata cmd, boolean isCollectionRequest) throws ServiceException
request - id - cmd - isCollectionRequest - whether or not this record request was initiated from a collection on a parent entityServiceExceptionEntity addEntity(EntityForm entityForm, String[] customCriteria) throws ServiceException
entityForm - customCriteria - ServiceExceptionEntity updateEntity(EntityForm entityForm, String[] customCriteria) throws ServiceException
entityForm - customCriteria - ServiceExceptionvoid removeEntity(EntityForm entityForm, String[] customCriteria) throws ServiceException
entityForm - customCriteria - ServiceExceptionEntity getAdvancedCollectionRecord(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, String collectionItemId) throws ServiceException
containingClassMetadata - containingEntity - collectionProperty - collectionItemId - ServiceExceptionDynamicResultSet getRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, Integer startIndex, Integer maxIndex) throws ServiceException
containingClassMetadata - containingEntity - collectionProperty - fascs - startIndex - maxIndex - ServiceExceptionMap<String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr, Entity containingEntity) throws ServiceException
ppr - containingEntity - ServiceException#getRecordsForCollection(ClassMetadata, String, Property)Entity addSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity) throws ServiceException, ClassNotFoundException
entityForm - mainMetadata - field - parentEntity - ServiceExceptionClassNotFoundExceptionEntity updateSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, String collectionItemId) throws ServiceException, ClassNotFoundException
entityForm - mainMetadata - field - parentEntity - collectionItemId - ServiceExceptionClassNotFoundExceptionvoid removeSubCollectionEntity(ClassMetadata mainMetadata, Property field, Entity parentEntity, String itemId, String priorKey) throws ServiceException
mainMetadata - field - parentId - itemId - priorKey - - only needed for Map type collectionsServiceExceptionString getContextSpecificRelationshipId(ClassMetadata cmd, Entity entity, String propertyName)
cmd - entity - propertyName - String getIdProperty(ClassMetadata cmd) throws ServiceException
SupportedFieldType.IDcmd - ServiceExceptionCopyright © 2017. All Rights Reserved.