-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
53 changed files
with
5,067 additions
and
227 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* | ||
/* | ||
* Copyright 2017 Javier A. Ortiz Bultron [email protected]. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
|
@@ -13,114 +13,126 @@ | |
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.validation.manager.core.db; | ||
|
||
import java.io.Serializable; | ||
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; | ||
import org.codehaus.jackson.annotate.JsonIgnore; | ||
|
||
/** | ||
* | ||
* @author Javier A. Ortiz Bultron [email protected] | ||
*/ | ||
@Entity | ||
@Table(name = "field_type") | ||
@XmlRootElement | ||
@NamedQueries({ | ||
@NamedQuery(name = "FieldType.findAll", query = "SELECT f FROM FieldType f") | ||
, @NamedQuery(name = "FieldType.findById", | ||
query = "SELECT f FROM FieldType f WHERE f.id = :id") | ||
, @NamedQuery(name = "FieldType.findByTypeName", | ||
query = "SELECT f FROM FieldType f WHERE f.typeName = :typeName")}) | ||
public class FieldType implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Basic(optional = false) | ||
@Column(name = "id") | ||
private Integer id; | ||
@Basic(optional = false) | ||
@NotNull | ||
@Size(min = 1, max = 45) | ||
@Column(name = "type_name") | ||
private String typeName; | ||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "fieldType") | ||
private List<HistoryField> historyFieldList; | ||
|
||
public FieldType() { | ||
} | ||
|
||
public FieldType(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public FieldType(Integer id, String typeName) { | ||
this.id = id; | ||
this.typeName = typeName; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getTypeName() { | ||
return typeName; | ||
} | ||
|
||
public void setTypeName(String typeName) { | ||
this.typeName = typeName; | ||
} | ||
|
||
@XmlTransient | ||
@JsonIgnore | ||
public List<HistoryField> getHistoryFieldList() { | ||
return historyFieldList; | ||
} | ||
|
||
public void setHistoryFieldList(List<HistoryField> historyFieldList) { | ||
this.historyFieldList = historyFieldList; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = 0; | ||
hash += (id != null ? id.hashCode() : 0); | ||
return hash; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
|
||
if (!(object instanceof FieldType)) { | ||
return false; | ||
} | ||
FieldType other = (FieldType) object; | ||
return !((this.id == null && other.id != null) | ||
|| (this.id != null && !this.id.equals(other.id))); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "com.validation.manager.core.db.FieldType[ id=" + id + " ]"; | ||
} | ||
} | ||
package com.validation.manager.core.db; | ||
|
||
import java.io.Serializable; | ||
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; | ||
import org.codehaus.jackson.annotate.JsonIgnore; | ||
|
||
/** | ||
* | ||
* @author Javier A. Ortiz Bultron [email protected] | ||
*/ | ||
@Entity | ||
@Table(name = "field_type") | ||
@XmlRootElement | ||
@NamedQueries({ | ||
@NamedQuery(name = "FieldType.findAll", query = "SELECT f FROM FieldType f") | ||
, @NamedQuery(name = "FieldType.findById", | ||
query = "SELECT f FROM FieldType f WHERE f.id = :id") | ||
, @NamedQuery(name = "FieldType.findByTypeName", | ||
query = "SELECT f FROM FieldType f WHERE f.typeName = :typeName")}) | ||
public class FieldType implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Basic(optional = false) | ||
@Column(name = "id") | ||
private Integer id; | ||
@Basic(optional = false) | ||
@NotNull | ||
@Size(min = 1, max = 45) | ||
@Column(name = "type_name") | ||
private String typeName; | ||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "fieldType") | ||
private List<HistoryField> historyFieldList; | ||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "fieldType") | ||
private List<WorkflowStepField> workflowStepFieldList; | ||
|
||
public FieldType() { | ||
} | ||
|
||
public FieldType(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public FieldType(Integer id, String typeName) { | ||
this.id = id; | ||
this.typeName = typeName; | ||
} | ||
|
||
public Integer getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Integer id) { | ||
this.id = id; | ||
} | ||
|
||
public String getTypeName() { | ||
return typeName; | ||
} | ||
|
||
public void setTypeName(String typeName) { | ||
this.typeName = typeName; | ||
} | ||
|
||
@XmlTransient | ||
@JsonIgnore | ||
public List<HistoryField> getHistoryFieldList() { | ||
return historyFieldList; | ||
} | ||
|
||
public void setHistoryFieldList(List<HistoryField> historyFieldList) { | ||
this.historyFieldList = historyFieldList; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = 0; | ||
hash += (id != null ? id.hashCode() : 0); | ||
return hash; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object object) { | ||
|
||
if (!(object instanceof FieldType)) { | ||
return false; | ||
} | ||
FieldType other = (FieldType) object; | ||
return !((this.id == null && other.id != null) | ||
|| (this.id != null && !this.id.equals(other.id))); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "com.validation.manager.core.db.FieldType[ id=" + id + " ]"; | ||
} | ||
|
||
@XmlTransient | ||
@JsonIgnore | ||
public List<WorkflowStepField> getWorkflowStepFieldList() { | ||
return workflowStepFieldList; | ||
} | ||
|
||
public void setWorkflowStepFieldList(List<WorkflowStepField> workflowStepFieldList) { | ||
this.workflowStepFieldList = workflowStepFieldList; | ||
} | ||
} |
149 changes: 149 additions & 0 deletions
149
VM-Core/src/main/java/com/validation/manager/core/db/StepTransitionsToStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
/* | ||
* Copyright 2017 Javier A. Ortiz Bultron [email protected]. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.validation.manager.core.db; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
import javax.persistence.CascadeType; | ||
import javax.persistence.EmbeddedId; | ||
import javax.persistence.Entity; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.JoinColumns; | ||
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; | ||
import org.codehaus.jackson.annotate.JsonIgnore; | ||
|
||
/** | ||
* | ||
* @author Javier A. Ortiz Bultron [email protected] | ||
*/ | ||
@Entity | ||
@Table(name = "step_transitions_to_step") | ||
@XmlRootElement | ||
@NamedQueries({ | ||
@NamedQuery(name = "StepTransitionsToStep.findAll", | ||
query = "SELECT s FROM StepTransitionsToStep s") | ||
, @NamedQuery(name = "StepTransitionsToStep.findBySourceStep", | ||
query = "SELECT s FROM StepTransitionsToStep s WHERE s.stepTransitionsToStepPK.sourceStep = :sourceStep") | ||
, @NamedQuery(name = "StepTransitionsToStep.findBySourceStepWorkflow", | ||
query = "SELECT s FROM StepTransitionsToStep s WHERE s.stepTransitionsToStepPK.sourceStepWorkflow = :sourceStepWorkflow") | ||
, @NamedQuery(name = "StepTransitionsToStep.findByTargetStep", | ||
query = "SELECT s FROM StepTransitionsToStep s WHERE s.stepTransitionsToStepPK.targetStep = :targetStep") | ||
, @NamedQuery(name = "StepTransitionsToStep.findByTargetStepWorkflow", | ||
query = "SELECT s FROM StepTransitionsToStep s WHERE s.stepTransitionsToStepPK.targetStepWorkflow = :targetStepWorkflow")}) | ||
public class StepTransitionsToStep implements Serializable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
@EmbeddedId | ||
protected StepTransitionsToStepPK stepTransitionsToStepPK; | ||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "stepTransitionsToStep") | ||
private List<WorkflowInstanceHasTransition> workflowInstanceHasTransitionList; | ||
@JoinColumns({ | ||
@JoinColumn(name = "source_step", referencedColumnName = "id", | ||
insertable = false, updatable = false) | ||
, @JoinColumn(name = "source_step_workflow", | ||
referencedColumnName = "workflow", insertable = false, | ||
updatable = false)}) | ||
@ManyToOne(optional = false) | ||
private WorkflowStep workflowStepSource; | ||
@JoinColumns({ | ||
@JoinColumn(name = "target_step", referencedColumnName = "id", | ||
insertable = false, updatable = false) | ||
, @JoinColumn(name = "target_step_workflow", | ||
referencedColumnName = "workflow", insertable = false, | ||
updatable = false)}) | ||
@ManyToOne(optional = false) | ||
private WorkflowStep workflowStepTarget; | ||
|
||
public StepTransitionsToStep() { | ||
} | ||
|
||
public StepTransitionsToStep(StepTransitionsToStepPK stepTransitionsToStepPK) { | ||
this.stepTransitionsToStepPK = stepTransitionsToStepPK; | ||
} | ||
|
||
public StepTransitionsToStep(int sourceStep, int sourceStepWorkflow, | ||
int targetStep, int targetStepWorkflow) { | ||
this.stepTransitionsToStepPK = new StepTransitionsToStepPK(sourceStep, | ||
sourceStepWorkflow, targetStep, targetStepWorkflow); | ||
} | ||
|
||
public StepTransitionsToStepPK getStepTransitionsToStepPK() { | ||
return stepTransitionsToStepPK; | ||
} | ||
|
||
public void setStepTransitionsToStepPK(StepTransitionsToStepPK stepTransitionsToStepPK) { | ||
this.stepTransitionsToStepPK = stepTransitionsToStepPK; | ||
} | ||
|
||
@XmlTransient | ||
@JsonIgnore | ||
public List<WorkflowInstanceHasTransition> getWorkflowInstanceHasTransitionList() { | ||
return workflowInstanceHasTransitionList; | ||
} | ||
|
||
public void setWorkflowInstanceHasTransitionList(List<WorkflowInstanceHasTransition> workflowInstanceHasTransitionList) { | ||
this.workflowInstanceHasTransitionList = workflowInstanceHasTransitionList; | ||
} | ||
|
||
public WorkflowStep getWorkflowStepSource() { | ||
return workflowStepSource; | ||
} | ||
|
||
public void setWorkflowStepSource(WorkflowStep workflowStepSource) { | ||
this.workflowStepSource = workflowStepSource; | ||
} | ||
|
||
public WorkflowStep getWorkflowStepTarget() { | ||
return workflowStepTarget; | ||
} | ||
|
||
public void setWorkflowStepTarget(WorkflowStep workflowStepTarget) { | ||
this.workflowStepTarget = workflowStepTarget; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int hash = 0; | ||
hash += (stepTransitionsToStepPK != null ? stepTransitionsToStepPK.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 StepTransitionsToStep)) { | ||
return false; | ||
} | ||
StepTransitionsToStep other = (StepTransitionsToStep) object; | ||
return !((this.stepTransitionsToStepPK == null | ||
&& other.stepTransitionsToStepPK != null) | ||
|| (this.stepTransitionsToStepPK != null | ||
&& !this.stepTransitionsToStepPK.equals(other.stepTransitionsToStepPK))); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "com.validation.manager.core.db.StepTransitionsToStep[ stepTransitionsToStepPK=" | ||
+ stepTransitionsToStepPK + " ]"; | ||
} | ||
|
||
} |
Oops, something went wrong.