PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms 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
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.ql.plan;
  19. import java.io.Serializable;
  20. import java.util.List;
  21. import org.apache.hadoop.hive.ql.security.authorization.Privilege;
  22. @Explain(displayName = "Privilege")
  23. public class PrivilegeDesc implements Serializable, Cloneable {
  24. private static final long serialVersionUID = 1L;
  25. private Privilege privilege;
  26. private List<String> columns;
  27. public PrivilegeDesc(Privilege privilege, List<String> columns) {
  28. super();
  29. this.privilege = privilege;
  30. this.columns = columns;
  31. }
  32. public PrivilegeDesc() {
  33. super();
  34. }
  35. /**
  36. * @return privilege definition
  37. */
  38. @Explain(displayName = "privilege")
  39. public Privilege getPrivilege() {
  40. return privilege;
  41. }
  42. /**
  43. * @param privilege
  44. */
  45. public void setPrivilege(Privilege privilege) {
  46. this.privilege = privilege;
  47. }
  48. /**
  49. * @return columns on which the given privilege take affect.
  50. */
  51. @Explain(displayName = "columns")
  52. public List<String> getColumns() {
  53. return columns;
  54. }
  55. /**
  56. * @param columns
  57. */
  58. public void setColumns(List<String> columns) {
  59. this.columns = columns;
  60. }
  61. }