Subversion Repositories WebE

Compare Revisions

Last modification

Ignore whitespace Rev 36 → Rev 37

/trunk/src/ch/ffhs/webE/domain/ActionType.java
2,13 → 2,15
 
// Generated 19.12.2010 14:46:08 by Hibernate Tools 3.4.0.Beta1
 
import static javax.persistence.GenerationType.IDENTITY;
 
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 static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
18,47 → 20,78
*/
@Entity
@Table(name = "action_type", catalog = "webengineering")
public class ActionType implements java.io.Serializable {
public class ActionType implements java.io.Serializable
{
/**
* History action ID for adding an item
*/
public static final int ADD = 1;
 
private Integer id;
private String name;
private Set<History> histories = new HashSet<History>(0);
/**
* History action ID for renaming a term
*/
public static final int RENAME = 2;
 
public ActionType() {
}
/**
* History action ID for modifying a relationship
*/
public static final int MODIFY = 3;
 
public ActionType(String name, Set<History> histories) {
this.name = name;
this.histories = histories;
}
private int id;
private String name;
private Set<History> histories = new HashSet<History>(0);
 
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public Integer getId() {
return this.id;
}
public ActionType()
{
}
 
public void setId(Integer id) {
this.id = id;
}
/**
* @param id
*/
public ActionType(int id)
{
this.setId(id);
}
 
@Column(name = "name", length = 45)
public String getName() {
return this.name;
}
public ActionType(String name, Set<History> histories)
{
this.setName(name);
this.setHistories(histories);
}
 
public void setName(String name) {
this.name = name;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public int getId()
{
return this.id;
}
 
@OneToMany(fetch = FetchType.LAZY, mappedBy = "actionType")
public Set<History> getHistories() {
return this.histories;
}
public void setId(int id)
{
this.id = id;
}
 
public void setHistories(Set<History> histories) {
this.histories = histories;
}
@Column(name = "name", length = 45)
public String getName()
{
return this.name;
}
 
public void setName(String name)
{
this.name = name;
}
 
@OneToMany(fetch = FetchType.LAZY, mappedBy = "actionType")
public Set<History> getHistories()
{
return this.histories;
}
 
public void setHistories(Set<History> histories)
{
this.histories = histories;
}
 
}