KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > test > regression > ejbthree440 > model > ResourceLocation


1 package org.jboss.ejb3.test.regression.ejbthree440.model;
2
3 import java.io.Serializable JavaDoc;
4
5 import javax.persistence.*;
6
7 @Entity
8 @Table(name="TBRESOURCELOCATION")
9 @TableGenerator(
10     name="RL_SEQ"
11 )
12 public class ResourceLocation implements Serializable JavaDoc {
13   private int id, version;
14   private Resource resource;
15   private Location location;
16   private int factor;
17
18   public int getFactor() {
19     return factor;
20   }
21
22   public void setFactor(int factor) {
23     this.factor = factor;
24   }
25
26   @Id
27   @GeneratedValue(strategy=GenerationType.TABLE, generator="RL_SEQ")
28   public int getId() {
29     return id;
30   }
31
32   public void setId(int id) {
33     this.id = id;
34   }
35
36   @ManyToOne
37   public Location getLocation() {
38     return location;
39   }
40
41   public void setLocation(Location location) {
42     this.location = location;
43   }
44
45   @ManyToOne
46   public Resource getResource() {
47     return resource;
48   }
49
50   public void setResource(Resource resource) {
51     this.resource = resource;
52   }
53
54   @Version
55   public int getVersion() {
56     return version;
57   }
58
59   public void setVersion(int version) {
60     this.version = version;
61   }
62
63 }
64
Popular Tags