Merge branch 'master' into spike/JSonSerializerDeserializerForDTOs

# Conflicts:
#	package-lock.json
#	src/main/java/org/hostsharing/hsadminng/service/dto/CustomerDTO.java
This commit is contained in:
Michael Hoennig 2019-04-18 17:36:35 +02:00
commit 16cf845015
180 changed files with 5157 additions and 5641 deletions

View File

@ -2,7 +2,14 @@
"name": "Asset",
"fields": [
{
"fieldName": "date",
"fieldName": "documentDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "valueDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
@ -24,7 +31,7 @@
]
},
{
"fieldName": "comment",
"fieldName": "remark",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
@ -38,11 +45,11 @@
"otherEntityName": "membership",
"otherEntityRelationshipName": "asset",
"relationshipValidateRules": "required",
"relationshipName": "member",
"otherEntityField": "id"
"relationshipName": "membership",
"otherEntityField": "documentDate"
}
],
"changelogDate": "20190403083740",
"changelogDate": "20190418143053",
"entityTableName": "asset",
"dto": "mapstruct",
"pagination": "infinite-scroll",

View File

@ -1,49 +0,0 @@
{
"name": "Contact",
"fields": [
{
"fieldName": "firstName",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "lastName",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "email",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "customerContact",
"otherEntityRelationshipName": "contact",
"relationshipName": "role"
}
],
"changelogDate": "20190403083736",
"entityTableName": "contact",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -2,7 +2,7 @@
"name": "Customer",
"fields": [
{
"fieldName": "number",
"fieldName": "reference",
"fieldType": "Integer",
"fieldValidateRules": [
"required",
@ -18,9 +18,11 @@
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength",
"unique",
"pattern"
],
"fieldValidateRulesMaxlength": 3,
"fieldValidateRulesPattern": "[a-z][a-z0-9]+"
},
{
@ -32,6 +34,14 @@
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "contractualSalutation",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "contractualAddress",
"fieldType": "String",
@ -42,7 +52,7 @@
"fieldValidateRulesMaxlength": 400
},
{
"fieldName": "contractualSalutation",
"fieldName": "billingSalutation",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
@ -58,29 +68,29 @@
"fieldValidateRulesMaxlength": 400
},
{
"fieldName": "billingSalutation",
"fieldName": "remark",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 80
"fieldValidateRulesMaxlength": 160
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "customerContact",
"otherEntityRelationshipName": "customer",
"relationshipName": "role"
},
{
"relationshipType": "one-to-many",
"otherEntityName": "membership",
"otherEntityRelationshipName": "customer",
"relationshipName": "membership"
},
{
"relationshipType": "one-to-many",
"otherEntityName": "sepaMandate",
"otherEntityRelationshipName": "customer",
"relationshipName": "sepamandate"
}
],
"changelogDate": "20190403083735",
"changelogDate": "20190418143050",
"entityTableName": "customer",
"dto": "mapstruct",
"pagination": "infinite-scroll",

View File

@ -1,40 +0,0 @@
{
"name": "CustomerContact",
"fields": [
{
"fieldName": "role",
"fieldType": "CustomerContactRole",
"fieldValues": "CONTRACTUAL,TECHNICAL,FINANCIAL",
"fieldValidateRules": [
"required"
]
}
],
"relationships": [
{
"relationshipType": "many-to-one",
"otherEntityName": "contact",
"otherEntityRelationshipName": "role",
"relationshipValidateRules": "required",
"relationshipName": "contact",
"otherEntityField": "email"
},
{
"relationshipType": "many-to-one",
"otherEntityName": "customer",
"otherEntityRelationshipName": "role",
"relationshipValidateRules": "required",
"relationshipName": "customer",
"otherEntityField": "prefix"
}
],
"changelogDate": "20190403083737",
"entityTableName": "customer_contact",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -2,28 +2,43 @@
"name": "Membership",
"fields": [
{
"fieldName": "sinceDate",
"fieldName": "documentDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "untilDate",
"fieldName": "memberFrom",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "memberUntil",
"fieldType": "LocalDate"
},
{
"fieldName": "remark",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 160
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "share",
"otherEntityRelationshipName": "member",
"otherEntityRelationshipName": "membership",
"relationshipName": "share"
},
{
"relationshipType": "one-to-many",
"otherEntityName": "asset",
"otherEntityRelationshipName": "member",
"otherEntityRelationshipName": "membership",
"relationshipName": "asset"
},
{
@ -35,7 +50,7 @@
"otherEntityField": "prefix"
}
],
"changelogDate": "20190403083738",
"changelogDate": "20190418143051",
"entityTableName": "membership",
"dto": "mapstruct",
"pagination": "infinite-scroll",

View File

@ -0,0 +1,84 @@
{
"name": "SepaMandate",
"fields": [
{
"fieldName": "reference",
"fieldType": "String",
"fieldValidateRules": [
"maxlength",
"unique",
"required"
],
"fieldValidateRulesMaxlength": 40
},
{
"fieldName": "iban",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 34
},
{
"fieldName": "bic",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 11
},
{
"fieldName": "documentDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "validFrom",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "validUntil",
"fieldType": "LocalDate"
},
{
"fieldName": "lastUsed",
"fieldType": "LocalDate"
},
{
"fieldName": "cancellationDate",
"fieldType": "LocalDate"
},
{
"fieldName": "remark",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 160
}
],
"relationships": [
{
"relationshipType": "many-to-one",
"otherEntityName": "customer",
"otherEntityRelationshipName": "sepamandate",
"relationshipValidateRules": "required",
"relationshipName": "customer",
"otherEntityField": "prefix"
}
],
"changelogDate": "20190418143054",
"entityTableName": "sepa_mandate",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -2,7 +2,14 @@
"name": "Share",
"fields": [
{
"fieldName": "date",
"fieldName": "documentDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "valueDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
@ -24,7 +31,7 @@
]
},
{
"fieldName": "comment",
"fieldName": "remark",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
@ -38,11 +45,11 @@
"otherEntityName": "membership",
"otherEntityRelationshipName": "share",
"relationshipValidateRules": "required",
"relationshipName": "member",
"otherEntityField": "id"
"relationshipName": "membership",
"otherEntityField": "documentDate"
}
],
"changelogDate": "20190403083739",
"changelogDate": "20190418143052",
"entityTableName": "share",
"dto": "mapstruct",
"pagination": "infinite-scroll",

41
package-lock.json generated
View File

@ -6025,8 +6025,7 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"aproba": {
"version": "1.2.0",
@ -6047,14 +6046,12 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -6069,20 +6066,17 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"core-util-is": {
"version": "1.0.2",
@ -6199,8 +6193,7 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"ini": {
"version": "1.3.5",
@ -6212,7 +6205,6 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -6227,7 +6219,6 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -6235,14 +6226,12 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@ -6261,7 +6250,6 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -6342,8 +6330,7 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"object-assign": {
"version": "4.1.1",
@ -6355,7 +6342,6 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -6441,8 +6427,7 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
@ -6478,7 +6463,6 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@ -6498,7 +6482,6 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -6542,14 +6525,12 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true
"dev": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true,
"optional": true
"dev": true
}
}
},

View File

@ -2,16 +2,17 @@ package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;
import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
/**
* A Asset.
*/
@ -27,8 +28,12 @@ public class Asset implements Serializable {
private Long id;
@NotNull
@Column(name = "jhi_date", nullable = false)
private LocalDate date;
@Column(name = "document_date", nullable = false)
private LocalDate documentDate;
@NotNull
@Column(name = "value_date", nullable = false)
private LocalDate valueDate;
@NotNull
@Enumerated(EnumType.STRING)
@ -40,13 +45,13 @@ public class Asset implements Serializable {
private BigDecimal amount;
@Size(max = 160)
@Column(name = "jhi_comment", length = 160)
private String comment;
@Column(name = "remark", length = 160)
private String remark;
@NotNull
@ManyToOne(optional = false)
@JsonIgnoreProperties("assets")
private Membership member;
private Membership membership;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
@ -57,17 +62,30 @@ public class Asset implements Serializable {
this.id = id;
}
public LocalDate getDate() {
return date;
public LocalDate getDocumentDate() {
return documentDate;
}
public Asset date(LocalDate date) {
this.date = date;
public Asset documentDate(LocalDate documentDate) {
this.documentDate = documentDate;
return this;
}
public void setDate(LocalDate date) {
this.date = date;
public void setDocumentDate(LocalDate documentDate) {
this.documentDate = documentDate;
}
public LocalDate getValueDate() {
return valueDate;
}
public Asset valueDate(LocalDate valueDate) {
this.valueDate = valueDate;
return this;
}
public void setValueDate(LocalDate valueDate) {
this.valueDate = valueDate;
}
public AssetAction getAction() {
@ -96,30 +114,30 @@ public class Asset implements Serializable {
this.amount = amount;
}
public String getComment() {
return comment;
public String getRemark() {
return remark;
}
public Asset comment(String comment) {
this.comment = comment;
public Asset remark(String remark) {
this.remark = remark;
return this;
}
public void setComment(String comment) {
this.comment = comment;
public void setRemark(String remark) {
this.remark = remark;
}
public Membership getMember() {
return member;
public Membership getMembership() {
return membership;
}
public Asset member(Membership membership) {
this.member = membership;
public Asset membership(Membership membership) {
this.membership = membership;
return this;
}
public void setMember(Membership membership) {
this.member = membership;
public void setMembership(Membership membership) {
this.membership = membership;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@ -147,10 +165,11 @@ public class Asset implements Serializable {
public String toString() {
return "Asset{" +
"id=" + getId() +
", date='" + getDate() + "'" +
", documentDate='" + getDocumentDate() + "'" +
", valueDate='" + getValueDate() + "'" +
", action='" + getAction() + "'" +
", amount=" + getAmount() +
", comment='" + getComment() + "'" +
", remark='" + getRemark() + "'" +
"}";
}
}

View File

@ -1,148 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;
/**
* A Contact.
*/
@Entity
@Table(name = "contact")
public class Contact implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Size(max = 80)
@Column(name = "first_name", length = 80, nullable = false)
private String firstName;
@NotNull
@Size(max = 80)
@Column(name = "last_name", length = 80, nullable = false)
private String lastName;
@NotNull
@Size(max = 80)
@Column(name = "email", length = 80, nullable = false)
private String email;
@OneToMany(mappedBy = "contact")
private Set<CustomerContact> roles = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public Contact firstName(String firstName) {
this.firstName = firstName;
return this;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public Contact lastName(String lastName) {
this.lastName = lastName;
return this;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public Contact email(String email) {
this.email = email;
return this;
}
public void setEmail(String email) {
this.email = email;
}
public Set<CustomerContact> getRoles() {
return roles;
}
public Contact roles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
return this;
}
public Contact addRole(CustomerContact customerContact) {
this.roles.add(customerContact);
customerContact.setContact(this);
return this;
}
public Contact removeRole(CustomerContact customerContact) {
this.roles.remove(customerContact);
customerContact.setContact(null);
return this;
}
public void setRoles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Contact contact = (Contact) o;
if (contact.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), contact.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Contact{" +
"id=" + getId() +
", firstName='" + getFirstName() + "'" +
", lastName='" + getLastName() + "'" +
", email='" + getEmail() + "'" +
"}";
}
}

View File

@ -1,12 +1,15 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.Objects;
/**
* A Customer.
@ -25,12 +28,13 @@ public class Customer implements Serializable {
@NotNull
@Min(value = 10000)
@Max(value = 99999)
@Column(name = "jhi_number", nullable = false, unique = true)
private Integer number;
@Column(name = "reference", nullable = false, unique = true)
private Integer reference;
@NotNull
@Size(max = 3)
@Pattern(regexp = "[a-z][a-z0-9]+")
@Column(name = "prefix", nullable = false, unique = true)
@Column(name = "prefix", length = 3, nullable = false, unique = true)
private String prefix;
@NotNull
@ -38,29 +42,31 @@ public class Customer implements Serializable {
@Column(name = "name", length = 80, nullable = false)
private String name;
@Size(max = 80)
@Column(name = "contractual_salutation", length = 80)
private String contractualSalutation;
@NotNull
@Size(max = 400)
@Column(name = "contractual_address", length = 400, nullable = false)
private String contractualAddress;
@Size(max = 80)
@Column(name = "contractual_salutation", length = 80)
private String contractualSalutation;
@Column(name = "billing_salutation", length = 80)
private String billingSalutation;
@Size(max = 400)
@Column(name = "billing_address", length = 400)
private String billingAddress;
@Size(max = 80)
@Column(name = "billing_salutation", length = 80)
private String billingSalutation;
@OneToMany(mappedBy = "customer")
private Set<CustomerContact> roles = new HashSet<>();
@Size(max = 160)
@Column(name = "remark", length = 160)
private String remark;
@OneToMany(mappedBy = "customer")
private Set<Membership> memberships = new HashSet<>();
@OneToMany(mappedBy = "customer")
private Set<SepaMandate> sepamandates = new HashSet<>();
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
@ -70,17 +76,17 @@ public class Customer implements Serializable {
this.id = id;
}
public Integer getNumber() {
return number;
public Integer getReference() {
return reference;
}
public Customer number(Integer number) {
this.number = number;
public Customer reference(Integer reference) {
this.reference = reference;
return this;
}
public void setNumber(Integer number) {
this.number = number;
public void setReference(Integer reference) {
this.reference = reference;
}
public String getPrefix() {
@ -109,19 +115,6 @@ public class Customer implements Serializable {
this.name = name;
}
public String getContractualAddress() {
return contractualAddress;
}
public Customer contractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
return this;
}
public void setContractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
}
public String getContractualSalutation() {
return contractualSalutation;
}
@ -135,17 +128,17 @@ public class Customer implements Serializable {
this.contractualSalutation = contractualSalutation;
}
public String getBillingAddress() {
return billingAddress;
public String getContractualAddress() {
return contractualAddress;
}
public Customer billingAddress(String billingAddress) {
this.billingAddress = billingAddress;
public Customer contractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
return this;
}
public void setBillingAddress(String billingAddress) {
this.billingAddress = billingAddress;
public void setContractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
}
public String getBillingSalutation() {
@ -161,29 +154,30 @@ public class Customer implements Serializable {
this.billingSalutation = billingSalutation;
}
public Set<CustomerContact> getRoles() {
return roles;
public String getBillingAddress() {
return billingAddress;
}
public Customer roles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
public Customer billingAddress(String billingAddress) {
this.billingAddress = billingAddress;
return this;
}
public Customer addRole(CustomerContact customerContact) {
this.roles.add(customerContact);
customerContact.setCustomer(this);
public void setBillingAddress(String billingAddress) {
this.billingAddress = billingAddress;
}
public String getRemark() {
return remark;
}
public Customer remark(String remark) {
this.remark = remark;
return this;
}
public Customer removeRole(CustomerContact customerContact) {
this.roles.remove(customerContact);
customerContact.setCustomer(null);
return this;
}
public void setRoles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
public void setRemark(String remark) {
this.remark = remark;
}
public Set<Membership> getMemberships() {
@ -210,6 +204,31 @@ public class Customer implements Serializable {
public void setMemberships(Set<Membership> memberships) {
this.memberships = memberships;
}
public Set<SepaMandate> getSepamandates() {
return sepamandates;
}
public Customer sepamandates(Set<SepaMandate> sepaMandates) {
this.sepamandates = sepaMandates;
return this;
}
public Customer addSepamandate(SepaMandate sepaMandate) {
this.sepamandates.add(sepaMandate);
sepaMandate.setCustomer(this);
return this;
}
public Customer removeSepamandate(SepaMandate sepaMandate) {
this.sepamandates.remove(sepaMandate);
sepaMandate.setCustomer(null);
return this;
}
public void setSepamandates(Set<SepaMandate> sepaMandates) {
this.sepamandates = sepaMandates;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
@ -236,13 +255,14 @@ public class Customer implements Serializable {
public String toString() {
return "Customer{" +
"id=" + getId() +
", number=" + getNumber() +
", reference=" + getReference() +
", prefix='" + getPrefix() + "'" +
", name='" + getName() + "'" +
", contractualAddress='" + getContractualAddress() + "'" +
", contractualSalutation='" + getContractualSalutation() + "'" +
", billingAddress='" + getBillingAddress() + "'" +
", contractualAddress='" + getContractualAddress() + "'" +
", billingSalutation='" + getBillingSalutation() + "'" +
", billingAddress='" + getBillingAddress() + "'" +
", remark='" + getRemark() + "'" +
"}";
}
}

View File

@ -1,119 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;
import org.hostsharing.hsadminng.domain.enumeration.CustomerContactRole;
/**
* A CustomerContact.
*/
@Entity
@Table(name = "customer_contact")
public class CustomerContact implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "jhi_role", nullable = false)
private CustomerContactRole role;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("roles")
private Contact contact;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("roles")
private Customer customer;
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CustomerContactRole getRole() {
return role;
}
public CustomerContact role(CustomerContactRole role) {
this.role = role;
return this;
}
public void setRole(CustomerContactRole role) {
this.role = role;
}
public Contact getContact() {
return contact;
}
public CustomerContact contact(Contact contact) {
this.contact = contact;
return this;
}
public void setContact(Contact contact) {
this.contact = contact;
}
public Customer getCustomer() {
return customer;
}
public CustomerContact customer(Customer customer) {
this.customer = customer;
return this;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CustomerContact customerContact = (CustomerContact) o;
if (customerContact.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), customerContact.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "CustomerContact{" +
"id=" + getId() +
", role='" + getRole() + "'" +
"}";
}
}

View File

@ -1,15 +1,17 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import java.util.Objects;
/**
* A Membership.
@ -28,20 +30,26 @@ public class Membership implements Serializable {
private Long id;
@NotNull
@Column(name = "since_date", nullable = false)
private LocalDate sinceDate;
@Column(name = "until_date")
private LocalDate untilDate;
@OneToMany(mappedBy = "member")
private Set<Share> shares = new HashSet<>();
@OneToMany(mappedBy = "member")
private Set<Asset> assets = new HashSet<>();
@Column(name = "document_date", nullable = false)
private LocalDate documentDate;
@NotNull
@Column(name = "member_from", nullable = false)
private LocalDate memberFrom;
@Column(name = "member_until")
private LocalDate memberUntil;
@Size(max = 160)
@Column(name = "remark", length = 160)
private String remark;
@OneToMany(mappedBy = "membership")
private Set<Share> shares = new HashSet<>();
@OneToMany(mappedBy = "membership")
private Set<Asset> assets = new HashSet<>();
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("memberships")
private Customer customer;
@ -54,30 +62,56 @@ public class Membership implements Serializable {
this.id = id;
}
public LocalDate getSinceDate() {
return sinceDate;
public LocalDate getDocumentDate() {
return documentDate;
}
public Membership sinceDate(LocalDate sinceDate) {
this.sinceDate = sinceDate;
public Membership documentDate(LocalDate documentDate) {
this.documentDate = documentDate;
return this;
}
public void setSinceDate(LocalDate sinceDate) {
this.sinceDate = sinceDate;
public void setDocumentDate(LocalDate documentDate) {
this.documentDate = documentDate;
}
public LocalDate getUntilDate() {
return untilDate;
public LocalDate getMemberFrom() {
return memberFrom;
}
public Membership untilDate(LocalDate untilDate) {
this.untilDate = untilDate;
public Membership memberFrom(LocalDate memberFrom) {
this.memberFrom = memberFrom;
return this;
}
public void setUntilDate(LocalDate untilDate) {
</