Home » apache-openwebbeans-1.0.0-incubating-M3-binary » org.apache.webbeans.reservation » entity » [javadoc | source]

    1   /*
    2    *  Licensed to the Apache Software Foundation (ASF) under one or more
    3    *  contributor license agreements.  See the NOTICE file distributed with
    4    *  this work for additional information regarding copyright ownership.
    5    *  The ASF licenses this file to You under the Apache License, Version 2.0
    6    *  (the "License"); you may not use this file except in compliance with
    7    *  the License.  You may obtain a copy of the License at
    8    * 
    9    *       http://www.apache.org/licenses/LICENSE-2.0
   10    * 
   11    *  Unless required by applicable law or agreed to in writing, software
   12    *  distributed under the License is distributed on an "AS IS" BASIS,
   13    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    *  See the License for the specific language governing permissions and
   15    *  limitations under the License.
   16    */
   17   package org.apache.webbeans.reservation.entity;
   18   
   19   import javax.persistence.Column;
   20   import javax.persistence.Entity;
   21   import javax.persistence.GeneratedValue;
   22   import javax.persistence.Id;
   23   import javax.persistence.Version;
   24   
   25   @Entity
   26   public class Hotel
   27   {
   28       @Id
   29       @GeneratedValue
   30       private int id;
   31       
   32       @Column(length=100,nullable=false)
   33       private String name;
   34       
   35       @Column
   36       private int star;
   37       
   38       @Column(nullable=false, length=100)
   39       private String city;
   40       
   41       @Column(nullable=false, length=100)
   42       private String country;
   43       
   44       @Version
   45       private int version;
   46       
   47       public Hotel()
   48       {
   49           
   50       }
   51   
   52       /**
   53        * @return the name
   54        */
   55       public String getName()
   56       {
   57           return name;
   58       }
   59   
   60       /**
   61        * @param name the name to set
   62        */
   63       public void setName(String name)
   64       {
   65           this.name = name;
   66       }
   67   
   68       /**
   69        * @return the star
   70        */
   71       public int getStar()
   72       {
   73           return star;
   74       }
   75   
   76       /**
   77        * @param star the star to set
   78        */
   79       public void setStar(int star)
   80       {
   81           this.star = star;
   82       }
   83   
   84       /**
   85        * @return the city
   86        */
   87       public String getCity()
   88       {
   89           return city;
   90       }
   91   
   92       /**
   93        * @param city the city to set
   94        */
   95       public void setCity(String city)
   96       {
   97           this.city = city;
   98       }
   99   
  100       /**
  101        * @return the country
  102        */
  103       public String getCountry()
  104       {
  105           return country;
  106       }
  107   
  108       /**
  109        * @param country the country to set
  110        */
  111       public void setCountry(String country)
  112       {
  113           this.country = country;
  114       }
  115   
  116       /**
  117        * @return the id
  118        */
  119       public int getId()
  120       {
  121           return id;
  122       }
  123   
  124       /**
  125        * @return the version
  126        */
  127       protected int getVersion()
  128       {
  129           return version;
  130       }
  131       
  132       
  133       
  134   }

Home » apache-openwebbeans-1.0.0-incubating-M3-binary » org.apache.webbeans.reservation » entity » [javadoc | source]