package com.mysema.query; import java.sql.Connection; import java.util.List; import com.mysema.commons.lang.CloseableIterator; import com.mysema.query.sql.AbstractSQLQuery; import com.mysema.query.sql.Configuration; import com.mysema.query.sql.SQLTemplates; import com.mysema.query.types.Expression; import com.mysema.query.types.FactoryExpression; import com.mysema.query.types.QBean; /** * @author tiwe * */ public class ExtendedSQLQuery extends AbstractSQLQuery{ public ExtendedSQLQuery(SQLTemplates templates) { super(null, new Configuration(templates), new DefaultQueryMetadata()); } public ExtendedSQLQuery(Connection conn, SQLTemplates templates) { super(conn, new Configuration(templates), new DefaultQueryMetadata()); } public ExtendedSQLQuery(Connection conn, Configuration configuration) { super(conn, configuration, new DefaultQueryMetadata()); } public ExtendedSQLQuery(Connection conn, Configuration configuration, QueryMetadata metadata) { super(conn, configuration, metadata); } public CloseableIterator iterate(Class type, Expression... exprs){ return iterate(createProjection(type, exprs)); } public T uniqueResult(Class type, Expression... exprs){ return uniqueResult(createProjection(type, exprs)); } public List list(Class type, Expression... exprs){ return list(createProjection(type, exprs)); } public SearchResults listResults(Class type, Expression... exprs){ return listResults(createProjection(type, exprs)); } private FactoryExpression createProjection(Class type, Expression... exprs){ return new QBean(type, exprs); } }