public interface AdminEntityService
| Modifier and Type | Method and Description | 
|---|---|
| PersistenceResponse | add(PersistencePackageRequest request)Thin layer on top of  DynamicEntityService.add(org.broadleafcommerce.openadmin.dto.PersistencePackage)that
 swallows allValidationExceptions that could be thrown and still just returns aPersistenceResponsewith theEntitythat failed validation. | 
| PersistenceResponse | add(PersistencePackageRequest request,
   boolean transactional)Works the same as  add(PersistencePackageRequest)but you can optionally invoke the transactional version
 ofDynamicEntityRemoteService.add(org.broadleafcommerce.openadmin.dto.PersistencePackage)in situations
 where you want to manage the transactions in a parent component | 
| 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 | 
| void | clearEntityManager() | 
| PersistenceResponse | fetch(PersistencePackageRequest request) | 
| PersistenceResponse | getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
                           Entity containingEntity,
                           Property collectionProperty,
                           String collectionItemId,
                           List<SectionCrumb> sectionCrumbs,
                           String alternateId)Gets an Entity representing a specific collection item | 
| PersistenceResponse | getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
                           Entity containingEntity,
                           Property collectionProperty,
                           String collectionItemId,
                           List<SectionCrumb> sectionCrumbs,
                           String alternateId,
                           String[] customCriteria)Gets an Entity representing a specific collection item | 
| Map<String,DynamicResultSet> | getAllRecordsForAllSubCollections(ClassMetadata cmd,
                                 Entity containingEntity,
                                 List<SectionCrumb> sectionCrumb)overloading containing paging parameters | 
| 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 | getForeignEntityName(String owningClass,
                    String id)For the given class (which could be an interface) and id, finds the  AdminMainEntityvalue for the 
 foreign entity | 
| String | getIdProperty(ClassMetadata cmd)Returns the name of the property in this ClassMetadata that has field type set to  SupportedFieldType.ID | 
| PersistenceResponse | getPagedRecordsForCollection(ClassMetadata containingClassMetadata,
                            Entity containingEntity,
                            Property collectionProperty,
                            FilterAndSortCriteria[] fascs,
                            FetchPageRequest fetchPageRequest,
                            String idValueOverride,
                            List<SectionCrumb> sectionCrumbs)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 | 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,
                              Integer startIndex,
                              Integer maxIndex,
                              List<SectionCrumb> sectionCrumb)overloading containing paging parameters | 
| 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() | 
| Map<String,DynamicResultSet> | getRecordsForSelectedTab(ClassMetadata cmd,
                        Entity containingEntity,
                        List<SectionCrumb> sectionCrumb,
                        String currentTabName)Returns all records for selected tab of the specified request and its primary key | 
| PersistencePackageRequest | getRequestForEntityForm(EntityForm entityForm,
                       String[] customCriteria,
                       List<SectionCrumb> sectionCrumbs)Gets the PersistencePackageRequest for the passed in EntityForm | 
| PersistenceResponse | inspect(PersistencePackageRequest request)Thin layer on top of  DynamicEntityService.inspect(org.broadleafcommerce.openadmin.dto.PersistencePackage) | 
| void | populateParentRecordStructure(PersistencePackage persistencePackage,
                             Entity entity,
                             ClassMetadata parentMetadata)Store parent record value, parent metadata to the  PersistencePackage | 
| PersistenceResponse | remove(PersistencePackageRequest request)Thin layer on top of  DynamicEntityService.remove(org.broadleafcommerce.openadmin.dto.PersistencePackage) | 
| PersistenceResponse | remove(PersistencePackageRequest request,
      boolean transactional)Works the same as  remove(PersistencePackageRequest)but you can optionally invoke the transactional version
 ofDynamicEntityRemoteService.remove(org.broadleafcommerce.openadmin.dto.PersistencePackage)in situations
 where you want to manage the transactions in a parent component | 
| 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 | removeSubCollectionEntity(ClassMetadata mainMetadata,
                         Property field,
                         Entity parentEntity,
                         String itemId,
                         String alternateId,
                         String priorKey,
                         List<SectionCrumb> sectionCrumb)Removes the given item from the specified collection. | 
