com.googlecode.jpattern.orm.query.OrmCustomQuery Maven / Gradle / Ivy
package com.googlecode.jpattern.orm.query;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import com.googlecode.jpattern.orm.IOrmClassToolMap;
import com.googlecode.jpattern.orm.exception.OrmException;
import com.googlecode.jpattern.orm.exception.OrmNotUniqueResultException;
import com.googlecode.jpattern.orm.session.IResultSetReader;
import com.googlecode.jpattern.orm.session.ISessionSqlPerformer;
import com.googlecode.jpattern.orm.session.ISqlPerformer;
/**
*
* @author Francesco Cina
*
* 20/giu/2011
*/
public class OrmCustomQuery extends ABaseOrmQuery implements IOrmCustomQuery, INameSolverConsumer {
private INameSolver nameSolver = new NullNameSolver();
private final ISelectClause select;
private final IOrmClassToolMap ormClassToolMap;
private final Class> clazz;
private final Class>[] joinClasses;
private final ISessionSqlPerformer session;
public OrmCustomQuery(String selectClause, IOrmClassToolMap ormClassToolMap, ISessionSqlPerformer session, Class> clazz, Class>... joinClasses) {
this.ormClassToolMap = ormClassToolMap;
this.session = session;
this.clazz = clazz;
this.joinClasses = joinClasses;
setJoin( new Join(ormClassToolMap) );
this.select = new SelectClause(selectClause);
}
@Override
public void setNameSolver(INameSolver nameSolver) {
this.nameSolver = nameSolver;
this.where().setNameSolver(nameSolver);
this.orderBy().setNameSolver(nameSolver);
this.join().setNameSolver(nameSolver);
this.select.setNameSolver(nameSolver);
}
@Override
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy