Example usage for org.hibernate.internal CriteriaImpl CriteriaImpl

List of usage examples for org.hibernate.internal CriteriaImpl CriteriaImpl

Introduction

In this page you can find the example usage for org.hibernate.internal CriteriaImpl CriteriaImpl.

Prototype

public CriteriaImpl(String entityOrClassName, String alias, SharedSessionContractImplementor session) 

Source Link

Usage

From source file:org.candlepin.model.DetachedCandlepinQuery.java

License:Open Source License

/**
 * Creates a new DetachedCandlepinQuery instance using the specified criteria and session.
 *
 * @param criteria/*from   w w w . jav  a  2 s  . c  om*/
 *  The detached criteria to execute
 *
 * @param session
 *  The session to use to execute the given criteria
 *
 * @throws IllegalArgumentException
 *  if either criteria or session are null
 */
public DetachedCandlepinQuery(Session session, DetachedCriteria criteria) {
    if (session == null) {
        throw new IllegalArgumentException("session is null");
    }

    if (criteria == null) {
        throw new IllegalArgumentException("criteria is null");
    }

    this.session = session;
    this.criteria = criteria;

    // Make a copy of the initial state. We'll restore this every time we generate an
    // executable criteria to simulate a copy and, hopefully, not carry state between calls
    this.initialState = new CriteriaImpl(null, null, null);
    this.copyFields((CriteriaImpl) criteria.getExecutableCriteria(session), this.initialState, false);

    this.offset = -1;
    this.limit = -1;
    this.lockMode = null;
}

From source file:pe.com.bbva.pic.dominio.Busqueda.java

License:Open Source License

protected Busqueda(String entityName, String alias) {
    criteriaImpl = new CriteriaImpl(entityName, alias, null);
    criteria = criteriaImpl;
}

From source file:pe.com.vical.examplevaadin.util.Busqueda.java

License:Open Source License

protected Busqueda(String entityName, String alias) {
    impl = new CriteriaImpl(entityName, alias, null);
    criteria = impl;
}