~raginggoblin/infolog/infolog

« back to all changes in this revision

Viewing changes to InfologServer/lib/hibernate-annotations-3.4.0.GA/test/org/hibernate/test/annotations/access/Furniture.java

  • Committer: Raging Goblin
  • Date: 2013-11-16 16:51:32 UTC
  • Revision ID: raging_goblin-20131116165132-weujnptzc88uy4ah
Mavenized the project, now using shared project InfologSync

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//$Id: Furniture.java 14736 2008-06-04 14:23:42Z hardy.ferentschik $
2
 
package org.hibernate.test.annotations.access;
3
 
 
4
 
import javax.persistence.Entity;
5
 
import javax.persistence.GeneratedValue;
6
 
import javax.persistence.Id;
7
 
import javax.persistence.Transient;
8
 
 
9
 
import org.hibernate.annotations.AccessType;
10
 
 
11
 
/**
12
 
 * @author Emmanuel Bernard
13
 
 */
14
 
@Entity
15
 
@AccessType("field")
16
 
public class Furniture extends Woody {
17
 
        @Id
18
 
        @GeneratedValue
19
 
        private Integer id;
20
 
 
21
 
        private String brand;
22
 
 
23
 
        @Transient
24
 
        public String getBrand() {
25
 
                return brand;
26
 
        }
27
 
 
28
 
        public void setBrand(String brand) {
29
 
                this.brand = brand;
30
 
        }
31
 
 
32
 
        public Integer getId() {
33
 
                return id;
34
 
        }
35
 
 
36
 
        public void setId(Integer id) {
37
 
                this.id = id;
38
 
        }
39
 
 
40
 
 
41
 
        @AccessType("property")
42
 
        public long weight;
43
 
 
44
 
        public long getWeight() {
45
 
                return weight + 1;
46
 
        }
47
 
 
48
 
        public void setWeight(long weight) {
49
 
                this.weight = weight + 1;
50
 
        }
51
 
}