001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.rest.model;
019
020import java.io.Serializable;
021import javax.xml.bind.annotation.XmlAttribute;
022import javax.xml.bind.annotation.XmlRootElement;
023import org.apache.yetus.audience.InterfaceAudience;
024
025/**
026 * Simple representation of a table name.
027 *
028 * <pre>
029 * &lt;complexType name="Table"&gt;
030 *   &lt;sequence&gt;
031 *     &lt;element name="name" type="string"&gt;&lt;/element&gt;
032 *   &lt;/sequence&gt;
033 * &lt;/complexType&gt;
034 * </pre>
035 */
036@XmlRootElement(name = "table")
037@InterfaceAudience.Private
038public class TableModel implements Serializable {
039
040  private static final long serialVersionUID = 1L;
041
042  private String name;
043
044  /**
045   * Default constructor
046   */
047  public TableModel() {
048  }
049
050  /**
051   * Constructor n
052   */
053  public TableModel(String name) {
054    super();
055    this.name = name;
056  }
057
058  /** Returns the name */
059  @XmlAttribute
060  public String getName() {
061    return name;
062  }
063
064  /**
065   * @param name the name to set
066   */
067  public void setName(String name) {
068    this.name = name;
069  }
070
071  /*
072   * (non-Javadoc)
073   * @see java.lang.Object#toString()
074   */
075  @Override
076  public String toString() {
077    return this.name;
078  }
079}