PageRenderTime 24ms CodeModel.GetById 11ms app.highlight 9ms RepoModel.GetById 2ms 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
  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
 19package org.apache.hadoop.hive.metastore.model;
 20
 21public class MTablePrivilege {
 22  
 23  private String principalName;
 24  
 25  private String principalType;
 26
 27  private MTable table;
 28  
 29  private String privilege;
 30  
 31  private int createTime;
 32  
 33  private String grantor;
 34  
 35  private String grantorType;
 36
 37  private boolean grantOption;
 38  
 39  public MTablePrivilege() {
 40  }
 41
 42  public MTablePrivilege(String principalName, String principalType,
 43      MTable table, String privilege, int createTime,
 44      String grantor, String grantorType, boolean grantOption) {
 45    super();
 46    this.principalName = principalName;
 47    this.principalType = principalType;
 48    this.table = table;
 49    this.privilege = privilege;
 50    this.createTime = createTime;
 51    this.grantor = grantor;
 52    this.grantorType = grantorType;
 53    this.grantOption = grantOption;
 54  }
 55
 56  public String getPrincipalName() {
 57    return principalName;
 58  }
 59
 60  public void setPrincipalName(String principalName) {
 61    this.principalName = principalName;
 62  }
 63
 64
 65  /**
 66   * @return a set of privileges this user/role/group has
 67   */
 68  public String getPrivilege() {
 69    return privilege;
 70  }
 71
 72  /**
 73   * @param dbPrivilege a set of privileges this user/role/group has
 74   */
 75  public void setPrivilege(String dbPrivilege) {
 76    this.privilege = dbPrivilege;
 77  }
 78  
 79  /**
 80   * @return create time
 81   */
 82  public int getCreateTime() {
 83    return createTime;
 84  }
 85
 86  /**
 87   * @param createTime create time
 88   */
 89  public void setCreateTime(int createTime) {
 90    this.createTime = createTime;
 91  }
 92
 93  /**
 94   * @return
 95   */
 96  public String getGrantor() {
 97    return grantor;
 98  }
 99
100  /**
101   * @param grantor
102   */
103  public void setGrantor(String grantor) {
104    this.grantor = grantor;
105  }
106
107  public String getPrincipalType() {
108    return principalType;
109  }
110
111  public void setPrincipalType(String principalType) {
112    this.principalType = principalType;
113  }
114
115  public MTable getTable() {
116    return table;
117  }
118
119  public void setTable(MTable table) {
120    this.table = table;
121  }
122
123  public boolean getGrantOption() {
124    return grantOption;
125  }
126
127  public void setGrantOption(boolean grantOption) {
128    this.grantOption = grantOption;
129  }
130  
131  public String getGrantorType() {
132    return grantorType;
133  }
134
135  public void setGrantorType(String grantorType) {
136    this.grantorType = grantorType;
137  }
138
139}