PageRenderTime 27ms CodeModel.GetById 19ms app.highlight 6ms RepoModel.GetById 1ms 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
  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
 21
 22public class MPartitionColumnPrivilege {
 23
 24  private String principalName; 
 25
 26  private String principalType;
 27
 28  private MPartition partition;
 29
 30  private String columnName;
 31
 32  private String privilege;
 33
 34  private int createTime;
 35  
 36  private String grantor;
 37  
 38  private String grantorType;
 39  
 40  private boolean grantOption;
 41
 42  public MPartitionColumnPrivilege() {
 43  }
 44  
 45  /**
 46   * @param principalName
 47   * @param isRole
 48   * @param isGroup
 49   * @param partition
 50   * @param columnName
 51   * @param privileges
 52   * @param createTime
 53   * @param grantor
 54   */
 55  public MPartitionColumnPrivilege(String principalName, String principalType,
 56      MPartition partition, String columnName, String privileges, int createTime,
 57      String grantor, String grantorType, boolean grantOption) {
 58    super();
 59    this.principalName = principalName;
 60    this.principalType = principalType;
 61    this.partition = partition;
 62    this.columnName = columnName;
 63    this.privilege = privileges;
 64    this.createTime = createTime;
 65    this.grantor = grantor;
 66    this.grantorType = grantorType;
 67    this.grantOption = grantOption;
 68  }
 69  
 70  /**
 71   * @return column name
 72   */
 73  public String getColumnName() {
 74    return columnName;
 75  }
 76
 77  /**
 78   * @param columnName column name
 79   */
 80  public void setColumnName(String columnName) {
 81    this.columnName = columnName;
 82  }
 83
 84  /**
 85   * @return a set of privileges this user/role/group has
 86   */
 87  public String getPrivilege() {
 88    return privilege;
 89  }
 90
 91  /**
 92   * @param dbPrivileges a set of privileges this user/role/group has
 93   */
 94  public void setPrivilege(String dbPrivileges) {
 95    this.privilege = dbPrivileges;
 96  }
 97
 98  /**
 99   * @return create time
100   */
101  public int getCreateTime() {
102    return createTime;
103  }
104
105  /**
106   * @param createTime create time
107   */
108  public void setCreateTime(int createTime) {
109    this.createTime = createTime;
110  }
111
112  public String getPrincipalName() {
113    return principalName;
114  }
115
116  public void setPrincipalName(String principalName) {
117    this.principalName = principalName;
118  }
119
120  public MPartition getPartition() {
121    return partition;
122  }
123
124  public void setPartition(MPartition partition) {
125    this.partition = partition;
126  }
127
128  public String getGrantor() {
129    return grantor;
130  }
131
132  public void setGrantor(String grantor) {
133    this.grantor = grantor;
134  }
135  
136  public String getGrantorType() {
137    return grantorType;
138  }
139
140  public void setGrantorType(String grantorType) {
141    this.grantorType = grantorType;
142  }
143  
144  public boolean getGrantOption() {
145    return grantOption;
146  }
147
148  public void setGrantOption(boolean grantOption) {
149    this.grantOption = grantOption;
150  }
151  
152  public String getPrincipalType() {
153    return principalType;
154  }
155
156  public void setPrincipalType(String principalType) {
157    this.principalType = principalType;
158  }
159
160}