Entity
- Any entity.Key
- Key of the entity.public abstract class AbstractGenericController<Entity,Key> extends Object implements org.dejava.component.ejb.component.GenericComponent<Entity,Key>
Constructor and Description |
---|
AbstractGenericController() |
Modifier and Type | Method and Description |
---|---|
Collection<Entity> |
addOrUpdate(Collection<Entity> entities) |
Entity |
addOrUpdate(Entity entity) |
Collection<Entity> |
getAll(Integer firstResult,
Integer maxResults) |
protected abstract org.dejava.component.ejb.component.AbstractGenericComponent<Entity,Key> |
getBusinessComponent()
Gets the business component related to the entity.
|
Entity |
getByAttribute(String attributeName,
Object attributeValue) |
Collection<Entity> |
getByAttribute(String attributeName,
Object attributeValue,
Integer firstResult,
Integer maxResults) |
Entity |
getById(Key identifier) |
void |
remove(Collection<Entity> entities) |
void |
remove(Entity entity) |
protected abstract org.dejava.component.ejb.component.AbstractGenericComponent<Entity,Key> getBusinessComponent()
@PUT @Consumes(value="application/json") @Produces(value="application/json") public Entity addOrUpdate(Entity entity)
@PUT @Path(value="/s") @Consumes(value="application/json") @Produces(value="application/json") public Collection<Entity> addOrUpdate(Collection<Entity> entities)
@DELETE @Consumes(value="application/json") public void remove(Entity entity)
@DELETE @Path(value="/s") @Consumes(value="application/json") public void remove(Collection<Entity> entities)
@GET @Path(value="/{identifier}") @Produces(value="application/json") public Entity getById(@PathParam(value="identifier") Key identifier)
public Collection<Entity> getByAttribute(String attributeName, Object attributeValue, Integer firstResult, Integer maxResults)
Copyright © 2013. All Rights Reserved.