| PersistenceResponse | update(PersistencePackageRequest request)Thin layer on top of  DynamicEntityService.update(org.broadleafcommerce.openadmin.dto.PersistencePackage) | 
| PersistenceResponse | update(PersistencePackageRequest request,
      boolean transactional)Works the same as  update(PersistencePackageRequest)but you can optionally invoke the transactional version
 ofDynamicEntityRemoteService.update(org.broadleafcommerce.openadmin.dto.PersistencePackage)in situations
 where you want to manage the transactions in a parent component | 
| 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 | updateSubCollectionEntity(EntityForm entityForm,
                         ClassMetadata mainMetadata,
                         Property field,
                         Entity parentEntity,
                         String collectionItemId,
                         String alternateId,
                         List<SectionCrumb> sectionCrumb)Updates the specified collection item | 
PersistenceResponse getClassMetadata(PersistencePackageRequest request) throws ServiceException
request - ServiceExceptionPersistenceResponse getRecords(PersistencePackageRequest request) throws ServiceException
request - ServiceExceptionPersistenceResponse 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 entityServiceExceptionPersistenceResponse addEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm - customCriteria - ServiceExceptionPersistenceResponse updateEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm - customCriteria - ServiceExceptionPersistenceResponse removeEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException
entityForm - customCriteria - ServiceExceptionPersistencePackageRequest getRequestForEntityForm(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumbs)
entityForm - customCriteria - sectionCrumbs - PersistenceResponse add(PersistencePackageRequest request) throws ServiceException
DynamicEntityService.add(org.broadleafcommerce.openadmin.dto.PersistencePackage) that
 swallows all ValidationExceptions that could be thrown and still just returns a PersistenceResponse
 with the Entity that failed validation.request - ServiceException - if there were exceptions other than a ValidationException that was thrown as a
 result of the attempted addPersistenceResponse add(PersistencePackageRequest request, boolean transactional) throws ServiceException
add(PersistencePackageRequest) but you can optionally invoke the transactional version
 of DynamicEntityRemoteService.add(org.broadleafcommerce.openadmin.dto.PersistencePackage) in situations
 where you want to manage the transactions in a parent componentrequest - transactional - ServiceExceptionPersistenceResponse update(PersistencePackageRequest request) throws ServiceException
DynamicEntityService.update(org.broadleafcommerce.openadmin.dto.PersistencePackage)request - ServiceException - if there were exceptions other than a ValidationException that was thrown as a
 result of the attempted updatePersistenceResponse update(PersistencePackageRequest request, boolean transactional) throws ServiceException
update(PersistencePackageRequest) but you can optionally invoke the transactional version
 of DynamicEntityRemoteService.update(org.broadleafcommerce.openadmin.dto.PersistencePackage) in situations
 where you want to manage the transactions in a parent componentrequest - transactional - ServiceExceptionPersistenceResponse inspect(PersistencePackageRequest request) throws ServiceException
DynamicEntityService.inspect(org.broadleafcommerce.openadmin.dto.PersistencePackage)request - ServiceExceptionPersistenceResponse remove(PersistencePackageRequest request) throws ServiceException
DynamicEntityService.remove(org.broadleafcommerce.openadmin.dto.PersistencePackage)request - ServiceExceptionPersistenceResponse remove(PersistencePackageRequest request, boolean transactional) throws ServiceException
remove(PersistencePackageRequest) but you can optionally invoke the transactional version
 of DynamicEntityRemoteService.remove(org.broadleafcommerce.openadmin.dto.PersistencePackage) in situations
 where you want to manage the transactions in a parent componentrequest - transactional - ServiceExceptionPersistenceResponse fetch(PersistencePackageRequest request) throws ServiceException
DynamicEntityService.fetch(org.broadleafcommerce.openadmin.dto.PersistencePackage, org.broadleafcommerce.openadmin.dto.CriteriaTransferObject).
 This will glean and create a CriteriaTransferObject from PersistencePackageRequest.getFilterAndSortCriteria()
 to pass to DynamicEntityService.request - ServiceExceptionPersistenceResponse getAdvancedCollectionRecord(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, String collectionItemId, List<SectionCrumb> sectionCrumbs, String alternateId) throws ServiceException
