Subversion Repositories WebE

Rev

Rev 33 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

1
package ch.ffhs.webE.domain;

// Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * ObjectType generated by hbm2java
 */

@Entity
@Table(name = "object_type", catalog = "webengineering", uniqueConstraints = @UniqueConstraint(columnNames = "name"))
public class ObjectType implements java.io.Serializable {

        private int objectTypeId;
        private String name;
        private Set<Object> objects = new HashSet<Object>(0);

        public ObjectType() {
        }

        public ObjectType(int objectTypeId) {
                this.objectTypeId = objectTypeId;
        }

        public ObjectType(int objectTypeId, String name, Set<Object> objects) {
                this.objectTypeId = objectTypeId;
                this.name = name;
                this.objects = objects;
        }

        @Id
        @Column(name = "object_type_id", unique = true, nullable = false)
        public int getObjectTypeId() {
                return this.objectTypeId;
        }

        public void setObjectTypeId(int objectTypeId) {
                this.objectTypeId = objectTypeId;
        }

        @Column(name = "name", unique = true, length = 45)
        public String getName() {
                return this.name;
        }

        public void setName(String name) {
                this.name = name;
        }

        @OneToMany(fetch = FetchType.LAZY, mappedBy = "objectType")
        public Set<Object> getObjects() {
                return this.objects;
        }

        public void setObjects(Set<Object> objects) {
                this.objects = objects;
        }

}