Package com.avoka.fc.core.service.entity
Class EntityService
java.lang.Object
com.avoka.fc.core.service.entity.EntityService
Provides Management entities service.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canAssignUniqueValue
(String name, String value, BaseEntity existingDataObject, String groupByProperty, Object groupByValue) Return true if the given unique value can be assigned to the given DataObject, false otherwise.boolean
deleteEntity
(Class dataClass, String id) Delete the given entity.getChildEntities
(Class childClass, String parentProperty, String childSortProperty, String id) getEntities
(Class dataClass) getEntities
(Class dataClass, String sortField) getEntities
(Class dataClass, String sortField, List clients) getEntities
(Class dataClass, List clients) Return the entity for the given class and primary key.void
save
(BaseEntity baseEntity) Save the given entityReturn true if the entity was synchronized.
-
Constructor Details
-
EntityService
public EntityService()
-
-
Method Details
-
getEntity
Return the entity for the given class and primary key. This method will apply data security filtering against the currently logged in administrator.- Parameters:
dataClass
- the entity classid
- the entity primary key- Returns:
- the entity for the given class and primary key
-
getEntities
-
getEntities
-
getEntities
-
getEntities
-
getChildEntities
-
canAssignUniqueValue
public boolean canAssignUniqueValue(String name, String value, BaseEntity existingDataObject, String groupByProperty, Object groupByValue) Return true if the given unique value can be assigned to the given DataObject, false otherwise.- Parameters:
name
- the name to check if it is uniqueexistingDataObject
- the dataObject to assign the name to- Returns:
- true if the unique name can be assigned to the DataObject, false otherwise
-
save
Save the given entityReturn true if the entity was synchronized.- Parameters:
baseEntity
- the entity to save
-
deleteEntity
Delete the given entity.- Parameters:
dataClass
- the data class of the entity to deleteid
- the entity primary key- Returns:
- true if the entity was deleted
-