Class DataEntityHome
java.lang.Object
fr.paris.lutece.portal.business.datastore.DataEntityHome
This class provides instances management methods (create, find, ...) for Entity objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataEntitycreate(DataEntity entity) Create an instance of the entity classstatic booleancreateIfAbsent(DataEntity entity) Atomically creates an entity only if no entity with the same key already exists.static List<DataEntity>findAll()Load the data of all the entity objects and returns them in form of a collectionstatic List<DataEntity>findByPrefix(String strPrefix) Load the data of all the entity objects whose key share a prefixstatic DataEntityfindByPrimaryKey(String strKey) Returns an instance of a entity whose identifier is specified in parameterstatic voidRemove the entity whose identifier is specified in parameterstatic DataEntityupdate(DataEntity entity) Update of the entity data specified in parameter
-
Method Details
-
create
Create an instance of the entity class- Parameters:
entity- The instance of the Entity which contains the informations to store- Returns:
- The instance of entity which has been created with its primary key.
-
createIfAbsent
Atomically creates an entity only if no entity with the same key already exists. Safe under concurrent calls from multiple application instances.- Parameters:
entity- The instance of the Entity to create- Returns:
trueif the entity was created,falseif an entity with the same key already existed- Since:
- 8.0
-
update
Update of the entity data specified in parameter- Parameters:
entity- The instance of the Entity which contains the data to store- Returns:
- The instance of the entity which has been updated
-
remove
Remove the entity whose identifier is specified in parameter- Parameters:
strKey- The entity Id
-
findByPrimaryKey
Returns an instance of a entity whose identifier is specified in parameter- Parameters:
strKey- The entity primary key- Returns:
- an instance of Entity
-
findAll
Load the data of all the entity objects and returns them in form of a collection- Returns:
- the list which contains the data of all the entity objects
-
findByPrefix
Load the data of all the entity objects whose key share a prefix- Parameters:
strPrefix- the prefix- Returns:
- the list which contains the data of all the entity objects whose key share a prefix
- Since:
- 7.0.17
-