Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • DM/dm-docs
  • hammonds/dm-docs
  • hparraga/dm-docs
3 results
Show changes
Showing
with 2624 additions and 0 deletions
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.beans;
import gov.anl.aps.dm.portal.model.entities.UsersLastUpdate;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
/**
*
* @author sveseli
*/
@Stateless
public class UsersLastUpdateDbFacade extends DmEntityDbFacade<UsersLastUpdate> {
@PersistenceContext(unitName = "DmWebPortalPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public UsersLastUpdateDbFacade() {
super(UsersLastUpdate.class);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "allowed_policy_value")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "AllowedPolicyValue.findAll", query = "SELECT a FROM AllowedPolicyValue a")
, @NamedQuery(name = "AllowedPolicyValue.findById", query = "SELECT a FROM AllowedPolicyValue a WHERE a.id = :id")
, @NamedQuery(name = "AllowedPolicyValue.findByPolicyValue", query = "SELECT a FROM AllowedPolicyValue a WHERE a.policyValue = :policyValue")
, @NamedQuery(name = "AllowedPolicyValue.findByDescription", query = "SELECT a FROM AllowedPolicyValue a WHERE a.description = :description")})
public class AllowedPolicyValue extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
@Column(name = "policy_value")
private String policyValue;
@Size(max = 2147483647)
private String description;
@JoinColumn(name = "policy_property_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private PolicyProperty policyPropertyId;
public AllowedPolicyValue() {
}
public AllowedPolicyValue(Integer id) {
this.id = id;
}
public AllowedPolicyValue(Integer id, String policyValue) {
this.id = id;
this.policyValue = policyValue;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPolicyValue() {
return policyValue;
}
public void setPolicyValue(String policyValue) {
this.policyValue = policyValue;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public PolicyProperty getPolicyPropertyId() {
return policyPropertyId;
}
public void setPolicyPropertyId(PolicyProperty policyPropertyId) {
this.policyPropertyId = policyPropertyId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof AllowedPolicyValue)) {
return false;
}
AllowedPolicyValue other = (AllowedPolicyValue) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.AllowedPolicyValue[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "allowed_setting_value")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "AllowedSettingValue.findAll", query = "SELECT a FROM AllowedSettingValue a")
, @NamedQuery(name = "AllowedSettingValue.findById", query = "SELECT a FROM AllowedSettingValue a WHERE a.id = :id")
, @NamedQuery(name = "AllowedSettingValue.findBySettingValue", query = "SELECT a FROM AllowedSettingValue a WHERE a.settingValue = :settingValue")
, @NamedQuery(name = "AllowedSettingValue.findByDescription", query = "SELECT a FROM AllowedSettingValue a WHERE a.description = :description")})
public class AllowedSettingValue extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Size(max = 2147483647)
@Column(name = "setting_value")
private String settingValue;
@Size(max = 2147483647)
private String description;
@JoinColumn(name = "setting_type_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private SettingType settingTypeId;
public AllowedSettingValue() {
}
public AllowedSettingValue(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSettingValue() {
return settingValue;
}
public void setSettingValue(String settingValue) {
this.settingValue = settingValue;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public SettingType getSettingTypeId() {
return settingTypeId;
}
public void setSettingTypeId(SettingType settingTypeId) {
this.settingTypeId = settingTypeId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof AllowedSettingValue)) {
return false;
}
AllowedSettingValue other = (AllowedSettingValue) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.AllowedSettingValue[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "data_folder")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "DataFolder.findAll", query = "SELECT d FROM DataFolder d")
, @NamedQuery(name = "DataFolder.findById", query = "SELECT d FROM DataFolder d WHERE d.id = :id")
, @NamedQuery(name = "DataFolder.findByDataPath", query = "SELECT d FROM DataFolder d WHERE d.dataPath = :dataPath")
, @NamedQuery(name = "DataFolder.findByDescription", query = "SELECT d FROM DataFolder d WHERE d.description = :description")})
public class DataFolder extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
@Column(name = "data_path")
private String dataPath;
@Size(max = 2147483647)
private String description;
@JoinColumn(name = "experiment_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private Experiment experimentId;
@JoinColumn(name = "storage_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private Storage storageId;
public DataFolder() {
}
public DataFolder(Integer id) {
this.id = id;
}
public DataFolder(Integer id, String dataPath) {
this.id = id;
this.dataPath = dataPath;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getDataPath() {
return dataPath;
}
public void setDataPath(String dataPath) {
this.dataPath = dataPath;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Experiment getExperimentId() {
return experimentId;
}
public void setExperimentId(Experiment experimentId) {
this.experimentId = experimentId;
}
public Storage getStorageId() {
return storageId;
}
public void setStorageId(Storage storageId) {
this.storageId = storageId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof DataFolder)) {
return false;
}
DataFolder other = (DataFolder) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.DataFolder[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import gov.anl.aps.dm.portal.utilities.SearchResult;
import java.io.Serializable;
import java.util.regex.Pattern;
/**
*
* @author sveseli
*/
public class DmEntity implements Serializable, Cloneable
{
protected static final long serialVersionUID = 1L;
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
public Object getId() {
return null;
}
public SearchResult search(Pattern searchPattern) {
return null;
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Endpoint.findAll", query = "SELECT e FROM Endpoint e")
, @NamedQuery(name = "Endpoint.findById", query = "SELECT e FROM Endpoint e WHERE e.id = :id")
, @NamedQuery(name = "Endpoint.findByName", query = "SELECT e FROM Endpoint e WHERE e.name = :name")
, @NamedQuery(name = "Endpoint.findByAccessUrl", query = "SELECT e FROM Endpoint e WHERE e.accessUrl = :accessUrl")
, @NamedQuery(name = "Endpoint.findByDescription", query = "SELECT e FROM Endpoint e WHERE e.description = :description")})
public class Endpoint extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
@Column(name = "access_url")
private String accessUrl;
@Size(max = 2147483647)
private String description;
@JoinColumn(name = "storage_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private Storage storageId;
public Endpoint() {
}
public Endpoint(Integer id) {
this.id = id;
}
public Endpoint(Integer id, String name, String accessUrl) {
this.id = id;
this.name = name;
this.accessUrl = accessUrl;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAccessUrl() {
return accessUrl;
}
public void setAccessUrl(String accessUrl) {
this.accessUrl = accessUrl;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Storage getStorageId() {
return storageId;
}
public void setStorageId(Storage storageId) {
this.storageId = storageId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Endpoint)) {
return false;
}
Endpoint other = (Endpoint) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.Endpoint[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Experiment.findAll", query = "SELECT e FROM Experiment e")
, @NamedQuery(name = "Experiment.findById", query = "SELECT e FROM Experiment e WHERE e.id = :id")
, @NamedQuery(name = "Experiment.findByName", query = "SELECT e FROM Experiment e WHERE e.name = :name")
, @NamedQuery(name = "Experiment.findByDescription", query = "SELECT e FROM Experiment e WHERE e.description = :description")
, @NamedQuery(name = "Experiment.findByStartDate", query = "SELECT e FROM Experiment e WHERE e.startDate = :startDate")
, @NamedQuery(name = "Experiment.findByEndDate", query = "SELECT e FROM Experiment e WHERE e.endDate = :endDate")})
public class Experiment extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
private String name;
private String description;
@Column(name = "start_date")
@Temporal(TemporalType.TIMESTAMP)
private Date startDate;
@Column(name = "end_date")
@Temporal(TemporalType.TIMESTAMP)
private Date endDate;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experiment")
private List<UserExperimentRole> userExperimentRoleList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentId")
private List<DataFolder> dataFolderList;
@JoinColumn(name = "experiment_station_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private ExperimentStation experimentStation;
@JoinColumn(name = "experiment_type_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private ExperimentType experimentType;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentId")
private List<ExperimentPolicy> experimentPolicyList;
public Experiment() {
}
public Experiment(Integer id) {
this.id = id;
}
public Experiment(Integer id, String name) {
this.id = id;
this.name = name;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
@XmlTransient
public List<UserExperimentRole> getUserExperimentRoleList() {
return userExperimentRoleList;
}
public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) {
this.userExperimentRoleList = userExperimentRoleList;
}
@XmlTransient
public List<DataFolder> getDataFolderList() {
return dataFolderList;
}
public void setDataFolderList(List<DataFolder> dataFolderList) {
this.dataFolderList = dataFolderList;
}
public ExperimentStation getExperimentStation() {
return experimentStation;
}
public void setExperimentStation(ExperimentStation experimentStation) {
this.experimentStation = experimentStation;
}
public ExperimentType getExperimentType() {
return experimentType;
}
public void setExperimentType(ExperimentType experimentType) {
this.experimentType = experimentType;
}
@XmlTransient
public List<ExperimentPolicy> getExperimentPolicyList() {
return experimentPolicyList;
}
public void setExperimentPolicyList(List<ExperimentPolicy> experimentPolicyList) {
this.experimentPolicyList = experimentPolicyList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Experiment)) {
return false;
}
Experiment other = (Experiment) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.Experiment[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "experiment_policy")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ExperimentPolicy.findAll", query = "SELECT e FROM ExperimentPolicy e")
, @NamedQuery(name = "ExperimentPolicy.findById", query = "SELECT e FROM ExperimentPolicy e WHERE e.id = :id")})
public class ExperimentPolicy extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentPolicyId")
private List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList;
@JoinColumn(name = "experiment_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private Experiment experimentId;
@JoinColumn(name = "policy_type_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private PolicyType policyTypeId;
public ExperimentPolicy() {
}
public ExperimentPolicy(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@XmlTransient
public List<ExperimentPolicyPropertyValue> getExperimentPolicyPropertyValueList() {
return experimentPolicyPropertyValueList;
}
public void setExperimentPolicyPropertyValueList(List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList) {
this.experimentPolicyPropertyValueList = experimentPolicyPropertyValueList;
}
public Experiment getExperimentId() {
return experimentId;
}
public void setExperimentId(Experiment experimentId) {
this.experimentId = experimentId;
}
public PolicyType getPolicyTypeId() {
return policyTypeId;
}
public void setPolicyTypeId(PolicyType policyTypeId) {
this.policyTypeId = policyTypeId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ExperimentPolicy)) {
return false;
}
ExperimentPolicy other = (ExperimentPolicy) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.ExperimentPolicy[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "experiment_policy_property_value")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ExperimentPolicyPropertyValue.findAll", query = "SELECT e FROM ExperimentPolicyPropertyValue e")
, @NamedQuery(name = "ExperimentPolicyPropertyValue.findById", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.id = :id")
, @NamedQuery(name = "ExperimentPolicyPropertyValue.findByModifiedBy", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.modifiedBy = :modifiedBy")
, @NamedQuery(name = "ExperimentPolicyPropertyValue.findByModifiedDate", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.modifiedDate = :modifiedDate")
, @NamedQuery(name = "ExperimentPolicyPropertyValue.findByPolicyPropertyValue", query = "SELECT e FROM ExperimentPolicyPropertyValue e WHERE e.policyPropertyValue = :policyPropertyValue")})
public class ExperimentPolicyPropertyValue extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
@Column(name = "modified_by")
private String modifiedBy;
@Basic(optional = false)
@NotNull
@Column(name = "modified_date")
@Temporal(TemporalType.DATE)
private Date modifiedDate;
@Size(max = 2147483647)
@Column(name = "policy_property_value")
private String policyPropertyValue;
@JoinColumn(name = "experiment_policy_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private ExperimentPolicy experimentPolicyId;
@JoinColumn(name = "policy_property_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private PolicyProperty policyPropertyId;
public ExperimentPolicyPropertyValue() {
}
public ExperimentPolicyPropertyValue(Integer id) {
this.id = id;
}
public ExperimentPolicyPropertyValue(Integer id, String modifiedBy, Date modifiedDate) {
this.id = id;
this.modifiedBy = modifiedBy;
this.modifiedDate = modifiedDate;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Date getModifiedDate() {
return modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
this.modifiedDate = modifiedDate;
}
public String getPolicyPropertyValue() {
return policyPropertyValue;
}
public void setPolicyPropertyValue(String policyPropertyValue) {
this.policyPropertyValue = policyPropertyValue;
}
public ExperimentPolicy getExperimentPolicyId() {
return experimentPolicyId;
}
public void setExperimentPolicyId(ExperimentPolicy experimentPolicyId) {
this.experimentPolicyId = experimentPolicyId;
}
public PolicyProperty getPolicyPropertyId() {
return policyPropertyId;
}
public void setPolicyPropertyId(PolicyProperty policyPropertyId) {
this.policyPropertyId = policyPropertyId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ExperimentPolicyPropertyValue)) {
return false;
}
ExperimentPolicyPropertyValue other = (ExperimentPolicyPropertyValue) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.ExperimentPolicyPropertyValue[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "experiment_role_type")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ExperimentRoleType.findAll", query = "SELECT e FROM ExperimentRoleType e")
, @NamedQuery(name = "ExperimentRoleType.findById", query = "SELECT e FROM ExperimentRoleType e WHERE e.id = :id")
, @NamedQuery(name = "ExperimentRoleType.findByName", query = "SELECT e FROM ExperimentRoleType e WHERE e.name = :name")
, @NamedQuery(name = "ExperimentRoleType.findByDescription", query = "SELECT e FROM ExperimentRoleType e WHERE e.description = :description")
})
public class ExperimentRoleType extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Size(max = 2147483647)
private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentRoleType")
private List<UserExperimentRole> userExperimentRoleList;
public ExperimentRoleType() {
}
public ExperimentRoleType(Integer id) {
this.id = id;
}
public ExperimentRoleType(Integer id, String name) {
this.id = id;
this.name = name;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<UserExperimentRole> getUserExperimentRoleList() {
return userExperimentRoleList;
}
public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) {
this.userExperimentRoleList = userExperimentRoleList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ExperimentRoleType)) {
return false;
}
ExperimentRoleType other = (ExperimentRoleType) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.ExperimentRoleType[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "experiment_station")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ExperimentStation.findAll", query = "SELECT e FROM ExperimentStation e")
, @NamedQuery(name = "ExperimentStation.findById", query = "SELECT e FROM ExperimentStation e WHERE e.id = :id")
, @NamedQuery(name = "ExperimentStation.findByName", query = "SELECT e FROM ExperimentStation e WHERE e.name = :name")
, @NamedQuery(name = "ExperimentStation.findByDescription", query = "SELECT e FROM ExperimentStation e WHERE e.description = :description")
})
public class ExperimentStation extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
private String name;
private String description;
@JoinTable(name = "allowed_experiment_station_experiment_type", joinColumns = {
@JoinColumn(name = "experiment_station_id", referencedColumnName = "id")}, inverseJoinColumns = {
@JoinColumn(name = "experiment_type_id", referencedColumnName = "id")})
@ManyToMany
private List<ExperimentType> experimentTypeList;
@OneToMany(mappedBy = "experimentStation")
private List<UserSystemRole> userSystemRoleList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentStation")
private List<Experiment> experimentList;
public ExperimentStation() {
}
public ExperimentStation(Integer id) {
this.id = id;
}
public ExperimentStation(Integer id, String name) {
this.id = id;
this.name = name;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<ExperimentType> getExperimentTypeList() {
return experimentTypeList;
}
public void setExperimentTypeList(List<ExperimentType> experimentTypeList) {
this.experimentTypeList = experimentTypeList;
}
@XmlTransient
public List<UserSystemRole> getUserSystemRoleList() {
return userSystemRoleList;
}
public void setUserSystemRoleList(List<UserSystemRole> userSystemRoleList) {
this.userSystemRoleList = userSystemRoleList;
}
@XmlTransient
public List<Experiment> getExperimentList() {
return experimentList;
}
public void setExperimentList(List<Experiment> experimentList) {
this.experimentList = experimentList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ExperimentStation)) {
return false;
}
ExperimentStation other = (ExperimentStation) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.ExperimentStation[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "experiment_type")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ExperimentType.findAll", query = "SELECT e FROM ExperimentType e")
, @NamedQuery(name = "ExperimentType.findById", query = "SELECT e FROM ExperimentType e WHERE e.id = :id")
, @NamedQuery(name = "ExperimentType.findByName", query = "SELECT e FROM ExperimentType e WHERE e.name = :name")
, @NamedQuery(name = "ExperimentType.findByDescription", query = "SELECT e FROM ExperimentType e WHERE e.description = :description")})
public class ExperimentType extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
private String name;
private String description;
@ManyToMany(mappedBy = "experimentTypeList")
private List<ExperimentStation> experimentStationList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "experimentType")
private List<Experiment> experimentList;
public ExperimentType() {
}
public ExperimentType(Integer id) {
this.id = id;
}
public ExperimentType(Integer id, String name) {
this.id = id;
this.name = name;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<ExperimentStation> getExperimentStationList() {
return experimentStationList;
}
public void setExperimentStationList(List<ExperimentStation> experimentStationList) {
this.experimentStationList = experimentStationList;
}
@XmlTransient
public List<Experiment> getExperimentList() {
return experimentList;
}
public void setExperimentList(List<Experiment> experimentList) {
this.experimentList = experimentList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ExperimentType)) {
return false;
}
ExperimentType other = (ExperimentType) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.ExperimentType[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "policy_property")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "PolicyProperty.findAll", query = "SELECT p FROM PolicyProperty p")
, @NamedQuery(name = "PolicyProperty.findById", query = "SELECT p FROM PolicyProperty p WHERE p.id = :id")
, @NamedQuery(name = "PolicyProperty.findByName", query = "SELECT p FROM PolicyProperty p WHERE p.name = :name")
, @NamedQuery(name = "PolicyProperty.findByUnits", query = "SELECT p FROM PolicyProperty p WHERE p.units = :units")
, @NamedQuery(name = "PolicyProperty.findByLowerLimit", query = "SELECT p FROM PolicyProperty p WHERE p.lowerLimit = :lowerLimit")
, @NamedQuery(name = "PolicyProperty.findByUpperLimit", query = "SELECT p FROM PolicyProperty p WHERE p.upperLimit = :upperLimit")
, @NamedQuery(name = "PolicyProperty.findByDefaultValue", query = "SELECT p FROM PolicyProperty p WHERE p.defaultValue = :defaultValue")
, @NamedQuery(name = "PolicyProperty.findByDescription", query = "SELECT p FROM PolicyProperty p WHERE p.description = :description")})
public class PolicyProperty extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Size(max = 2147483647)
private String units;
@Size(max = 2147483647)
@Column(name = "lower_limit")
private String lowerLimit;
@Size(max = 2147483647)
@Column(name = "upper_limit")
private String upperLimit;
@Size(max = 2147483647)
@Column(name = "default_value")
private String defaultValue;
@Size(max = 2147483647)
private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "policyPropertyId")
private List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList;
@JoinColumn(name = "policy_type_id", referencedColumnName = "id")
@ManyToOne(optional = false)
private PolicyType policyTypeId;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "policyPropertyId")
private List<AllowedPolicyValue> allowedPolicyValueList;
public PolicyProperty() {
}
public PolicyProperty(Integer id) {
this.id = id;
}
public PolicyProperty(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUnits() {
return units;
}
public void setUnits(String units) {
this.units = units;
}
public String getLowerLimit() {
return lowerLimit;
}
public void setLowerLimit(String lowerLimit) {
this.lowerLimit = lowerLimit;
}
public String getUpperLimit() {
return upperLimit;
}
public void setUpperLimit(String upperLimit) {
this.upperLimit = upperLimit;
}
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<ExperimentPolicyPropertyValue> getExperimentPolicyPropertyValueList() {
return experimentPolicyPropertyValueList;
}
public void setExperimentPolicyPropertyValueList(List<ExperimentPolicyPropertyValue> experimentPolicyPropertyValueList) {
this.experimentPolicyPropertyValueList = experimentPolicyPropertyValueList;
}
public PolicyType getPolicyTypeId() {
return policyTypeId;
}
public void setPolicyTypeId(PolicyType policyTypeId) {
this.policyTypeId = policyTypeId;
}
@XmlTransient
public List<AllowedPolicyValue> getAllowedPolicyValueList() {
return allowedPolicyValueList;
}
public void setAllowedPolicyValueList(List<AllowedPolicyValue> allowedPolicyValueList) {
this.allowedPolicyValueList = allowedPolicyValueList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof PolicyProperty)) {
return false;
}
PolicyProperty other = (PolicyProperty) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.PolicyProperty[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "policy_type")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "PolicyType.findAll", query = "SELECT p FROM PolicyType p")
, @NamedQuery(name = "PolicyType.findById", query = "SELECT p FROM PolicyType p WHERE p.id = :id")
, @NamedQuery(name = "PolicyType.findByName", query = "SELECT p FROM PolicyType p WHERE p.name = :name")
, @NamedQuery(name = "PolicyType.findByDescription", query = "SELECT p FROM PolicyType p WHERE p.description = :description")})
public class PolicyType extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Size(max = 2147483647)
private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "policyTypeId")
private List<PolicyProperty> policyPropertyList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "policyTypeId")
private List<ExperimentPolicy> experimentPolicyList;
public PolicyType() {
}
public PolicyType(Integer id) {
this.id = id;
}
public PolicyType(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<PolicyProperty> getPolicyPropertyList() {
return policyPropertyList;
}
public void setPolicyPropertyList(List<PolicyProperty> policyPropertyList) {
this.policyPropertyList = policyPropertyList;
}
@XmlTransient
public List<ExperimentPolicy> getExperimentPolicyList() {
return experimentPolicyList;
}
public void setExperimentPolicyList(List<ExperimentPolicy> experimentPolicyList) {
this.experimentPolicyList = experimentPolicyList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof PolicyType)) {
return false;
}
PolicyType other = (PolicyType) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.PolicyType[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "setting_type")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "SettingType.findAll", query = "SELECT s FROM SettingType s")
, @NamedQuery(name = "SettingType.findById", query = "SELECT s FROM SettingType s WHERE s.id = :id")
, @NamedQuery(name = "SettingType.findByName", query = "SELECT s FROM SettingType s WHERE s.name = :name")
, @NamedQuery(name = "SettingType.findByDescription", query = "SELECT s FROM SettingType s WHERE s.description = :description")
, @NamedQuery(name = "SettingType.findByDefaultValue", query = "SELECT s FROM SettingType s WHERE s.defaultValue = :defaultValue")
, @NamedQuery(name = "SettingType.findByIsUserModifiable", query = "SELECT s FROM SettingType s WHERE s.isUserModifiable = :isUserModifiable")})
public class SettingType extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Size(max = 2147483647)
private String description;
@Size(max = 2147483647)
@Column(name = "default_value")
private String defaultValue;
@Column(name = "is_user_modifiable")
private Boolean isUserModifiable;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "settingTypeId")
private List<AllowedSettingValue> allowedSettingValueList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "settingTypeId")
private List<UserSetting> userSettingList;
public SettingType() {
}
public SettingType(Integer id) {
this.id = id;
}
public SettingType(Integer id, String name) {
this.id = id;
this.name = name;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public Boolean getIsUserModifiable() {
return isUserModifiable;
}
public void setIsUserModifiable(Boolean isUserModifiable) {
this.isUserModifiable = isUserModifiable;
}
@XmlTransient
public List<AllowedSettingValue> getAllowedSettingValueList() {
return allowedSettingValueList;
}
public void setAllowedSettingValueList(List<AllowedSettingValue> allowedSettingValueList) {
this.allowedSettingValueList = allowedSettingValueList;
}
@XmlTransient
public List<UserSetting> getUserSettingList() {
return userSettingList;
}
public void setUserSettingList(List<UserSetting> userSettingList) {
this.userSettingList = userSettingList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SettingType)) {
return false;
}
SettingType other = (SettingType) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.SettingType[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Storage.findAll", query = "SELECT s FROM Storage s")
, @NamedQuery(name = "Storage.findById", query = "SELECT s FROM Storage s WHERE s.id = :id")
, @NamedQuery(name = "Storage.findByName", query = "SELECT s FROM Storage s WHERE s.name = :name")
, @NamedQuery(name = "Storage.findByDefaultScheme", query = "SELECT s FROM Storage s WHERE s.defaultScheme = :defaultScheme")
, @NamedQuery(name = "Storage.findByDescription", query = "SELECT s FROM Storage s WHERE s.description = :description")})
public class Storage extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
@Column(name = "default_scheme")
private String defaultScheme;
@Size(max = 2147483647)
private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "storageId")
private List<DataFolder> dataFolderList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "storageId")
private List<Endpoint> endpointList;
public Storage() {
}
public Storage(Integer id) {
this.id = id;
}
public Storage(Integer id, String name, String defaultScheme) {
this.id = id;
this.name = name;
this.defaultScheme = defaultScheme;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDefaultScheme() {
return defaultScheme;
}
public void setDefaultScheme(String defaultScheme) {
this.defaultScheme = defaultScheme;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<DataFolder> getDataFolderList() {
return dataFolderList;
}
public void setDataFolderList(List<DataFolder> dataFolderList) {
this.dataFolderList = dataFolderList;
}
@XmlTransient
public List<Endpoint> getEndpointList() {
return endpointList;
}
public void setEndpointList(List<Endpoint> endpointList) {
this.endpointList = endpointList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Storage)) {
return false;
}
Storage other = (Storage) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.Storage[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "system_role_type")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "SystemRoleType.findAll", query = "SELECT s FROM SystemRoleType s")
, @NamedQuery(name = "SystemRoleType.findById", query = "SELECT s FROM SystemRoleType s WHERE s.id = :id")
, @NamedQuery(name = "SystemRoleType.findByName", query = "SELECT s FROM SystemRoleType s WHERE s.name = :name")
, @NamedQuery(name = "SystemRoleType.findByDescription", query = "SELECT s FROM SystemRoleType s WHERE s.description = :description")
})
public class SystemRoleType extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 2147483647)
private String name;
@Size(max = 2147483647)
private String description;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "systemRoleType")
private List<UserSystemRole> userSystemRoleList;
public SystemRoleType() {
}
public SystemRoleType(Integer id) {
this.id = id;
}
public SystemRoleType(Integer id, String name) {
this.id = id;
this.name = name;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@XmlTransient
public List<UserSystemRole> getUserSystemRoleList() {
return userSystemRoleList;
}
public void setUserSystemRoleList(List<UserSystemRole> userSystemRoleList) {
this.userSystemRoleList = userSystemRoleList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SystemRoleType)) {
return false;
}
SystemRoleType other = (SystemRoleType) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.SystemRoleType[ id=" + id + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "user_experiment_role")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "UserExperimentRole.findAll", query = "SELECT u FROM UserExperimentRole u")
, @NamedQuery(name = "UserExperimentRole.findByUser", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.userId = :userId")
, @NamedQuery(name = "UserExperimentRole.findByExperiment", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.experimentId = :experimentId")
, @NamedQuery(name = "UserExperimentRole.findByRoleType", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.roleTypeId = :roleTypeId")
, @NamedQuery(name = "UserExperimentRole.findByUserAndExperiment", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.userId = :userId AND u.userExperimentRolePK.experimentId = :experimentId")
, @NamedQuery(name = "UserExperimentRole.findByUserAndExperimentAndRoleType", query = "SELECT u FROM UserExperimentRole u WHERE u.userExperimentRolePK.userId = :userId AND u.userExperimentRolePK.experimentId = :experimentId AND u.userExperimentRolePK.roleTypeId = :roleTypeId")
})
public class UserExperimentRole extends DmEntity {
@EmbeddedId
protected UserExperimentRolePK userExperimentRolePK;
@JoinColumn(name = "experiment_id", referencedColumnName = "id", insertable = false, updatable = false)
@ManyToOne(optional = false)
private Experiment experiment;
@JoinColumn(name = "role_type_id", referencedColumnName = "id", insertable = false, updatable = false)
@ManyToOne(optional = false)
private ExperimentRoleType experimentRoleType;
@JoinColumn(name = "user_id", referencedColumnName = "id", insertable = false, updatable = false)
@ManyToOne(optional = false)
private UserInfo userInfo;
public UserExperimentRole() {
}
public UserExperimentRole(UserExperimentRolePK userExperimentRolePK) {
this.userExperimentRolePK = userExperimentRolePK;
}
public UserExperimentRole(int userId, int experimentId, int roleTypeId) {
this.userExperimentRolePK = new UserExperimentRolePK(userId, experimentId, roleTypeId);
}
public UserExperimentRolePK getUserExperimentRolePK() {
return userExperimentRolePK;
}
public void setUserExperimentRolePK(UserExperimentRolePK userExperimentRolePK) {
this.userExperimentRolePK = userExperimentRolePK;
}
public Experiment getExperiment() {
return experiment;
}
public void setExperiment(Experiment experiment) {
this.experiment = experiment;
}
public ExperimentRoleType getExperimentRoleType() {
return experimentRoleType;
}
public void setExperimentRoleType(ExperimentRoleType experimentRoleType) {
this.experimentRoleType = experimentRoleType;
}
public UserInfo getUserInfo() {
return userInfo;
}
public void setUserInfo(UserInfo userInfo) {
this.userInfo = userInfo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (userExperimentRolePK != null ? userExperimentRolePK.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UserExperimentRole)) {
return false;
}
UserExperimentRole other = (UserExperimentRole) object;
return !((this.userExperimentRolePK == null && other.userExperimentRolePK != null) || (this.userExperimentRolePK != null && !this.userExperimentRolePK.equals(other.userExperimentRolePK)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.UserExperimentRole[ userExperimentRolePK=" + userExperimentRolePK + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
/**
*
* @author sveseli
*/
@Embeddable
public class UserExperimentRolePK implements Serializable {
@Basic(optional = false)
@NotNull
@Column(name = "user_id")
private int userId;
@Basic(optional = false)
@NotNull
@Column(name = "experiment_id")
private int experimentId;
@Basic(optional = false)
@NotNull
@Column(name = "role_type_id")
private int roleTypeId;
public UserExperimentRolePK() {
}
public UserExperimentRolePK(int userId, int experimentId, int roleTypeId) {
this.userId = userId;
this.experimentId = experimentId;
this.roleTypeId = roleTypeId;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getExperimentId() {
return experimentId;
}
public void setExperimentId(int experimentId) {
this.experimentId = experimentId;
}
public int getRoleTypeId() {
return roleTypeId;
}
public void setRoleTypeId(int roleTypeId) {
this.roleTypeId = roleTypeId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (int) userId;
hash += (int) experimentId;
hash += (int) roleTypeId;
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UserExperimentRolePK)) {
return false;
}
UserExperimentRolePK other = (UserExperimentRolePK) object;
if (this.userId != other.userId) {
return false;
}
if (this.experimentId != other.experimentId) {
return false;
}
return this.roleTypeId == other.roleTypeId;
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.UserExperimentRolePK[ userId=" + userId + ", experimentId=" + experimentId + ", roleTypeId=" + roleTypeId + " ]";
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package gov.anl.aps.dm.portal.model.entities;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author sveseli
*/
@Entity
@Table(name = "user_info")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "UserInfo.findAll", query = "SELECT u FROM UserInfo u")
, @NamedQuery(name = "UserInfo.findById", query = "SELECT u FROM UserInfo u WHERE u.id = :id")
, @NamedQuery(name = "UserInfo.findByUsername", query = "SELECT u FROM UserInfo u WHERE u.username = :username")
, @NamedQuery(name = "UserInfo.findByFirstName", query = "SELECT u FROM UserInfo u WHERE u.firstName = :firstName")
, @NamedQuery(name = "UserInfo.findByLastName", query = "SELECT u FROM UserInfo u WHERE u.lastName = :lastName")
, @NamedQuery(name = "UserInfo.findByMiddleName", query = "SELECT u FROM UserInfo u WHERE u.middleName = :middleName")
, @NamedQuery(name = "UserInfo.findByEmail", query = "SELECT u FROM UserInfo u WHERE u.email = :email")
, @NamedQuery(name = "UserInfo.findByBadge", query = "SELECT u FROM UserInfo u WHERE u.badge = :badge")
, @NamedQuery(name = "UserInfo.findByGlobusUsername", query = "SELECT u FROM UserInfo u WHERE u.globusUsername = :globusUsername")
, @NamedQuery(name = "UserInfo.findByDescription", query = "SELECT u FROM UserInfo u WHERE u.description = :description")
, @NamedQuery(name = "UserInfo.findByPassword", query = "SELECT u FROM UserInfo u WHERE u.password = :password")
, @NamedQuery(name = "UserInfo.findByIsLocalUser", query = "SELECT u FROM UserInfo u WHERE u.isLocalUser = :isLocalUser")
, @NamedQuery(name = "UserInfo.findByLastUpdate", query = "SELECT u FROM UserInfo u WHERE u.lastUpdate = :lastUpdate")
})
public class UserInfo extends DmEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
private Integer id;
@Basic(optional = false)
@NotNull
private String username;
@Basic(optional = false)
@NotNull
@Column(name = "first_name")
private String firstName;
@Basic(optional = false)
@NotNull
@Column(name = "last_name")
private String lastName;
@Column(name = "middle_name")
private String middleName;
// @Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid email")//if the field contains email address consider using this annotation to enforce field validation
private String email;
private String badge;
@Column(name = "globus_username")
private String globusUsername;
private String description;
private String password;
@Basic(optional = false)
@NotNull
@Column(name = "is_local_user")
private boolean isLocalUser;
@Column(name = "last_update")
@Temporal(TemporalType.TIMESTAMP)
private Date lastUpdate;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "userInfo")
private List<UserExperimentRole> userExperimentRoleList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "userInfo")
private List<UserSystemRole> userSystemRoleList;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "userId")
private List<UserSetting> userSettingList;
public UserInfo() {
}
public UserInfo(Integer id) {
this.id = id;
}
public UserInfo(Integer id, String username, String firstName, String lastName, boolean isLocalUser) {
this.id = id;
this.username = username;
this.firstName = firstName;
this.lastName = lastName;
this.isLocalUser = isLocalUser;
}
@Override
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getMiddleName() {
return middleName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getBadge() {
return badge;
}
public void setBadge(String badge) {
this.badge = badge;
}
public String getGlobusUsername() {
return globusUsername;
}
public void setGlobusUsername(String globusUsername) {
this.globusUsername = globusUsername;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean getIsLocalUser() {
return isLocalUser;
}
public void setIsLocalUser(boolean isLocalUser) {
this.isLocalUser = isLocalUser;
}
public boolean isLocalUser() {
return isLocalUser;
}
public Date getLastUpdate() {
return lastUpdate;
}
public void setLastUpdate(Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
@XmlTransient
public List<UserExperimentRole> getUserExperimentRoleList() {
return userExperimentRoleList;
}
public void setUserExperimentRoleList(List<UserExperimentRole> userExperimentRoleList) {
this.userExperimentRoleList = userExperimentRoleList;
}
@XmlTransient
public List<UserSystemRole> getUserSystemRoleList() {
return userSystemRoleList;
}
public void setUserSystemRoleList(List<UserSystemRole> userSystemRoleList) {
this.userSystemRoleList = userSystemRoleList;
}
@XmlTransient
public List<UserSetting> getUserSettingList() {
return userSettingList;
}
public void setUserSettingList(List<UserSetting> userSettingList) {
this.userSettingList = userSettingList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof UserInfo)) {
return false;
}
UserInfo other = (UserInfo) object;
return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));
}
@Override
public String toString() {
return "gov.anl.aps.dm.portal.model.entities2.UserInfo[ id=" + id + " ]";
}
}