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
-
Method Summary
Modifier and TypeMethodDescription<T extends Entity>
TloadEntityByPrimaryKey
(org.hibernate.Session currentSession, Class<T> entityClass, Serializable pk) int
priority()
boolean
-
Constructor Details
-
EntityDocsPrimaryKeyLoader
public EntityDocsPrimaryKeyLoader()
-
-
Method Details
-
supports
- Specified by:
supports
in interfacePrimaryKeyLoader
- Returns:
- if this
PrimaryKeyLoader
supports the given entity class
-
loadEntityByPrimaryKey
public <T extends Entity> T loadEntityByPrimaryKey(org.hibernate.Session currentSession, Class<T> entityClass, Serializable pk) - Specified by:
loadEntityByPrimaryKey
in interfacePrimaryKeyLoader
- Returns:
- the entity with the given key and entity class loaded from the database
-
priority
public int priority()- Specified by:
priority
in interfacePrimaryKeyLoader
-