PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.1-rc2/hive/external/ql/src/java/org/apache/hadoop/hive/ql/plan/PrivilegeDesc.java

#
Java | 74 lines | 32 code | 13 blank | 29 comment | 0 complexity | 3317488bff89cdc2eb08b201ae7a3e31 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.ql.plan;
20
21import java.io.Serializable;
22import java.util.List;
23
24import org.apache.hadoop.hive.ql.security.authorization.Privilege;
25
26@Explain(displayName = "Privilege")
27public class PrivilegeDesc implements Serializable, Cloneable {
28  private static final long serialVersionUID = 1L;
29  
30  private Privilege privilege;
31  
32  private List<String> columns;
33
34  public PrivilegeDesc(Privilege privilege, List<String> columns) {
35    super();
36    this.privilege = privilege;
37    this.columns = columns;
38  }
39
40  public PrivilegeDesc() {
41    super();
42  }
43
44  /**
45   * @return privilege definition
46   */
47  @Explain(displayName = "privilege")
48  public Privilege getPrivilege() {
49    return privilege;
50  }
51
52  /**
53   * @param privilege
54   */
55  public void setPrivilege(Privilege privilege) {
56    this.privilege = privilege;
57  }
58
59  /**
60   * @return columns on which the given privilege take affect.
61   */
62  @Explain(displayName = "columns")
63  public List<String> getColumns() {
64    return columns;
65  }
66
67  /**
68   * @param columns
69   */
70  public void setColumns(List<String> columns) {
71    this.columns = columns;
72  }
73  
74}