Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.softfobia.margiani.bincy.disney.model;
- import java.io.Serializable;
- import java.util.Date;
- import java.util.List;
- import javax.persistence.Entity;
- import javax.persistence.Table;
- import org.hibernate.annotations.Cache;
- import org.hibernate.annotations.CacheConcurrencyStrategy;
- import org.riotfamily.common.hibernate.ActiveRecordBeanSupport;
- import org.riotfamily.common.web.cache.TagCacheItems;
- import org.riotfamily.core.dao.ListParams;
- /**
- * @author mstranieri
- */
- @Entity
- @Table(name="margiani_violetta_promo")
- @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region="margiani_violetta_promo")
- @TagCacheItems
- public class ViolettaPromo extends ActiveRecordBeanSupport implements Serializable {
- private static final long serialVersionUID = -4762324989377385474L;
- private Date data;
- private String ip;
- private String email;
- private String swid;
- private String blue;
- private String value;
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public Date getDataRegistrazione() {
- return data;
- }
- public void setDataRegistrazione(Date dataRegistrazione) {
- this.data = dataRegistrazione;
- }
- public static List<ViolettaPromo> findAll(ListParams params) {
- return query(ViolettaPromo.class, "from {} order by id").setMaxResults(params.getPageSize()).setFirstResult(params.getOffset()).cache().find();
- }
- public static ViolettaPromo load(Long id) {
- return load(ViolettaPromo.class, id);
- }
- public static ViolettaPromo findByEmail(String email) {
- return (ViolettaPromo) query(ViolettaPromo.class, "from {} where email = ?",email).uniqueResult();
- }
- public String getIp() {
- return ip;
- }
- public void setIp(String ip) {
- this.ip = ip;
- }
- public String getSwid() {
- return swid;
- }
- public void setSwid(String swid) {
- this.swid = swid;
- }
- public String getBlue() {
- return blue;
- }
- public void setBlue(String blue) {
- this.blue = blue;
- }
- /**
- * @return the value
- */
- public String getValue() {
- return value;
- }
- /**
- * @param value the value to set
- */
- public void setValue(String value) {
- this.value = value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement