Subversion Repositories WebE

Rev

Rev 33 | 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.util.Date;

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.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * History generated by hbm2java
 */

@Entity
@Table(name = "history", catalog = "webengineering")
public class History implements java.io.Serializable
{
  /**
   * Serialization version ID
   */

  private static final long serialVersionUID = 1L;

  private int id;
  private User user;
  private ActionType actionType;
  private ObjectEntity object;
  private String value;
  private String comment;
  private Date date;

  /**
   *
   */

  public History()
  {
  }

  /**
   * @param user
   * @param actionType
   * @param object
   * @param date
   */

  public History(User user, ActionType actionType, ObjectEntity object,
      Date date)
  {
    this.user = user;
    this.actionType = actionType;
    this.object = object;
    this.date = date;
  }

  /**
   * @param user
   * @param actionType
   * @param object
   * @param value
   * @param comment
   * @param date
   */

  public History(User user, ActionType actionType, ObjectEntity object,
      String value, String comment, Date date)
  {
    this.user = user;
    this.actionType = actionType;
    this.object = object;
    this.value = value;
    this.comment = comment;
    this.date = date;
  }

  /**
   * @return
   */

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

  /**
   * @param id
   */

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

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "user_id", nullable = false)
  public User getUser()
  {
    return this.user;
  }

  /**
   * @param user
   */

  public void setUser(User user)
  {
    this.user = user;
  }

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "action_type_id", nullable = false)
  public ActionType getActionType()
  {
    return this.actionType;
  }

  /**
   * @param actionType
   */

  public void setActionType(ActionType actionType)
  {
    this.actionType = actionType;
  }

  /**
   * @return
   */

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "objects_id", nullable = false)
  public ObjectEntity getObject()
  {
    return this.object;
  }

  /**
   * @param object
   */

  public void setObject(ObjectEntity object)
  {
    this.object = object;
  }

  /**
   * @return
   */

  @Column(name = "value", length = 45)
  public String getValue()
  {
    return this.value;
  }

  /**
   * @param value
   */

  public void setValue(String value)
  {
    this.value = value;
  }

  /**
   * @return
   */

  @Column(name = "comment")
  public String getComment()
  {
    return this.comment;
  }

  /**
   * @param comment
   */

  public void setComment(String comment)
  {
    this.comment = comment;
  }

  /**
   * @return
   */

  @Temporal(TemporalType.TIMESTAMP)
  @Column(name = "date", nullable = false, length = 19)
  public Date getDate()
  {
    return this.date;
  }

  /**
   * @param date
   */

  public void setDate(Date date)
  {
    this.date = date;
  }

}