com.jpattern.orm.query.OrmUpdateQuery Maven / Gradle / Ivy
package com.jpattern.orm.query;
import java.util.ArrayList;
import java.util.List;
import com.jpattern.orm.classtool.IOrmClassToolMap;
import com.jpattern.orm.query.clause.OrmSetClause;
import com.jpattern.orm.query.clause.OrmWhere;
import com.jpattern.orm.query.clause.SetClause;
import com.jpattern.orm.query.clause.Where;
import com.jpattern.orm.session.SessionSqlPerformer;
import com.jpattern.orm.session.SqlPerformer;
/**
*
* @author Francesco Cina
*
* 10/lug/2011
*/
public class OrmUpdateQuery implements UpdateQuery, INameSolverConsumer {
private final SetClause set = new OrmSetClause(this);
private final Where whereExpression = new OrmWhere(this);
// private INameSolver nameSolver = new NullNameSolver();
private int queryTimeout = 0;
private final Class> clazz;
private final IOrmClassToolMap ormClassToolMap;
private final SessionSqlPerformer session;
public OrmUpdateQuery(Class> clazz, IOrmClassToolMap ormClassToolMap, SessionSqlPerformer session) {
this.clazz = clazz;
this.ormClassToolMap = ormClassToolMap;
this.session = session;
}
@Override
public Where where() {
return whereExpression;
}
@Override
public int perform() {
final List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy