/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. package com.google.ie.dto;
  16. /**
  17. * A Class representing the auxiliary information to be passed to idea exchange
  18. * services as a parameter.
  19. *
  20. * @author Charanjeet singh
  21. */
  22. public class RetrievalInfo {
  23. /** Index of record from where to fetch the objects.Default is 0 */
  24. private long startIndex = 0;
  25. /** Total number of objects to be fetched.Default is 10 */
  26. private long noOfRecords = 10;
  27. /** Ordering field of records */
  28. private String orderBy = null;
  29. /** Ordering type "asc" or "desc" */
  30. private String orderType = null;
  31. public RetrievalInfo() {
  32. }
  33. public RetrievalInfo(long startindex, long noOfRecords, String orderOn, String orderBy) {
  34. this.startIndex = startindex;
  35. this.noOfRecords = noOfRecords;
  36. this.orderBy = orderOn;
  37. this.orderType = orderBy;
  38. }
  39. /**
  40. * @return the startIndex
  41. */
  42. public long getStartIndex() {
  43. return startIndex;
  44. }
  45. /**
  46. * @param startIndex the startIndex to set
  47. */
  48. public void setStartIndex(long startindex) {
  49. this.startIndex = startindex;
  50. }
  51. /**
  52. * @return the noOfRecords
  53. */
  54. public long getNoOfRecords() {
  55. return noOfRecords;
  56. }
  57. /**
  58. * @param noOfRecords the noOfRecords to set
  59. */
  60. public void setNoOfRecords(long noOfRecords) {
  61. this.noOfRecords = noOfRecords;
  62. }
  63. public void setOrderBy(String orderBy) {
  64. this.orderBy = orderBy;
  65. }
  66. public String getOrderBy() {
  67. return orderBy;
  68. }
  69. public void setOrderType(String orderType) {
  70. this.orderType = orderType;
  71. }
  72. public String getOrderType() {
  73. return orderType;
  74. }
  75. }