added new entity unit
This commit is contained in:
parent
6f0717846d
commit
27a1566309
56
src/main/java/se/su/dsv/scipro/data/dataobjects/Unit.java
Normal file
56
src/main/java/se/su/dsv/scipro/data/dataobjects/Unit.java
Normal file
@ -0,0 +1,56 @@
|
||||
package se.su.dsv.scipro.data.dataobjects;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
import se.su.dsv.scipro.dataproviders.SortableField;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* User: fred
|
||||
* Date: 5/29/12
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="unit")
|
||||
@Cacheable(true)
|
||||
@Cache(usage= CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
|
||||
public class Unit extends DomainObject {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
private Long id;
|
||||
|
||||
@Column(unique=true)
|
||||
private Long identifier;
|
||||
|
||||
@Column(length=255)
|
||||
@Basic(optional=false)
|
||||
@SortableField
|
||||
private String title;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
public void setIdentifier(Long identifier) {
|
||||
this.identifier = identifier;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user