1 24 package org.ofbiz.entity.util; 25 26 import java.sql.ResultSet ; 27 28 36 public class EntityFindOptions implements java.io.Serializable { 37 38 39 public static final int TYPE_FORWARD_ONLY = ResultSet.TYPE_FORWARD_ONLY; 40 41 42 public static final int TYPE_SCROLL_INSENSITIVE = ResultSet.TYPE_SCROLL_INSENSITIVE; 43 44 45 public static final int TYPE_SCROLL_SENSITIVE = ResultSet.TYPE_SCROLL_SENSITIVE; 46 47 48 public static final int CONCUR_READ_ONLY = ResultSet.CONCUR_READ_ONLY; 49 50 51 public static final int CONCUR_UPDATABLE = ResultSet.CONCUR_UPDATABLE; 52 53 protected boolean specifyTypeAndConcur = true; 54 protected int resultSetType = TYPE_FORWARD_ONLY; 55 protected int resultSetConcurrency = CONCUR_READ_ONLY; 56 protected int fetchSize = -1; 57 protected int maxRows = -1; 58 protected boolean distinct = false; 59 60 67 public EntityFindOptions() {} 68 69 public EntityFindOptions(boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency, int fetchSize, int maxRows, boolean distinct) { 70 this.specifyTypeAndConcur = specifyTypeAndConcur; 71 this.resultSetType = resultSetType; 72 this.resultSetConcurrency = resultSetConcurrency; 73 this.fetchSize = fetchSize; 74 this.maxRows = maxRows; 75 this.distinct = distinct; 76 } 77 78 public EntityFindOptions(boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency, boolean distinct) { 79 this(specifyTypeAndConcur, resultSetType, resultSetConcurrency, -1, -1, distinct); 80 } 81 82 85 public boolean getSpecifyTypeAndConcur() { 86 return specifyTypeAndConcur; 87 } 88 89 92 public void setSpecifyTypeAndConcur(boolean specifyTypeAndConcur) { 93 this.specifyTypeAndConcur = specifyTypeAndConcur; 94 } 95 96 100 public int getResultSetType() { 101 return resultSetType; 102 } 103 104 108 public void setResultSetType(int resultSetType) { 109 this.resultSetType = resultSetType; 110 } 111 112 116 public int getResultSetConcurrency() { 117 return resultSetConcurrency; 118 } 119 120 124 public void setResultSetConcurrency(int resultSetConcurrency) { 125 this.resultSetConcurrency = resultSetConcurrency; 126 } 127 128 129 public int getFetchSize() { 130 return fetchSize; 131 } 132 133 134 public void setFetchSize(int fetchSize) { 135 this.fetchSize = fetchSize; 136 } 137 138 139 public int getMaxRows() { 140 return maxRows; 141 } 142 143 144 public void setMaxRows(int maxRows) { 145 this.maxRows = maxRows; 146 } 147 148 149 public boolean getDistinct() { 150 return distinct; 151 } 152 153 154 public void setDistinct(boolean distinct) { 155 this.distinct = distinct; 156 } 157 } 158 | Popular Tags |