1 /*
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20 package org.apache.hadoop.hbase.rest.model;
21
22 import java.io.Serializable;
23
24 import javax.xml.bind.annotation.XmlAttribute;
25 import javax.xml.bind.annotation.XmlRootElement;
26
27 import org.apache.hadoop.hbase.classification.InterfaceAudience;
28
29 /**
30 * Simple representation of a table name.
31 *
32 * <pre>
33 * <complexType name="Table">
34 * <sequence>
35 * <element name="name" type="string"></element>
36 * </sequence>
37 * </complexType>
38 * </pre>
39 */
40 @XmlRootElement(name="table")
41 @InterfaceAudience.Private
42 public class TableModel implements Serializable {
43
44 private static final long serialVersionUID = 1L;
45
46 private String name;
47
48 /**
49 * Default constructor
50 */
51 public TableModel() {}
52
53 /**
54 * Constructor
55 * @param name
56 */
57 public TableModel(String name) {
58 super();
59 this.name = name;
60 }
61
62 /**
63 * @return the name
64 */
65 @XmlAttribute
66 public String getName() {
67 return name;
68 }
69
70 /**
71 * @param name the name to set
72 */
73 public void setName(String name) {
74 this.name = name;
75 }
76
77 /* (non-Javadoc)
78 * @see java.lang.Object#toString()
79 */
80 @Override
81 public String toString() {
82 return this.name;
83 }
84 }