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