Home » openejb-3.1.2-src » org.superbiz.moviefun » [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.superbiz.moviefun;
   18   
   19   import java.io.Serializable;
   20   
   21   import javax.persistence.Entity;
   22   import javax.persistence.Id;
   23   import javax.persistence.GeneratedValue;
   24   import javax.persistence.GenerationType;
   25   
   26   @Entity
   27   public class Movie implements Serializable {
   28   
   29   	private static final long serialVersionUID = 1L;
   30   
   31   	@Id
   32       @GeneratedValue(strategy = GenerationType.AUTO)
   33       private long id;
   34   
   35       private String director;
   36       private String title;
   37       private int year;
   38       private String genre;
   39       private int rating;
   40   
   41   
   42       public Movie() {
   43       }
   44   
   45       public Movie(String title, String director, String genre, int rating, int year) {
   46           this.director = director;
   47           this.title = title;
   48           this.year = year;
   49           this.genre = genre;
   50           this.rating = rating;
   51       }
   52   
   53       public Movie(String director, String title, int year) {
   54           this.director = director;
   55           this.title = title;
   56           this.year = year;
   57       }
   58   
   59       public long getId() {
   60           return id;
   61       }
   62   
   63       public void setId(long id) {
   64           this.id = id;
   65       }
   66   
   67       public String getDirector() {
   68           return director;
   69       }
   70   
   71       public void setDirector(String director) {
   72           this.director = director;
   73       }
   74   
   75       public String getTitle() {
   76           return title;
   77       }
   78   
   79       public void setTitle(String title) {
   80           this.title = title;
   81       }
   82   
   83       public int getYear() {
   84           return year;
   85       }
   86   
   87       public void setYear(int year) {
   88           this.year = year;
   89       }
   90   
   91       public String getGenre() {
   92           return genre;
   93       }
   94   
   95       public void setGenre(String genre) {
   96           this.genre = genre;
   97       }
   98   
   99       public int getRating() {
  100           return rating;
  101       }
  102   
  103       public void setRating(int rating) {
  104           this.rating = rating;
  105       }
  106   }

Home » openejb-3.1.2-src » org.superbiz.moviefun » [javadoc | source]