PageRenderTime 50ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Java | 139 lines | 74 code | 30 blank | 35 comment | 0 complexity | 3ab2b1af5d58c1e6a389efebea963125 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 MTablePrivilege {
  20. private String principalName;
  21. private String principalType;
  22. private MTable table;
  23. private String privilege;
  24. private int createTime;
  25. private String grantor;
  26. private String grantorType;
  27. private boolean grantOption;
  28. public MTablePrivilege() {
  29. }
  30. public MTablePrivilege(String principalName, String principalType,
  31. MTable table, String privilege, int createTime,
  32. String grantor, String grantorType, boolean grantOption) {
  33. super();
  34. this.principalName = principalName;
  35. this.principalType = principalType;
  36. this.table = table;
  37. this.privilege = privilege;
  38. this.createTime = createTime;
  39. this.grantor = grantor;
  40. this.grantorType = grantorType;
  41. this.grantOption = grantOption;
  42. }
  43. public String getPrincipalName() {
  44. return principalName;
  45. }
  46. public void setPrincipalName(String principalName) {
  47. this.principalName = principalName;
  48. }
  49. /**
  50. * @return a set of privileges this user/role/group has
  51. */
  52. public String getPrivilege() {
  53. return privilege;
  54. }
  55. /**
  56. * @param dbPrivilege a set of privileges this user/role/group has
  57. */
  58. public void setPrivilege(String dbPrivilege) {
  59. this.privilege = dbPrivilege;
  60. }
  61. /**
  62. * @return create time
  63. */
  64. public int getCreateTime() {
  65. return createTime;
  66. }
  67. /**
  68. * @param createTime create time
  69. */
  70. public void setCreateTime(int createTime) {
  71. this.createTime = createTime;
  72. }
  73. /**
  74. * @return
  75. */
  76. public String getGrantor() {
  77. return grantor;
  78. }
  79. /**
  80. * @param grantor
  81. */
  82. public void setGrantor(String grantor) {
  83. this.grantor = grantor;
  84. }
  85. public String getPrincipalType() {
  86. return principalType;
  87. }
  88. public void setPrincipalType(String principalType) {
  89. this.principalType = principalType;
  90. }
  91. public MTable getTable() {
  92. return table;
  93. }
  94. public void setTable(MTable table) {
  95. this.table = table;
  96. }
  97. public boolean getGrantOption() {
  98. return grantOption;
  99. }
  100. public void setGrantOption(boolean grantOption) {
  101. this.grantOption = grantOption;
  102. }
  103. public String getGrantorType() {
  104. return grantorType;
  105. }
  106. public void setGrantorType(String grantorType) {
  107. this.grantorType = grantorType;
  108. }
  109. }