/* * Copyright 2015 Evgeny Dolganov (evgenij.dolganov@gmail.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package och.comp.db.base.universal; import och.comp.db.base.universal.query.SortCondition; import och.comp.db.base.universal.query.WhereCondition; public abstract class SelectRows<T> { public final String table; public final Class<T> resultType; public final SelectFields selectFields; public final WhereCondition whereCondition; public final Integer limit; public final Integer offset; public final SortCondition sortCondition; public SelectRows(Object table, Class<T> resultType, SelectFields selectFields) { this(table, resultType, selectFields, null, null, null, null); } public SelectRows(Object table, Class<T> resultType, SelectFields selectFields, WhereCondition whereCondition) { this(table, resultType, selectFields, whereCondition, null, null, null); } public SelectRows(Object table, Class<T> resultType, SelectFields selectFields, WhereCondition whereCondition, SortCondition sortCondition) { this(table, resultType, selectFields, whereCondition, sortCondition, null, null); } public SelectRows(Object table, Class<T> resultType, SelectFields selectFields, WhereCondition whereCondition, SortCondition sortCondition, Integer limit, Integer offset) { this.table = String.valueOf(table); this.resultType = resultType; this.selectFields = selectFields; this.whereCondition = whereCondition; this.limit = limit; this.offset = offset; this.sortCondition = sortCondition; } }