19 package org.turro.elephant.entities.db;
21 import java.util.List;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.GeneratedValue;
25 import javax.persistence.GenerationType;
26 import javax.persistence.Id;
27 import javax.persistence.Lob;
28 import org.turro.string.Strings;
29 import org.turro.elephant.context.Application;
30 import org.turro.elephant.context.ElephantContext;
31 import org.turro.elephant.db.ElephantPU;
32 import org.turro.elephant.db.WhereClause;
33 import org.turro.elephant.impl.util.Parser;
34 import org.turro.jpa.entity.IDaoEntity;
44 @GeneratedValue(strategy=GenerationType.IDENTITY)
45 @Column(name=
"IDENTIFIER")
48 private String title, appliesTo, action;
52 private String wiki, text;
54 private boolean requiredToAccess, requiredToNotify, requiredToAction, peremptory;
93 this.appliesTo = appliesTo;
101 this.action = action;
105 return requiredToAccess;
109 this.requiredToAccess = requiredToAccess;
113 return requiredToNotify;
117 this.requiredToNotify = requiredToNotify;
121 return requiredToAction;
125 this.requiredToAction = requiredToAction;
133 this.peremptory = peremptory;
145 return !(requiredToAccess || requiredToNotify) ||
146 Strings.isBlank(text) || Strings.isBlank(title) ||
147 Strings.isBlank(appliesTo);
154 wc.
addClause(
"select asig from AgreementSignature asig");
155 wc.
addClause(
"where asig.agreement = :agreement");
157 wc.
addClause(
"order by asig.signedDate");
static String getSiteName()
void addClause(String clause)
void addNamedValue(String name, Object value)
void setAction(String action)
boolean isRequiredToNotify()
void setRequiredToAction(boolean requiredToAction)
void setWiki(String wiki)
void setText(String text)
boolean isRequiredToAction()
void setAppliesTo(String appliesTo)
boolean isRequiredToAccess()
void setRequiredToNotify(boolean requiredToNotify)
void setRequiredToAccess(boolean requiredToAccess)
List< AgreementSignature > getSignatures()
void setTitle(String title)
void setPeremptory(boolean peremptory)