Subversion Repositories WebE

Rev

Rev 21 | 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 static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ObjectEntity generated by hbm2java
 */

@Entity
@Table(name = "object", catalog = "webengineering")
public class ObjectEntity implements Serializable
{
  /**
   * Version ID for serialization
   */

  private static final long serialVersionUID = 1L;

  /* Persistent fields */
  private Integer id;
  private User userByEditorId;
  private ObjectType objectType;
  private User userByOwnerId;
  private Date locked;
  private Date modified;
  private Boolean deleted;
  private Term term;
  private Set<History> histories = new HashSet<History>(0);
  private Relationship relationship;

  /**
   *
   */

  public ObjectEntity()
  {
  }

  /**
   * @param userByEditorId
   * @param objectType
   * @param userByOwnerId
   */

  public ObjectEntity(User userByEditorId, ObjectType objectType,
      User userByOwnerId)
  {
    this.userByEditorId = userByEditorId;
    this.objectType = objectType;
    this.userByOwnerId = userByOwnerId;
  }

  /**
   * @param userByEditorId
   * @param objectType
   * @param userByOwnerId
   * @param locked
   * @param modified
   * @param deleted
   * @param term
   * @param histories
   * @param relationship
   */

  public ObjectEntity(User userByEditorId, ObjectType objectType,
      User userByOwnerId, Date locked, Date modified, Boolean deleted,
      Term term, Set<History> histories, Relationship relationship)
  {
    this.userByEditorId = userByEditorId;
    this.objectType = objectType;
    this.userByOwnerId = userByOwnerId;
    this.locked = locked;
    this.modified = modified;
    this.deleted = deleted;
    this.term = term;
    this.histories = histories;
    this.relationship = relationship;
  }

  /**
   * @return
   */

  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Integer getId()
  {
    return this.id;
  }

  /**
   * @param id
   */

  public void setId(Integer id)
  {
    this.id = id;
  }

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "editor_id", nullable = false)
  public User getUserByEditorId()
  {
    return this.userByEditorId;
  }

  /**
   * @param userByEditorId
   */

  public void setUserByEditorId(User userByEditorId)
  {
    this.userByEditorId = userByEditorId;
  }

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "object_type_id", nullable = false)
  public ObjectType getObjectType()
  {
    return this.objectType;
  }

  /**
   * @param objectType
   */

  public void setObjectType(ObjectType objectType)
  {
    this.objectType = objectType;
  }

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "owner_id", nullable = false)
  public User getUserByOwnerId()
  {
    return this.userByOwnerId;
  }

  /**
   * @param userByOwnerId
   */

  public void setUserByOwnerId(User userByOwnerId)
  {
    this.userByOwnerId = userByOwnerId;
  }

  /**
   * @return
   */

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "locked", length = 19)
  public Date getLocked()
  {
    return this.locked;
  }

  /**
   * @param locked
   */

  public void setLocked(Date locked)
  {
    this.locked = locked;
  }

  /**
   * @return
   */

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "modified", length = 19)
  public Date getModified()
  {
    return this.modified;
  }

  /**
   * @param modified
   */

  public void setModified(Date modified)
  {
    this.modified = modified;
  }

  /**
   * @return
   */

  @Column(name = "deleted")
  public Boolean getDeleted()
  {
    return this.deleted;
  }

  /**
   * @param deleted
   */

  public void setDeleted(Boolean deleted)
  {
    this.deleted = deleted;
  }

  /**
   * @return
   */

  @OneToOne(fetch = FetchType.LAZY, mappedBy = "object")
  public Term getTerm()
  {
    return this.term;
  }

  /**
   * @param term
   */

  public void setTerm(Term term)
  {
    this.term = term;
  }

  /**
   * @return
   */

  @OneToMany(fetch = FetchType.LAZY, mappedBy = "object")
  public Set<History> getHistories()
  {
    return this.histories;
  }

  /**
   * @param histories
   */

  public void setHistories(Set<History> histories)
  {
    this.histories = histories;
  }

  /**
   * @return
   */

  @OneToOne(fetch = FetchType.LAZY, mappedBy = "object")
  public Relationship getRelationship()
  {
    return this.relationship;
  }

  /**
   * @param relationship
   */

  public void setRelationship(Relationship relationship)
  {
    this.relationship = relationship;
  }

}