PageRenderTime 51ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Java | 160 lines | 82 code | 33 blank | 45 comment | 0 complexity | 0d0db569dad4a10906c374b4e954a8c8 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. public class MPartitionColumnPrivilege {
  20. private String principalName;
  21. private String principalType;
  22. private MPartition partition;
  23. private String columnName;
  24. private String privilege;
  25. private int createTime;
  26. private String grantor;
  27. private String grantorType;
  28. private boolean grantOption;
  29. public MPartitionColumnPrivilege() {
  30. }
  31. /**
  32. * @param principalName
  33. * @param isRole
  34. * @param isGroup
  35. * @param partition
  36. * @param columnName
  37. * @param privileges
  38. * @param createTime
  39. * @param grantor
  40. */
  41. public MPartitionColumnPrivilege(String principalName, String principalType,
  42. MPartition partition, String columnName, String privileges, int createTime,
  43. String grantor, String grantorType, boolean grantOption) {
  44. super();
  45. this.principalName = principalName;
  46. this.principalType = principalType;
  47. this.partition = partition;
  48. this.columnName = columnName;
  49. this.privilege = privileges;
  50. this.createTime = createTime;
  51. this.grantor = grantor;
  52. this.grantorType = grantorType;
  53. this.grantOption = grantOption;
  54. }
  55. /**
  56. * @return column name
  57. */
  58. public String getColumnName() {
  59. return columnName;
  60. }
  61. /**
  62. * @param columnName column name
  63. */
  64. public void setColumnName(String columnName) {
  65. this.columnName = columnName;
  66. }
  67. /**
  68. * @return a set of privileges this user/role/group has
  69. */
  70. public String getPrivilege() {
  71. return privilege;
  72. }
  73. /**
  74. * @param dbPrivileges a set of privileges this user/role/group has
  75. */
  76. public void setPrivilege(String dbPrivileges) {
  77. this.privilege = dbPrivileges;
  78. }
  79. /**
  80. * @return create time
  81. */
  82. public int getCreateTime() {
  83. return createTime;
  84. }
  85. /**
  86. * @param createTime create time
  87. */
  88. public void setCreateTime(int createTime) {
  89. this.createTime = createTime;
  90. }
  91. public String getPrincipalName() {
  92. return principalName;
  93. }
  94. public void setPrincipalName(String principalName) {
  95. this.principalName = principalName;
  96. }
  97. public MPartition getPartition() {
  98. return partition;
  99. }
  100. public void setPartition(MPartition partition) {
  101. this.partition = partition;
  102. }
  103. public String getGrantor() {
  104. return grantor;
  105. }
  106. public void setGrantor(String grantor) {
  107. this.grantor = grantor;
  108. }
  109. public String getGrantorType() {
  110. return grantorType;
  111. }
  112. public void setGrantorType(String grantorType) {
  113. this.grantorType = grantorType;
  114. }
  115. public boolean getGrantOption() {
  116. return grantOption;
  117. }
  118. public void setGrantOption(boolean grantOption) {
  119. this.grantOption = grantOption;
  120. }
  121. public String getPrincipalType() {
  122. return principalType;
  123. }
  124. public void setPrincipalType(String principalType) {
  125. this.principalType = principalType;
  126. }
  127. }