Class EntityDocsPrimaryKeyLoader
java.lang.Object
ch.tocco.nice2.dms.impl.entitydocs.interceptor.EntityDocsPrimaryKeyLoader
- All Implemented Interfaces:
PrimaryKeyLoader
Special strategy for loading entity doc entities by primary key.
The entity is loaded directly from the session and the security
is checked through guards (because entity docs security is implemented
only through guards and not queries, because of performance reasons).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends Entity>
TloadEntityByPrimaryKey(org.hibernate.Session currentSession, Class<T> entityClass, Serializable pk) intpriority()boolean
-
Constructor Details
-
EntityDocsPrimaryKeyLoader
public EntityDocsPrimaryKeyLoader()
-
-
Method Details
-
supports
- Specified by:
supportsin interfacePrimaryKeyLoader- Returns:
- if this
PrimaryKeyLoadersupports the given entity class
-
loadEntityByPrimaryKey
public <T extends Entity> T loadEntityByPrimaryKey(org.hibernate.Session currentSession, Class<T> entityClass, Serializable pk) - Specified by:
loadEntityByPrimaryKeyin interfacePrimaryKeyLoader- Returns:
- the entity with the given key and entity class loaded from the database
-
priority
public int priority()- Specified by:
priorityin interfacePrimaryKeyLoader
-