Rev 21 |
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.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.OneToMany;
import javax.persistence.Table;
/**
* ActionType generated by hbm2java
*/
@
Entity
@Table
(name =
"action_type", catalog =
"webengineering")
public class ActionType
implements java.
io.
Serializable
{
/**
* History action ID for adding an item
*/
public static final int ADD =
1;
/**
* History action ID for renaming a term
*/
public static final int RENAME =
2;
/**
* History action ID for modifying a relationship
*/
public static final int MODIFY =
3;
private int id
;
private String name
;
private Set<History
> histories =
new HashSet<History
>(0);
public ActionType
()
{
}
/**
* @param id
*/
public ActionType
(int id
)
{
this.
setId(id
);
}
public ActionType
(String name,
Set<History
> histories
)
{
this.
setName(name
);
this.
setHistories(histories
);
}
@Id
@GeneratedValue
(strategy = IDENTITY
)
@Column
(name =
"id", unique =
true, nullable =
false)
public int getId
()
{
return this.
id;
}
public void setId
(int id
)
{
this.
id = id
;
}
@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
;
}
}