Package de.xima.fc.handler.entity
Class GenericHandler
- java.lang.Object
- 
- de.xima.fc.handler.AMSApiHandler
- 
- de.xima.fc.handler.entity.GenericHandler
 
 
- 
- All Implemented Interfaces:
- IAPIHandler,- IGenericHandler,- Serializable
 - Direct Known Subclasses:
- AktionHandler,- AppointmentHandler,- AppointmentSlotHandler,- AppointmentTemplateHandler,- AppointmentTypeHandler,- AttachmentHandler,- BenutzerGruppeHandler,- BenutzerHandler,- ClientCounterHandler,- DatenbankzugriffHandler,- DatenquelleHandler,- EntityberechtigungHandler,- FileHandler,- FormEingangHandler,- FormElementHandler,- FormVersionHandler,- FrontendServerHandler,- LDAPAbfrageHandler,- LDAPGruppeHandler,- LDAPZugriffHandler,- LicenseFileHandler,- LicenseHandler,- MandantFrontendServerHandler,- MandantHandler,- MandantLdapDataHandler,- MandantMailDataHandler,- MandantRessourceHandler,- ModulHandler,- PostfachHandler,- ProjectDOIDataHandler,- ProjectIdentityCheckDataHandler,- ProjektHandler,- ProjektRessourceHandler,- ProjektZaehlerDatenHandler,- ProjektZaehlerHandler,- RolleHandler,- SystemPropertyHandler,- TextbausteinHandler,- VorgangHandler,- WorkflowHandler,- WorkflowNodeHandler,- WorkflowStateHandler,- WorkflowTaskHandler,- WorkflowTriggerHandler,- WorkflowVersionHandler
 
 public class GenericHandler extends AMSApiHandler implements IGenericHandler The Class GenericHandler.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.slf4j.LoggerLOG
 - 
Constructor SummaryConstructors Constructor Description GenericHandler()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ITransferableEntity>
 Tcreate(Class<T> entityClass, UserContext uc, T entity)Creates the.<T extends ITransferableEntity>
 T[]create(Class<T> entityClass, UserContext uc, T... entities)Creates the.<T extends ITransferableEntity>
 Booleandelete(Class<T> entityClass, UserContext uc, T entities)Delete.<T extends ITransferableEntity>
 Booleandelete(Class<T> entityClass, UserContext uc, T... entities)Delete.<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding>
 BooleandeleteBy(Class<T> entityClass, UserContext uc, C cm)Delete by.<T extends ITransferableEntity>
 BooleandeleteById(Class<T> entityClass, UserContext uc, Integer id)<T extends ITransferableEntity>
 BooleandeleteById(Class<T> entityClass, UserContext uc, Long id)Delete by id.<T extends ITransferableEntity>
 List<T>getAll(Class<T> entityClass, UserContext uc)Gets the all.<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding>
 List<T>getAllBy(Class<T> entityClass, UserContext uc, C cm)Gets the all by.<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager>
 List<Map<String,Serializable>>getAttributes(Class<T> entityClass, UserContext uc, C cm)Gets a list of attributes specified in the given criteria managerIGenericHandler<R,T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager>
 List<R>getAttributes(Class<T> entityClass, UserContext uc, C cm, Class<R> resultClass)Gets a list of attributes specified in the given criteria managerIGenericHandler. the attribute values will be returned as objects defined by the result class<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding>
 TgetBy(Class<T> entityClass, UserContext uc, C cm)Gets the by.<T extends ITransferableEntity>
 TgetById(Class<T> entityClass, UserContext uc, Integer id)<T extends ITransferableEntity>
 TgetById(Class<T> entityClass, UserContext uc, Long id)Gets the by id.<T extends ITransferableEntity>
 TgetById(String entityClass, UserContext uc, String id)Gets the by id.<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager>
 javax.persistence.TuplegetSingleAttributes(Class<T> entityClass, UserContext uc, C cm)This method allows for the selection of certain attributes of an entity instead of reading the entire entity<R,T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager>
 RgetSingleAttributes(Class<T> entityClass, UserContext uc, C cm, Class<R> resultClass)This method allows for the selection of certain attributes of an entity instead of reading the entire entity<T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding>
 IntegerresultTotalCount(Class<T> entityClass, UserContext uc, C cm)Result total count.protected <T> List<T>serializableList(Iterable<T> sequence)Takes anyCollectionorIterableand converts it to a serializable list that can be transferred via the API.<T extends ITransferableEntity>
 Tupdate(Class<T> entityClass, UserContext uc, T entity)Update.<T extends ITransferableEntity>
 T[]update(Class<T> entityClass, UserContext uc, T... entities)Update.- 
