/trunk/sqltoy-orm/src/main/java/org/sagacity/sqltoy/translate/model/TranslateConfigModel.java

https://github.com/chenrenfei/sagacity-sqltoy · Java · 311 lines · 110 code · 48 blank · 153 comment · 0 complexity · e6f50856c24a2288d0e1c0e49e9e1f69 MD5 · raw file

  1. /**
  2. *
  3. */
  4. package org.sagacity.sqltoy.translate.model;
  5. import java.io.Serializable;
  6. /**
  7. * @project sqltoy-orm
  8. * @description 翻译配置模型
  9. * @author renfei.chen <a href="mailto:zhongxuchen@hotmail.com">联系作者</a>
  10. * @version Revision:v1.0,Date:2013-4-8
  11. * @modify Date:2020-3-8=10 修改heap\offheap\diskSize的默认策略
  12. */
  13. public class TranslateConfigModel implements Serializable {
  14. /**
  15. *
  16. */
  17. private static final long serialVersionUID = 4392516051742079330L;
  18. /**
  19. * sql\service\rest
  20. */
  21. private String type;
  22. /**
  23. * 对应的cacheName
  24. */
  25. private String cache;
  26. /**
  27. * sql语句或sqltoy中的sqlId
  28. */
  29. private String sql;
  30. /**
  31. * 数据库源
  32. */
  33. private String dataSource;
  34. /**
  35. * 自定义的ServiceBean
  36. */
  37. private String service;
  38. /**
  39. * service method
  40. */
  41. private String method;
  42. /**
  43. * rest 情况下的url地址
  44. */
  45. private String url;
  46. /**
  47. * rest 请求安全认证信息
  48. */
  49. private String username;
  50. private String password;
  51. /**
  52. * 参数属性名称
  53. */
  54. private String[] properties;
  55. /**
  56. * 转换成hash 的key,只有针对sql语句起作用
  57. */
  58. private int keyIndex = 0;
  59. /**
  60. * 过期时长:默认60分钟(负数表示不过期,永久有效)
  61. */
  62. private int keepAlive = 3600;
  63. /**
  64. * 内存中存放的数量(条)
  65. */
  66. private int heap = 10000;
  67. /**
  68. * 堆外內存(MB)
  69. */
  70. private int offHeap = 0;
  71. /**
  72. * 存储磁盘的大小(MB)
  73. */
  74. private int diskSize = 0;
  75. /**
  76. * @return the keepAlive
  77. */
  78. public int getKeepAlive() {
  79. return keepAlive;
  80. }
  81. /**
  82. * @param keepAlive
  83. * the keepAlive to set
  84. */
  85. public void setKeepAlive(int keepAlive) {
  86. this.keepAlive = keepAlive;
  87. }
  88. /**
  89. * @return the heap
  90. */
  91. public int getHeap() {
  92. return heap;
  93. }
  94. /**
  95. * @param heap
  96. * the heap to set
  97. */
  98. public void setHeap(int heap) {
  99. this.heap = heap;
  100. }
  101. /**
  102. * @return the offHeap
  103. */
  104. public int getOffHeap() {
  105. return offHeap;
  106. }
  107. /**
  108. * @param offHeap
  109. * the offHeap to set
  110. */
  111. public void setOffHeap(int offHeap) {
  112. this.offHeap = offHeap;
  113. }
  114. /**
  115. * @return the cache
  116. */
  117. public String getCache() {
  118. return cache;
  119. }
  120. /**
  121. * @param cache
  122. * the cache to set
  123. */
  124. public void setCache(String cache) {
  125. this.cache = cache;
  126. }
  127. /**
  128. * @return the sql
  129. */
  130. public String getSql() {
  131. return sql;
  132. }
  133. /**
  134. * @param sql
  135. * the sql to set
  136. */
  137. public void setSql(String sql) {
  138. this.sql = sql;
  139. }
  140. /**
  141. * @return the service
  142. */
  143. public String getService() {
  144. return service;
  145. }
  146. /**
  147. * @param service
  148. * the service to set
  149. */
  150. public void setService(String service) {
  151. this.service = service;
  152. }
  153. /**
  154. * @return the method
  155. */
  156. public String getMethod() {
  157. return method;
  158. }
  159. /**
  160. * @param method
  161. * the method to set
  162. */
  163. public void setMethod(String method) {
  164. this.method = method;
  165. }
  166. /**
  167. * @return the keyIndex
  168. */
  169. public int getKeyIndex() {
  170. return keyIndex;
  171. }
  172. /**
  173. * @param keyIndex
  174. * the keyIndex to set
  175. */
  176. public void setKeyIndex(int keyIndex) {
  177. this.keyIndex = keyIndex;
  178. }
  179. /**
  180. * @return the dataSource
  181. */
  182. public String getDataSource() {
  183. return dataSource;
  184. }
  185. /**
  186. * @param dataSource
  187. * the dataSource to set
  188. */
  189. public void setDataSource(String dataSource) {
  190. this.dataSource = dataSource;
  191. }
  192. /**
  193. * @return the type
  194. */
  195. public String getType() {
  196. return type;
  197. }
  198. /**
  199. * @param type
  200. * the type to set
  201. */
  202. public void setType(String type) {
  203. this.type = type;
  204. }
  205. /**
  206. * @return the url
  207. */
  208. public String getUrl() {
  209. return url;
  210. }
  211. /**
  212. * @param url
  213. * the url to set
  214. */
  215. public void setUrl(String url) {
  216. this.url = url;
  217. }
  218. /**
  219. * @return the username
  220. */
  221. public String getUsername() {
  222. return username;
  223. }
  224. /**
  225. * @param username
  226. * the username to set
  227. */
  228. public void setUsername(String username) {
  229. this.username = username;
  230. }
  231. /**
  232. * @return the password
  233. */
  234. public String getPassword() {
  235. return password;
  236. }
  237. /**
  238. * @param password
  239. * the password to set
  240. */
  241. public void setPassword(String password) {
  242. this.password = password;
  243. }
  244. /**
  245. * @return the diskSize
  246. */
  247. public int getDiskSize() {
  248. return diskSize;
  249. }
  250. /**
  251. * @param diskSize
  252. * the diskSize to set
  253. */
  254. public void setDiskSize(int diskSize) {
  255. this.diskSize = diskSize;
  256. }
  257. public String[] getProperties() {
  258. return properties;
  259. }
  260. public void setProperties(String[] properties) {
  261. this.properties = properties;
  262. }
  263. }