~ubuntu-branches/ubuntu/wily/libhibernate3-java/wily-proposed

« back to all changes in this revision

Viewing changes to test/org/hibernate/test/unionsubclass/Location.java

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-10-14 14:43:34 UTC
  • Revision ID: james.westby@ubuntu.com-20071014144334-eamc8i0q10gs1aro
Tags: upstream-3.2.5
ImportĀ upstreamĀ versionĀ 3.2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//$Id: Location.java 4357 2004-08-17 09:20:17Z oneovthafew $
 
2
package org.hibernate.test.unionsubclass;
 
3
 
 
4
import java.util.ArrayList;
 
5
import java.util.Collection;
 
6
 
 
7
/**
 
8
 * @author Gavin King
 
9
 */
 
10
public class Location {
 
11
        private long id;
 
12
        private String name;
 
13
        private Collection beings = new ArrayList();
 
14
        
 
15
        Location() {}
 
16
        
 
17
        public Location(String name) {
 
18
                this.name = name;
 
19
        }
 
20
        
 
21
        public void addBeing(Being b) {
 
22
                b.setLocation(this);
 
23
                beings.add(b);
 
24
        }
 
25
        /**
 
26
         * @return Returns the id.
 
27
         */
 
28
        public long getId() {
 
29
                return id;
 
30
        }
 
31
        /**
 
32
         * @param id The id to set.
 
33
         */
 
34
        public void setId(long id) {
 
35
                this.id = id;
 
36
        }
 
37
        /**
 
38
         * @return Returns the name.
 
39
         */
 
40
        public String getName() {
 
41
                return name;
 
42
        }
 
43
        /**
 
44
         * @param name The name to set.
 
45
         */
 
46
        public void setName(String name) {
 
47
                this.name = name;
 
48
        }
 
49
        /**
 
50
         * @return Returns the beings.
 
51
         */
 
52
        public Collection getBeings() {
 
53
                return beings;
 
54
        }
 
55
        /**
 
56
         * @param beings The beings to set.
 
57
         */
 
58
        public void setBeings(Collection beings) {
 
59
                this.beings = beings;
 
60
        }
 
61
}