Methods inherited from class de.xima.fc.handler.AMSApiHandlergetName
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface de.xima.fc.com.interfaces.IAPIHandlergetName
 
- 
 
- 
- 
- 
Method Detail- 
getAllpublic <T extends ITransferableEntity> List<T> getAll(Class<T> entityClass, UserContext uc) Gets the all.- Specified by:
- getAllin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- Returns:
- the all @
 
 - 
getAllBypublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding> List<T> getAllBy(Class<T> entityClass, UserContext uc, C cm) Gets the all by.- Specified by:
- getAllByin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- cm- the qcm
- Returns:
- the all by @
 
 - 
getBypublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding> T getBy(Class<T> entityClass, UserContext uc, C cm) Gets the by.- Specified by:
- getByin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- cm- the qcm
- Returns:
- the by @
 
 - 
getByIdpublic <T extends ITransferableEntity> T getById(Class<T> entityClass, UserContext uc, Long id) Gets the by id.- Specified by:
- getByIdin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- id- the id
- Returns:
- the by id @
 
 - 
getByIdpublic <T extends ITransferableEntity> T getById(Class<T> entityClass, UserContext uc, Integer id) - Specified by:
- getByIdin interface- IGenericHandler
 
 - 
getByIdpublic <T extends ITransferableEntity> T getById(String entityClass, UserContext uc, String id) Gets the by id.- Specified by:
- getByIdin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- id- the id
- Returns:
- the by id @
 
 - 
getAttributespublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager> List<Map<String,Serializable>> getAttributes(Class<T> entityClass, UserContext uc, C cm) throws NotSerializableException Gets a list of attributes specified in the given criteria managerIGenericHandler- Specified by:
- getAttributesin interface- IGenericHandler
- Type Parameters:
- T- type of the entity
- C- type of the criteria manager
- Parameters:
- entityClass-- Classof the entity
- uc-- UserContextthat will be used
- cm-- IGenericHandlercriteria manager specifying the filtering, sorting, paging and selection of attributes
- Returns:
- Listof- Tuples containing the attribute values
- Throws:
- NotSerializableException
 
 - 
getAttributespublic <R,T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager> List<R> getAttributes(Class<T> entityClass, UserContext uc, C cm, Class<R> resultClass) Gets a list of attributes specified in the given criteria managerIGenericHandler. the attribute values will be returned as objects defined by the result class- Specified by:
- getAttributesin interface- IGenericHandler
- Type Parameters:
- R- type of result object
- T- type of the entity
- C- type of the criteria manager
- Parameters:
- entityClass-- Classof the entity
- uc-- UserContextthat will be used
- cm-- IGenericHandlercriteria manager specifying the filtering, sorting, paging and selection of attributes
- resultClass-- Classof the result objects
- Returns:
- Listof- IGenericHandlers containing the attribute values
 
 - 
getSingleAttributespublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager> javax.persistence.Tuple getSingleAttributes(Class<T> entityClass, UserContext uc, C cm) This method allows for the selection of certain attributes of an entity instead of reading the entire entity- Specified by:
- getSingleAttributesin interface- IGenericHandler
- Type Parameters:
- T- type of entity
- C- type of the criteria manager
- Parameters:
- entityClass-- Classthe class of the searched entity
- uc-- UserContextwhich will be used
- cm-- IGenericHandlerobject, that contains lists for filtering, sorting and selecting. These lists, if available, are included in the SQL query. This value can be- null. The lists contained in the- IGenericHandlercan also be- nullor empty.
- Returns:
- Tuplethat contains the values of the selected attributes
 
 - 
getSingleAttributespublic <R,T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding & de.xima.cmn.criteria.interfaces.ISelectableCriteriaManager> R getSingleAttributes(Class<T> entityClass, UserContext uc, C cm, Class<R> resultClass) This method allows for the selection of certain attributes of an entity instead of reading the entire entity- Specified by:
- getSingleAttributesin interface- IGenericHandler
- Type Parameters:
- R- type of object, in which the result values will be placed
- T- type of entity
- C- type of the criteria manager
- Parameters:
- entityClass-- Classthe class of the searched entity
- uc-- UserContextwhich will be used
- cm-- IGenericHandlerobject, that contains lists for filtering, sorting and selecting. These lists, if available, are included in the SQL query. This value can be- null. The lists contained in the- IGenericHandlercan also be- nullor empty.
- resultClass-- Classof the object, in which the result value will be placed
- Returns:
- IGenericHandlerthat contains the values of the selected attributes
 
 - 
createpublic <T extends ITransferableEntity> T[] create(Class<T> entityClass, UserContext uc, T... entities) Creates the.- Specified by:
- createin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entities- the entities
- Returns:
- the t[] @
 
 - 
createpublic <T extends ITransferableEntity> T create(Class<T> entityClass, UserContext uc, T entity) Creates the.- Specified by:
- createin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entity- the entity
- Returns:
- the t @
 
 - 
updatepublic <T extends ITransferableEntity> T[] update(Class<T> entityClass, UserContext uc, T... entities) Update.- Specified by:
- updatein interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entities- the entities
- Returns:
- the t[] @
 
 - 
updatepublic <T extends ITransferableEntity> T update(Class<T> entityClass, UserContext uc, T entity) Update.- Specified by:
- updatein interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entity- the entity
- Returns:
- the t @
 
 - 
deletepublic <T extends ITransferableEntity> Boolean delete(Class<T> entityClass, UserContext uc, T... entities) Delete.- Specified by:
- deletein interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entities- the entities
- Returns:
- the boolean @
 
 - 
deletepublic <T extends ITransferableEntity> Boolean delete(Class<T> entityClass, UserContext uc, T entities) Delete.- Specified by:
- deletein interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- entities- the entities
- Returns:
- the boolean @
 
 - 
deleteBypublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.ISortableCriteriaManager & de.xima.cmn.criteria.interfaces.IPageableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding> Boolean deleteBy(Class<T> entityClass, UserContext uc, C cm) Delete by.- Specified by:
- deleteByin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- cm- the qcm
- Returns:
- the boolean @
 
 - 
deleteByIdpublic <T extends ITransferableEntity> Boolean deleteById(Class<T> entityClass, UserContext uc, Long id) Delete by id.- Specified by:
- deleteByIdin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- id- the id
- Returns:
- the boolean @
 
 - 
deleteByIdpublic <T extends ITransferableEntity> Boolean deleteById(Class<T> entityClass, UserContext uc, Integer id) - Specified by:
- deleteByIdin interface- IGenericHandler
 
 - 
resultTotalCountpublic <T extends ITransferableEntity,C extends de.xima.cmn.criteria.interfaces.IFilterableCriteriaManager & de.xima.cmn.criteria.interfaces.IQueryHintProviding> Integer resultTotalCount(Class<T> entityClass, UserContext uc, C cm) Result total count.- Specified by:
- resultTotalCountin interface- IGenericHandler
- Type Parameters:
- T- the generic type
- Parameters:
- entityClass- the entity class
- uc- the uc
- cm- the qcm
- Returns:
- the integer @
 
 - 
serializableListprotected <T> List<T> serializableList(Iterable<T> sequence) Takes anyCollectionorIterableand converts it to a serializable list that can be transferred via the API.- Type Parameters:
- T- Type of the list items.
- Parameters:
- sequence- A sequence of items to put into a list.
- Returns:
- A serializable list with the given items.
 
 
- 
 
-