fi.foyt.fni.persistence.model.materials.StarredMaterial Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of persistence Show documentation
Show all versions of persistence Show documentation
Forge & Illusion - Persistence
package fi.foyt.fni.persistence.model.materials;
import java.util.Date;
import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import fi.foyt.fni.persistence.model.users.User;
@Entity
@Cacheable (true)
@Cache (usage = CacheConcurrencyStrategy.TRANSACTIONAL)
public class StarredMaterial {
public Long getId() {
return id;
}
public Material getMaterial() {
return material;
}
public void setMaterial(Material material) {
this.material = material;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
@Id
@GeneratedValue (strategy=GenerationType.IDENTITY)
private Long id;
@ManyToOne
private Material material;
@ManyToOne
private User user;
@Column (nullable=false)
@Temporal (TemporalType.TIMESTAMP)
private Date created;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy