PageRenderTime 362ms CodeModel.GetById 130ms app.highlight 5ms RepoModel.GetById 126ms app.codeStats 0ms

/src/main/java/com/google/ie/dto/RetrievalInfo.java

http://thoughtsite.googlecode.com/
Java | 88 lines | 39 code | 13 blank | 36 comment | 0 complexity | e39977c3b5fe6ce271c9171e9f5c8ce6 MD5 | raw file
 1/* Copyright 2010 Google Inc.
 2 * 
 3 * Licensed under the Apache License, Version 2.0 (the "License");
 4 * you may not use this file except in compliance with the License.
 5 * You may obtain a copy of the License at
 6 * 
 7 *      http://www.apache.org/licenses/LICENSE-2.0
 8 * 
 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS.
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License
14 */
15
16package com.google.ie.dto;
17
18/**
19 * A Class representing the auxiliary information to be passed to idea exchange
20 * services as a parameter.
21 * 
22 * @author Charanjeet singh
23 */
24public class RetrievalInfo {
25    /** Index of record from where to fetch the objects.Default is 0 */
26    private long startIndex = 0;
27    /** Total number of objects to be fetched.Default is 10 */
28    private long noOfRecords = 10;
29    /** Ordering field of records */
30    private String orderBy = null;
31    /** Ordering type "asc" or "desc" */
32    private String orderType = null;
33
34    public RetrievalInfo() {
35    }
36
37    public RetrievalInfo(long startindex, long noOfRecords, String orderOn, String orderBy) {
38        this.startIndex = startindex;
39        this.noOfRecords = noOfRecords;
40        this.orderBy = orderOn;
41        this.orderType = orderBy;
42    }
43
44    /**
45     * @return the startIndex
46     */
47    public long getStartIndex() {
48        return startIndex;
49    }
50
51    /**
52     * @param startIndex the startIndex to set
53     */
54    public void setStartIndex(long startindex) {
55        this.startIndex = startindex;
56    }
57
58    /**
59     * @return the noOfRecords
60     */
61    public long getNoOfRecords() {
62        return noOfRecords;
63    }
64
65    /**
66     * @param noOfRecords the noOfRecords to set
67     */
68    public void setNoOfRecords(long noOfRecords) {
69        this.noOfRecords = noOfRecords;
70    }
71
72    public void setOrderBy(String orderBy) {
73        this.orderBy = orderBy;
74    }
75
76    public String getOrderBy() {
77        return orderBy;
78    }
79
80    public void setOrderType(String orderType) {
81        this.orderType = orderType;
82    }
83
84    public String getOrderType() {
85        return orderType;
86    }
87}
88