Commit f9c47b61 authored by Hellmich, Christoph's avatar Hellmich, Christoph

Generate entities

parent 7b61617c
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "origin",
"otherEntityName": "statement",
"relationshipType": "many-to-one",
"otherEntityField": "id"
}
],
"fields": [],
"changelogDate": "20160321161721",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "step",
"otherEntityName": "step",
"relationshipType": "many-to-one",
"otherEntityField": "id"
},
{
"relationshipId": 2,
"relationshipName": "template",
"otherEntityName": "elementTemplate",
"relationshipType": "many-to-one",
"otherEntityField": "id"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20160321161714",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "file",
"otherEntityName": "file",
"relationshipType": "many-to-many",
"otherEntityField": "id",
"ownerSide": true
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "code",
"fieldType": "String"
},
{
"fieldId": 2,
"fieldName": "settings",
"fieldType": "String"
}
],
"changelogDate": "20160321161715",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [],
"fields": [],
"changelogDate": "20160321161720",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "elementTemplate",
"otherEntityName": "elementTemplate",
"relationshipType": "many-to-many",
"ownerSide": false,
"otherEntityRelationshipName": "file"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "data",
"fieldType": "byte[]",
"fieldTypeBlobContent": "any"
},
{
"fieldId": 2,
"fieldName": "type",
"fieldType": "FileType",
"fieldValues": "IMAGE,CSV,VIDEO"
}
],
"changelogDate": "20160321161716",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "statement",
"otherEntityName": "statement",
"relationshipType": "one-to-one",
"otherEntityField": "id",
"ownerSide": true,
"otherEntityRelationshipName": "guard"
},
{
"relationshipId": 2,
"relationshipName": "guard",
"otherEntityName": "step",
"relationshipType": "many-to-one",
"otherEntityField": "id"
}
],
"fields": [],
"changelogDate": "20160321161717",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [],
"fields": [],
"changelogDate": "20160321161722",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [],
"fields": [],
"changelogDate": "20160321161724",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [],
"fields": [],
"changelogDate": "20160321161723",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "owner",
"otherEntityName": "user",
"relationshipType": "many-to-one",
"otherEntityField": "login"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "address",
"fieldType": "String"
}
],
"changelogDate": "20160321161710",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [],
"fields": [],
"changelogDate": "20160321161719",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "element",
"otherEntityName": "element",
"relationshipType": "many-to-one",
"otherEntityField": "id"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "state",
"fieldType": "State",
"fieldValues": "TRUE,FALSE,UNDEFINDED",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20160321161718",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "wizard",
"otherEntityName": "wizard",
"relationshipType": "many-to-one",
"otherEntityField": "id"
},
{
"relationshipId": 2,
"relationshipName": "element",
"otherEntityName": "element",
"relationshipType": "one-to-many",
"otherEntityRelationshipName": "step"
},
{
"relationshipId": 3,
"relationshipName": "destination",
"otherEntityName": "guard",
"relationshipType": "one-to-many",
"otherEntityRelationshipName": "guard"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
}
],
"changelogDate": "20160321161713",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "owner",
"otherEntityName": "user",
"relationshipType": "many-to-one",
"otherEntityField": "login"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "file",
"fieldType": "byte[]",
"fieldTypeBlobContent": "any"
}
],
"changelogDate": "20160321161711",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
{
"relationships": [
{
"relationshipId": 1,
"relationshipName": "creator",
"otherEntityName": "user",
"relationshipType": "many-to-one",
"otherEntityField": "login"
},
{
"relationshipId": 2,
"relationshipName": "step",
"otherEntityName": "step",
"relationshipType": "one-to-many",
"otherEntityRelationshipName": "wizard"
}
],
"fields": [
{
"fieldId": 1,
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required"
]
},
{
"fieldId": 2,
"fieldName": "acitve",
"fieldType": "Boolean"
}
],
"changelogDate": "20160321161712",
"dto": "no",
"pagination": "no",
"service": "no"
}
\ No newline at end of file
package org.gesis.dda.wizard.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A CompoundStatement.
*/
@Entity
@Table(name = "compound_statement")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class CompoundStatement implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@ManyToOne
@JoinColumn(name = "origin_id")
private Statement origin;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Statement getOrigin() {
return origin;
}
public void setOrigin(Statement statement) {
this.origin = statement;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CompoundStatement compoundStatement = (CompoundStatement) o;
if(compoundStatement.id == null || id == null) {
return false;
}
return Objects.equals(id, compoundStatement.id);
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "CompoundStatement{" +
"id=" + id +
'}';
}
}
package org.gesis.dda.wizard.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A Element.
*/
@Entity
@Table(name = "element")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Element implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@NotNull
@Column(name = "name", nullable = false)
private String name;
@ManyToOne
@JoinColumn(name = "step_id")
private Step step;
@ManyToOne
@JoinColumn(name = "template_id")
private ElementTemplate template;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Step getStep() {
return step;
}
public void setStep(Step step) {
this.step = step;
}
public ElementTemplate getTemplate() {
return template;
}
public void setTemplate(ElementTemplate elementTemplate) {
this.template = elementTemplate;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Element element = (Element) o;
if(element.id == null || id == null) {
return false;
}
return Objects.equals(id, element.id);
}
@Override
public int hashCode() {
return Objects.hashCode(id);
}
@Override
public String toString() {
return "Element{" +
"id=" + id +
", name='" + name + "'" +
'}';
}
}
package org.gesis.dda.wizard.domain;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import javax.persistence.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A ElementTemplate.
*/
@Entity
@Table(name = "element_template")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ElementTemplate implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(name = "code")
private String code;
@Column(name = "settings")
private String settings;
@ManyToMany
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@JoinTable(name = "element_template_file",
joinColumns = @JoinColumn(name="element_templates_id", referencedColumnName="ID"),
inverseJoinColumns = @JoinColumn(name="files_id", referencedColumnName="ID"))
private Set<File> files = new HashSet<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getSettings() {
return settings;
}
public void setSettings(String settings) {
this.settings = settings;
}
public Set<File> getFiles() {
return files;
}
public void setFiles(Set<File> files) {
this.files = files;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}