Class PropertyAccessorServiceImpl
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.pojo.PropertyAccessorServiceImpl
- All Implemented Interfaces:
PropertyAccessorService
@Component
public class PropertyAccessorServiceImpl
extends Object
implements PropertyAccessorService
Accesses entity properties using reflections.
All accessors are cached for performance reasons.
Different strategies are used for different property types:
PropertyAccessorServiceImpl.IdAccessor
for primary key fields, PropertyAccessorServiceImpl.PersistentPropertyAccessor
for
persistent properties and PropertyAccessorServiceImpl.TransientPropertyAccessor
for properties of session-only entities
or relations to session only entities.
Whenever possible we use the EntityPersister
to access the fields, as hibernate has already
cached the proper Method
instances anyway.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
PropertyAccessorServiceImpl
public PropertyAccessorServiceImpl(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfacePropertyAccessorService
-
setValue
- Specified by:
setValue
in interfacePropertyAccessorService
-