containingClassMetadata - containingEntity - collectionProperty - collectionItemId - ServiceExceptionPersistenceResponse getAdvancedCollectionRecord(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, String collectionItemId, List<SectionCrumb> sectionCrumbs, String alternateId, String[] customCriteria) throws ServiceException
containingClassMetadata - containingEntity - collectionProperty - collectionItemId - customCriteria - ServiceExceptionPersistenceResponse getRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, Integer startIndex, Integer maxIndex, List<SectionCrumb> sectionCrumb) throws ServiceException
containingClassMetadata - containingEntity - collectionProperty - fascs - startIndex - maxIndex - ServiceExceptionPersistenceResponse 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 - ServiceExceptionPersistenceResponse getPagedRecordsForCollection(ClassMetadata containingClassMetadata, Entity containingEntity, Property collectionProperty, FilterAndSortCriteria[] fascs, FetchPageRequest fetchPageRequest, String idValueOverride, List<SectionCrumb> sectionCrumbs) throws ServiceException
#getContextSpecificRelationshipId().
 Also utilizes a FetchPageRequest to encapsulate result set paging configuration, which is needed for
 FetchType.LARGERESULTSET cases, if applicable.containingClassMetadata - containingEntity - collectionProperty - fascs - fetchPageRequest - idValueOverride - sectionCrumbs - ServiceExceptionMap<String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr, Entity containingEntity, List<SectionCrumb> sectionCrumb) throws ServiceException
ppr - containingEntity - ServiceException#getRecordsForCollection(ClassMetadata, String, Property)Map<String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr, Entity containingEntity, Integer startIndex, Integer maxIndex, List<SectionCrumb> sectionCrumb) throws ServiceException
ppr - containingEntity - startIndex - maxIndex - sectionCrumb - ServiceExceptionMap<String,DynamicResultSet> getAllRecordsForAllSubCollections(ClassMetadata cmd, Entity containingEntity, List<SectionCrumb> sectionCrumb) throws ServiceException
cmd - containingEntity - sectionCrumb - ServiceExceptionPersistenceResponse addSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, List<SectionCrumb> sectionCrumb) throws ServiceException, ClassNotFoundException
entityForm - mainMetadata - field - parentEntity - ServiceExceptionClassNotFoundExceptionPersistenceResponse updateSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, String collectionItemId, List<SectionCrumb> sectionCrumb) throws ServiceException, ClassNotFoundException
entityForm - mainMetadata - field - parentEntity - collectionItemId - ServiceExceptionClassNotFoundExceptionPersistenceResponse updateSubCollectionEntity(EntityForm entityForm, ClassMetadata mainMetadata, Property field, Entity parentEntity, String collectionItemId, String alternateId, List<SectionCrumb> sectionCrumb) throws ServiceException, ClassNotFoundException
entityForm - mainMetadata - field - parentEntity - collectionItemId - alternateId - ServiceExceptionClassNotFoundExceptionPersistenceResponse removeSubCollectionEntity(ClassMetadata mainMetadata, Property field, Entity parentEntity, String itemId, String priorKey, List<SectionCrumb> sectionCrumb) throws ServiceException
mainMetadata - field - parentEntity - itemId - priorKey - - only needed for Map type collectionsServiceExceptionPersistenceResponse removeSubCollectionEntity(ClassMetadata mainMetadata, Property field, Entity parentEntity, String itemId, String alternateId, String priorKey, List<SectionCrumb> sectionCrumb) throws ServiceException
mainMetadata - field - parentEntity - itemId - alternateId - 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 - ServiceExceptionString getForeignEntityName(String owningClass, String id)
AdminMainEntity value for the 
 foreign entityowningClass - id - Map<String,DynamicResultSet> getRecordsForSelectedTab(ClassMetadata cmd, Entity containingEntity, List<SectionCrumb> sectionCrumb, String currentTabName) throws ServiceException
cmd - containingEntity - ServiceException#getRecordsForCollection(ClassMetadata, String, Property)void clearEntityManager()
void populateParentRecordStructure(PersistencePackage persistencePackage, Entity entity, ClassMetadata parentMetadata)
PersistencePackagepersistencePackage - entity - parentMetadata - Copyright © 2020. All rights reserved.