|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.openadmin.server.service.AdminEntityServiceImpl
@Service(value="blAdminEntityService") public class AdminEntityServiceImpl
| Field Summary | |
|---|---|
protected DynamicDaoHelper |
dynamicDaoHelper
|
protected javax.persistence.EntityManager |
em
|
protected EntityConfiguration |
entityConfiguration
|
protected PersistencePackageFactory |
persistencePackageFactory
|
protected DynamicEntityService |
service
|
| Constructor Summary | |
|---|---|
AdminEntityServiceImpl()
|
|
| Method Summary | |
|---|---|
protected PersistenceResponse |
add(PersistencePackageRequest request)
|
PersistenceResponse |
addEntity(EntityForm entityForm,
String[] customCriteria)
Persists the given entity |
PersistenceResponse |
addSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity)
Adds an item into the specified collection |
protected PersistenceResponse |
fetch(PersistencePackageRequest request)
|
PersistenceResponse |
getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
String collectionItemId)
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. |
protected CriteriaTransferObject |
getDefaultCto()
|
String |
getIdProperty(ClassMetadata cmd)
Returns the name of the property in this ClassMetadata that has field type set to SupportedFieldType.ID |
protected List<Property> |
getPropertiesFromEntityForm(EntityForm entityForm)
|
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)
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)
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)
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() |
protected PersistencePackageRequest |
getRequestForEntityForm(EntityForm entityForm,
String[] customCriteria)
|
protected PersistenceResponse |
inspect(PersistencePackageRequest request)
|
protected PersistenceResponse |
remove(PersistencePackageRequest request)
|
PersistenceResponse |
removeEntity(EntityForm entityForm,
String[] customCriteria)
Removes the given entity |
PersistenceResponse |
removeSubCollectionEntity(ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String itemId,
String priorKey)
Removes the given item from the specified collection. |
protected PersistenceResponse |
update(PersistencePackageRequest request)
|
PersistenceResponse |
updateEntity(EntityForm entityForm,
String[] customCriteria)
Updates the given entity |
PersistenceResponse |
updateSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String collectionItemId)
Updates the specified collection item |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DynamicEntityService service
protected PersistencePackageFactory persistencePackageFactory
protected javax.persistence.EntityManager em
protected EntityConfiguration entityConfiguration
protected DynamicDaoHelper dynamicDaoHelper
| Constructor Detail |
|---|
public AdminEntityServiceImpl()
| Method Detail |
|---|
public PersistenceResponse getClassMetadata(PersistencePackageRequest request)
throws ServiceException
AdminEntityService
getClassMetadata in interface AdminEntityServiceServiceException
public PersistenceResponse getRecords(PersistencePackageRequest request)
throws ServiceException
AdminEntityService
getRecords in interface AdminEntityServiceServiceException
public PersistenceResponse getRecord(PersistencePackageRequest request,
String id,
ClassMetadata cmd,
boolean isCollectionRequest)
throws ServiceException
AdminEntityService
getRecord in interface AdminEntityServiceisCollectionRequest - whether or not this record request was initiated from a collection on a parent entity
ServiceException
public PersistenceResponse addEntity(EntityForm entityForm,
String[] customCriteria)
throws ServiceException
AdminEntityService
addEntity in interface AdminEntityServiceServiceException
public PersistenceResponse updateEntity(EntityForm entityForm,
String[] customCriteria)
throws ServiceException
AdminEntityService
updateEntity in interface AdminEntityServiceServiceException
public PersistenceResponse removeEntity(EntityForm entityForm,
String[] customCriteria)
throws ServiceException
AdminEntityService
removeEntity in interface AdminEntityServiceServiceExceptionprotected List<Property> getPropertiesFromEntityForm(EntityForm entityForm)
protected PersistencePackageRequest getRequestForEntityForm(EntityForm entityForm,
String[] customCriteria)
public PersistenceResponse getAdvancedCollectionRecord(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
String collectionItemId)
throws ServiceException
AdminEntityService
getAdvancedCollectionRecord in interface AdminEntityServiceServiceException
public PersistenceResponse getRecordsForCollection(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
FilterAndSortCriteria[] fascs,
Integer startIndex,
Integer maxIndex)
throws ServiceException
AdminEntityService
getRecordsForCollection in interface AdminEntityServiceServiceException
public PersistenceResponse getRecordsForCollection(ClassMetadata containingClassMetadata,
Entity containingEntity,
Property collectionProperty,
FilterAndSortCriteria[] fascs,
Integer startIndex,
Integer maxIndex,
String idValueOverride)
throws ServiceException
AdminEntityService#getContextSpecificRelationshipId()
getRecordsForCollection in interface AdminEntityServiceServiceException
public Map<String,DynamicResultSet> getRecordsForAllSubCollections(PersistencePackageRequest ppr,
Entity containingEntity)
throws ServiceException
AdminEntityService
getRecordsForAllSubCollections in interface AdminEntityServiceServiceException#getRecordsForCollection(ClassMetadata, String, Property)
public PersistenceResponse addSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity)
throws ServiceException,
ClassNotFoundException
AdminEntityService
addSubCollectionEntity in interface AdminEntityServiceServiceException
ClassNotFoundException
public PersistenceResponse updateSubCollectionEntity(EntityForm entityForm,
ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String collectionItemId)
throws ServiceException,
ClassNotFoundException
AdminEntityService
updateSubCollectionEntity in interface AdminEntityServiceServiceException
ClassNotFoundException
public PersistenceResponse removeSubCollectionEntity(ClassMetadata mainMetadata,
Property field,
Entity parentEntity,
String itemId,
String priorKey)
throws ServiceException
AdminEntityService
removeSubCollectionEntity in interface AdminEntityServicepriorKey - - only needed for Map type collections
ServiceException
public String getContextSpecificRelationshipId(ClassMetadata cmd,
Entity entity,
String propertyName)
AdminEntityService
getContextSpecificRelationshipId in interface AdminEntityService
public String getIdProperty(ClassMetadata cmd)
throws ServiceException
AdminEntityServiceSupportedFieldType.ID
getIdProperty in interface AdminEntityServiceServiceException
protected PersistenceResponse add(PersistencePackageRequest request)
throws ServiceException
ServiceException
protected PersistenceResponse update(PersistencePackageRequest request)
throws ServiceException
ServiceException
protected PersistenceResponse inspect(PersistencePackageRequest request)
throws ServiceException
ServiceException
protected PersistenceResponse remove(PersistencePackageRequest request)
throws ServiceException
ServiceException
protected PersistenceResponse fetch(PersistencePackageRequest request)
throws ServiceException
ServiceExceptionprotected CriteriaTransferObject getDefaultCto()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||