public interface AdminEntityService
Modifier and Type | Method and Description |
---|---|
PersistenceResponse |
addEntity(EntityForm entityForm,
String[] customCriteria,
List<SectionCrumb> sectionCrumb)
Persists the given entity
|
PersistenceResponse |
addSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
List<SectionCrumb> sectionCrumb)
Adds an item into the specified collection
|
PersistenceResponse |
getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
String collectionItemId,
List<SectionCrumb> sectionCrumb)
Gets an Entity representing a specific collection item
|
PersistenceResponse |
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 |
PersistenceResponse |
getRecord(PersistencePackageRequest request,
String id,
ClassMetadata cmd,
boolean isCollectionRequest)
Returns a specific record for the given request and primary key id/property
|
PersistenceResponse |
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,
List<SectionCrumb> sectionCrumb)
Returns all records for all subcollections of the specified request and its primary key
|
PersistenceResponse |
getRecordsForCollection(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
FilterAndSortCriteria[] fascs,
Integer startIndex,
Integer maxIndex,
List<SectionCrumb> sectionCrumb)
Returns the DynamicResultSet representing the records that belong to the specified collectionProperty for the
given containingClass and the primary key for the containingClass
|
PersistenceResponse |
getRecordsForCollection(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
FilterAndSortCriteria[] fascs,
Integer startIndex,
Integer maxIndex,
String idValueOverride,
List<SectionCrumb> sectionCrumb)
The same as the other getRecordsForCollection method, except that this one expects allow the caller to explicitly
set the id value that will be used in the fetch instead of delegating to
#getContextSpecificRelationshipId() |
PersistenceResponse |
removeEntity(EntityForm entityForm,
String[] customCriteria,
List<SectionCrumb> sectionCrumb)
Removes the given entity
|
PersistenceResponse |
removeSubCollectionEntity(ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String itemId,
String priorKey,
List<SectionCrumb> sectionCrumb)
Removes the given item from the specified collection.
|
PersistenceResponse |
updateEntity(EntityForm entityForm,
String[] customCriteria,
List<SectionCrumb> sectionCrumb)
Updates the given entity
|
PersistenceResponse |
updateSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String collectionItemId,
List<SectionCrumb> sectionCrumb)
Updates the specified collection item
|
PersistenceResponse getClassMetadata(PersistencePackageRequest request) throws ServiceException
request
- ServiceException
PersistenceResponse getRecords(PersistencePackageRequest request) throws ServiceException
request
- ServiceException
PersistenceResponse 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 entityServiceException
PersistenceResponse addEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm
- customCriteria
- ServiceException
PersistenceResponse updateEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm
- customCriteria
- ServiceException
PersistenceResponse removeEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm
- customCriteria
- ServiceException
PersistenceResponse getAdvancedCollectionRecord(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, String collectionItemId, List<SectionCrumb> sectionCrumb) throws ServiceException
containingClassMetadata
- containingEntity
- collectionProperty
- collectionItemId
- ServiceException
PersistenceResponse getRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, Integer startIndex, Integer maxIndex, List<SectionCrumb> sectionCrumb) throws ServiceException
containingClassMetadata
- containingEntity
- collectionProperty
- fascs
- startIndex
- maxIndex
- ServiceException
PersistenceResponse getRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, Integer startIndex, Integer maxIndex, String idValueOverride, List<SectionCrumb> sectionCrumb) throws ServiceException
#getContextSpecificRelationshipId()
containingClassMetadata
- containingEntity
- collectionProperty
- fascs
- startIndex
- maxIndex
- idValueOverride
- ServiceException
Map<String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr, Entity containingEntity, List<SectionCrumb> sectionCrumb) throws ServiceException
ppr
- containingEntity
- ServiceException
#getRecordsForCollection(ClassMetadata, String, Property)
PersistenceResponse addSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, List<SectionCrumb> sectionCrumb) throws ServiceException, ClassNotFoundException
entityForm
- mainMetadata
- field
- parentEntity
- ServiceException
ClassNotFoundException
PersistenceResponse updateSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, String collectionItemId, List<SectionCrumb> sectionCrumb) throws ServiceException, ClassNotFoundException
entityForm
- mainMetadata
- field
- parentEntity
- collectionItemId
- ServiceException
ClassNotFoundException
PersistenceResponse removeSubCollectionEntity(ClassMetadata mainMetadata, Property field, Entity parentEntity, String itemId, String priorKey, List<SectionCrumb> sectionCrumb) throws ServiceException
mainMetadata
- field
- parentId
- itemId
- priorKey
- - only needed for Map type collectionsServiceException
String getContextSpecificRelationshipId(ClassMetadata cmd, Entity entity, String propertyName)
cmd
- entity
- propertyName
- String getIdProperty(ClassMetadata cmd) throws ServiceException
SupportedFieldType.ID
cmd
- ServiceException
Copyright © 2014. All rights reserved.