Entity
- Any entity.Key
- Key of the entity.public interface GenericComponent<Entity,Key>
Modifier and Type | Method and Description |
---|---|
Collection<Entity> |
addOrUpdate(Collection<Entity> entities)
Adds or update all the persistent entities.
|
Entity |
addOrUpdate(Entity entity)
Adds or update the persistent entity.
|
Collection<Entity> |
getAll(Integer firstResult,
Integer maxResults)
Gets all entities of the kind.
|
Entity |
getByAttribute(String attributeName,
Object attributeValue)
Gets an entity by its attribute.
|
Collection<Entity> |
getByAttribute(String attributeName,
Object attributeValue,
Integer firstResult,
Integer maxResults)
Gets all entities with the given attribute value.
|
Entity |
getById(Key identifier)
Gets an entity by its identifier.
|
void |
remove(Collection<Entity> entities)
Removes persistent entities.
|
void |
remove(Entity entity)
Removes a persistent entity.
|
Entity addOrUpdate(Entity entity)
entity
- The entity to be persisted.Collection<Entity> addOrUpdate(Collection<Entity> entities)
entities
- The entities to be persisted.void remove(Entity entity)
entity
- The entity to be removed.void remove(Collection<Entity> entities)
entities
- The entities to be removed.Entity getById(Key identifier)
identifier
- The identifier of the entity.Collection<Entity> getByAttribute(String attributeName, Object attributeValue, Integer firstResult, Integer maxResults)
attributeName
- The attribute name.attributeValue
- The attribute value.firstResult
- The first result that should be considered by the query.maxResults
- The maximum numbers of results to be considered by the query.Entity getByAttribute(String attributeName, Object attributeValue)
attributeName
- The attribute name.attributeValue
- The attribute value.Collection<Entity> getAll(Integer firstResult, Integer maxResults)
firstResult
- The first result that should be considered by the query.maxResults
- The maximum numbers of results to be considered by the query.Copyright © 2013. All Rights Reserved.