Hibernate Criteria

Hibernate Criteria

1. Usage org.hibernage.Criteria interface is to compose criterians included in org.hibernate.criteria package.
2. Criteria interface inherit org.hibernate.criteria.CriterianSpecification, which only defined some mode value, e.g: flushmode, cach mode, maybe not a good implemnt.
3. Criterian was implemnt by org.hibernate.impl.criteriaImpl and created by org.hibernate.impl.SessionImplementor, translate class name and sesson to criterian.
4. Typical usage: session.createCriteria(class).add(Restriction.xx()).list;
5. Restriction is factory of org.hibernate.criteria.Criteriaon implementation.

Architecture : Define top level interface to compose low lever sub interface, easy to extense and maintain.

你可能感兴趣的:(Hibernate Criteria)