PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/metastore/src/model/org/apache/hadoop/hive/metastore/model/MTable.java

#
Java | 240 lines | 107 code | 30 blank | 103 comment | 0 complexity | 998dad1c46bbe347501bfa045b050e9f MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. package org.apache.hadoop.hive.metastore.model;
  19. import java.util.List;
  20. import java.util.Map;
  21. public class MTable {
  22. private String tableName;
  23. private MDatabase database;
  24. private MStorageDescriptor sd;
  25. private String owner;
  26. private int createTime;
  27. private int lastAccessTime;
  28. private int retention;
  29. private List<MFieldSchema> partitionKeys;
  30. private Map<String, String> parameters;
  31. private String viewOriginalText;
  32. private String viewExpandedText;
  33. private String tableType;
  34. public MTable() {}
  35. /**
  36. * @param tableName
  37. * @param database
  38. * @param sd
  39. * @param owner
  40. * @param createTime
  41. * @param lastAccessTime
  42. * @param retention
  43. * @param partitionKeys
  44. * @param parameters
  45. * @param viewOriginalText
  46. * @param viewExpandedText
  47. * @param tableType
  48. */
  49. public MTable(String tableName, MDatabase database, MStorageDescriptor sd, String owner,
  50. int createTime, int lastAccessTime, int retention, List<MFieldSchema> partitionKeys,
  51. Map<String, String> parameters,
  52. String viewOriginalText, String viewExpandedText, String tableType) {
  53. this.tableName = tableName;
  54. this.database = database;
  55. this.sd = sd;
  56. this.owner = owner;
  57. this.createTime = createTime;
  58. this.setLastAccessTime(lastAccessTime);
  59. this.retention = retention;
  60. this.partitionKeys = partitionKeys;
  61. this.parameters = parameters;
  62. this.viewOriginalText = viewOriginalText;
  63. this.viewExpandedText = viewExpandedText;
  64. this.tableType = tableType;
  65. }
  66. /**
  67. * @return the tableName
  68. */
  69. public String getTableName() {
  70. return tableName;
  71. }
  72. /**
  73. * @param tableName the tableName to set
  74. */
  75. public void setTableName(String tableName) {
  76. this.tableName = tableName;
  77. }
  78. /**
  79. * @return the sd
  80. */
  81. public MStorageDescriptor getSd() {
  82. return sd;
  83. }
  84. /**
  85. * @param sd the sd to set
  86. */
  87. public void setSd(MStorageDescriptor sd) {
  88. this.sd = sd;
  89. }
  90. /**
  91. * @return the partKeys
  92. */
  93. public List<MFieldSchema> getPartitionKeys() {
  94. return partitionKeys;
  95. }
  96. /**
  97. * @param partKeys the partKeys to set
  98. */
  99. public void setPartitionKeys(List<MFieldSchema> partKeys) {
  100. this.partitionKeys = partKeys;
  101. }
  102. /**
  103. * @return the parameters
  104. */
  105. public Map<String, String> getParameters() {
  106. return parameters;
  107. }
  108. /**
  109. * @param parameters the parameters to set
  110. */
  111. public void setParameters(Map<String, String> parameters) {
  112. this.parameters = parameters;
  113. }
  114. /**
  115. * @return the original view text, or null if this table is not a view
  116. */
  117. public String getViewOriginalText() {
  118. return viewOriginalText;
  119. }
  120. /**
  121. * @param viewOriginalText the original view text to set
  122. */
  123. public void setViewOriginalText(String viewOriginalText) {
  124. this.viewOriginalText = viewOriginalText;
  125. }
  126. /**
  127. * @return the expanded view text, or null if this table is not a view
  128. */
  129. public String getViewExpandedText() {
  130. return viewExpandedText;
  131. }
  132. /**
  133. * @param viewExpandedText the expanded view text to set
  134. */
  135. public void setViewExpandedText(String viewExpandedText) {
  136. this.viewExpandedText = viewExpandedText;
  137. }
  138. /**
  139. * @return the owner
  140. */
  141. public String getOwner() {
  142. return owner;
  143. }
  144. /**
  145. * @param owner the owner to set
  146. */
  147. public void setOwner(String owner) {
  148. this.owner = owner;
  149. }
  150. /**
  151. * @return the createTime
  152. */
  153. public int getCreateTime() {
  154. return createTime;
  155. }
  156. /**
  157. * @param createTime the createTime to set
  158. */
  159. public void setCreateTime(int createTime) {
  160. this.createTime = createTime;
  161. }
  162. /**
  163. * @return the database
  164. */
  165. public MDatabase getDatabase() {
  166. return database;
  167. }
  168. /**
  169. * @param database the database to set
  170. */
  171. public void setDatabase(MDatabase database) {
  172. this.database = database;
  173. }
  174. /**
  175. * @return the retention
  176. */
  177. public int getRetention() {
  178. return retention;
  179. }
  180. /**
  181. * @param retention the retention to set
  182. */
  183. public void setRetention(int retention) {
  184. this.retention = retention;
  185. }
  186. /**
  187. * @param lastAccessTime the lastAccessTime to set
  188. */
  189. public void setLastAccessTime(int lastAccessTime) {
  190. this.lastAccessTime = lastAccessTime;
  191. }
  192. /**
  193. * @return the lastAccessTime
  194. */
  195. public int getLastAccessTime() {
  196. return lastAccessTime;
  197. }
  198. /**
  199. * @param tableType the tableType to set
  200. */
  201. public void setTableType(String tableType) {
  202. this.tableType = tableType;
  203. }
  204. /**
  205. * @return the tableType
  206. */
  207. public String getTableType() {
  208. return tableType;
  209. }
  210. }