Merge branch 'jhipster-generated'
This commit is contained in:
		@@ -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.
 | 
			
		||||
 */
 | 
			
		||||
@@ -46,7 +47,7 @@ public class Asset implements Serializable {
 | 
			
		||||
    @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() {
 | 
			
		||||
@@ -109,17 +110,17 @@ public class Asset implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -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.
 | 
			
		||||
@@ -38,29 +41,29 @@ 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<>();
 | 
			
		||||
 | 
			
		||||
    @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;
 | 
			
		||||
@@ -109,19 +112,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 +125,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 +151,17 @@ 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);
 | 
			
		||||
        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 setBillingAddress(String billingAddress) {
 | 
			
		||||
        this.billingAddress = billingAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Set<Membership> getMemberships() {
 | 
			
		||||
@@ -210,6 +188,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
 | 
			
		||||
@@ -239,10 +242,10 @@ public class Customer implements Serializable {
 | 
			
		||||
            ", number=" + getNumber() +
 | 
			
		||||
            ", prefix='" + getPrefix() + "'" +
 | 
			
		||||
            ", name='" + getName() + "'" +
 | 
			
		||||
            ", contractualAddress='" + getContractualAddress() + "'" +
 | 
			
		||||
            ", contractualSalutation='" + getContractualSalutation() + "'" +
 | 
			
		||||
            ", billingAddress='" + getBillingAddress() + "'" +
 | 
			
		||||
            ", contractualAddress='" + getContractualAddress() + "'" +
 | 
			
		||||
            ", billingSalutation='" + getBillingSalutation() + "'" +
 | 
			
		||||
            ", billingAddress='" + getBillingAddress() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -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,24 @@ public class Membership implements Serializable {
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Column(name = "since_date", nullable = false)
 | 
			
		||||
    private LocalDate sinceDate;
 | 
			
		||||
    @Column(name = "jhi_from", nullable = false)
 | 
			
		||||
    private LocalDate from;
 | 
			
		||||
 | 
			
		||||
    @Column(name = "until_date")
 | 
			
		||||
    private LocalDate untilDate;
 | 
			
		||||
    @Column(name = "jhi_to")
 | 
			
		||||
    private LocalDate to;
 | 
			
		||||
 | 
			
		||||
    @OneToMany(mappedBy = "member")
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    @Column(name = "jhi_comment", length = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    @OneToMany(mappedBy = "membership")
 | 
			
		||||
    private Set<Share> shares = new HashSet<>();
 | 
			
		||||
 | 
			
		||||
    @OneToMany(mappedBy = "member")
 | 
			
		||||
    @OneToMany(mappedBy = "membership")
 | 
			
		||||
    private Set<Asset> assets = new HashSet<>();
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @ManyToOne(optional = false)
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @JsonIgnoreProperties("memberships")
 | 
			
		||||
    private Customer customer;
 | 
			
		||||
 | 
			
		||||
@@ -54,30 +60,43 @@ public class Membership implements Serializable {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getSinceDate() {
 | 
			
		||||
        return sinceDate;
 | 
			
		||||
    public LocalDate getFrom() {
 | 
			
		||||
        return from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership sinceDate(LocalDate sinceDate) {
 | 
			
		||||
        this.sinceDate = sinceDate;
 | 
			
		||||
    public Membership from(LocalDate from) {
 | 
			
		||||
        this.from = from;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSinceDate(LocalDate sinceDate) {
 | 
			
		||||
        this.sinceDate = sinceDate;
 | 
			
		||||
    public void setFrom(LocalDate from) {
 | 
			
		||||
        this.from = from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getUntilDate() {
 | 
			
		||||
        return untilDate;
 | 
			
		||||
    public LocalDate getTo() {
 | 
			
		||||
        return to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership untilDate(LocalDate untilDate) {
 | 
			
		||||
        this.untilDate = untilDate;
 | 
			
		||||
    public Membership to(LocalDate to) {
 | 
			
		||||
        this.to = to;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setUntilDate(LocalDate untilDate) {
 | 
			
		||||
        this.untilDate = untilDate;
 | 
			
		||||
    public void setTo(LocalDate to) {
 | 
			
		||||
        this.to = to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership comment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Set<Share> getShares() {
 | 
			
		||||
@@ -91,13 +110,13 @@ public class Membership implements Serializable {
 | 
			
		||||
 | 
			
		||||
    public Membership addShare(Share share) {
 | 
			
		||||
        this.shares.add(share);
 | 
			
		||||
        share.setMember(this);
 | 
			
		||||
        share.setMembership(this);
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership removeShare(Share share) {
 | 
			
		||||
        this.shares.remove(share);
 | 
			
		||||
        share.setMember(null);
 | 
			
		||||
        share.setMembership(null);
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -116,13 +135,13 @@ public class Membership implements Serializable {
 | 
			
		||||
 | 
			
		||||
    public Membership addAsset(Asset asset) {
 | 
			
		||||
        this.assets.add(asset);
 | 
			
		||||
        asset.setMember(this);
 | 
			
		||||
        asset.setMembership(this);
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership removeAsset(Asset asset) {
 | 
			
		||||
        this.assets.remove(asset);
 | 
			
		||||
        asset.setMember(null);
 | 
			
		||||
        asset.setMembership(null);
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -168,8 +187,9 @@ public class Membership implements Serializable {
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "Membership{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", sinceDate='" + getSinceDate() + "'" +
 | 
			
		||||
            ", untilDate='" + getUntilDate() + "'" +
 | 
			
		||||
            ", from='" + getFrom() + "'" +
 | 
			
		||||
            ", to='" + getTo() + "'" +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										241
									
								
								src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										241
									
								
								src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,241 @@
 | 
			
		||||
package org.hostsharing.hsadminng.domain;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.*;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A SepaMandate.
 | 
			
		||||
 */
 | 
			
		||||
@Entity
 | 
			
		||||
@Table(name = "sepa_mandate")
 | 
			
		||||
public class SepaMandate implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
    
 | 
			
		||||
    @Id
 | 
			
		||||
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
 | 
			
		||||
    @SequenceGenerator(name = "sequenceGenerator")
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 40)
 | 
			
		||||
    @Column(name = "reference", length = 40, nullable = false, unique = true)
 | 
			
		||||
    private String reference;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 34)
 | 
			
		||||
    @Column(name = "iban", length = 34)
 | 
			
		||||
    private String iban;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 11)
 | 
			
		||||
    @Column(name = "bic", length = 11)
 | 
			
		||||
    private String bic;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Column(name = "created", nullable = false)
 | 
			
		||||
    private LocalDate created;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Column(name = "valid_from", nullable = false)
 | 
			
		||||
    private LocalDate validFrom;
 | 
			
		||||
 | 
			
		||||
    @Column(name = "valid_to")
 | 
			
		||||
    private LocalDate validTo;
 | 
			
		||||
 | 
			
		||||
    @Column(name = "last_used")
 | 
			
		||||
    private LocalDate lastUsed;
 | 
			
		||||
 | 
			
		||||
    @Column(name = "cancelled")
 | 
			
		||||
    private LocalDate cancelled;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    @Column(name = "jhi_comment", length = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    @ManyToOne(optional = false)
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @JsonIgnoreProperties("sepamandates")
 | 
			
		||||
    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 String getReference() {
 | 
			
		||||
        return reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate reference(String reference) {
 | 
			
		||||
        this.reference = reference;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setReference(String reference) {
 | 
			
		||||
        this.reference = reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getIban() {
 | 
			
		||||
        return iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate iban(String iban) {
 | 
			
		||||
        this.iban = iban;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setIban(String iban) {
 | 
			
		||||
        this.iban = iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBic() {
 | 
			
		||||
        return bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate bic(String bic) {
 | 
			
		||||
        this.bic = bic;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBic(String bic) {
 | 
			
		||||
        this.bic = bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getCreated() {
 | 
			
		||||
        return created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate created(LocalDate created) {
 | 
			
		||||
        this.created = created;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCreated(LocalDate created) {
 | 
			
		||||
        this.created = created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getValidFrom() {
 | 
			
		||||
        return validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate validFrom(LocalDate validFrom) {
 | 
			
		||||
        this.validFrom = validFrom;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidFrom(LocalDate validFrom) {
 | 
			
		||||
        this.validFrom = validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getValidTo() {
 | 
			
		||||
        return validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate validTo(LocalDate validTo) {
 | 
			
		||||
        this.validTo = validTo;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidTo(LocalDate validTo) {
 | 
			
		||||
        this.validTo = validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getLastUsed() {
 | 
			
		||||
        return lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate lastUsed(LocalDate lastUsed) {
 | 
			
		||||
        this.lastUsed = lastUsed;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setLastUsed(LocalDate lastUsed) {
 | 
			
		||||
        this.lastUsed = lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getCancelled() {
 | 
			
		||||
        return cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate cancelled(LocalDate cancelled) {
 | 
			
		||||
        this.cancelled = cancelled;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCancelled(LocalDate cancelled) {
 | 
			
		||||
        this.cancelled = cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate comment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
        return this;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Customer getCustomer() {
 | 
			
		||||
        return customer;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public SepaMandate 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;
 | 
			
		||||
        }
 | 
			
		||||
        SepaMandate sepaMandate = (SepaMandate) o;
 | 
			
		||||
        if (sepaMandate.getId() == null || getId() == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return Objects.equals(getId(), sepaMandate.getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hashCode(getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "SepaMandate{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", reference='" + getReference() + "'" +
 | 
			
		||||
            ", iban='" + getIban() + "'" +
 | 
			
		||||
            ", bic='" + getBic() + "'" +
 | 
			
		||||
            ", created='" + getCreated() + "'" +
 | 
			
		||||
            ", validFrom='" + getValidFrom() + "'" +
 | 
			
		||||
            ", validTo='" + getValidTo() + "'" +
 | 
			
		||||
            ", lastUsed='" + getLastUsed() + "'" +
 | 
			
		||||
            ", cancelled='" + getCancelled() + "'" +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -2,15 +2,16 @@ package org.hostsharing.hsadminng.domain;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.*;
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A Share.
 | 
			
		||||
 */
 | 
			
		||||
@@ -47,7 +48,7 @@ public class Share implements Serializable {
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @ManyToOne(optional = false)
 | 
			
		||||
    @JsonIgnoreProperties("shares")
 | 
			
		||||
    private Membership member;
 | 
			
		||||
    private Membership membership;
 | 
			
		||||
 | 
			
		||||
    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
@@ -110,17 +111,17 @@ public class Share implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Membership getMember() {
 | 
			
		||||
        return member;
 | 
			
		||||
    public Membership getMembership() {
 | 
			
		||||
        return membership;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Share member(Membership membership) {
 | 
			
		||||
        this.member = membership;
 | 
			
		||||
    public Share 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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.domain.enumeration;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * The CustomerContactRole enumeration.
 | 
			
		||||
 */
 | 
			
		||||
public enum CustomerContactRole {
 | 
			
		||||
    CONTRACTUAL, TECHNICAL, FINANCIAL
 | 
			
		||||
}
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.repository;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Contact;
 | 
			
		||||
import org.springframework.data.jpa.repository.*;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Spring Data  repository for the Contact entity.
 | 
			
		||||
 */
 | 
			
		||||
@SuppressWarnings("unused")
 | 
			
		||||
@Repository
 | 
			
		||||
public interface ContactRepository extends JpaRepository<Contact, Long>, JpaSpecificationExecutor<Contact> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,15 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.repository;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.CustomerContact;
 | 
			
		||||
import org.springframework.data.jpa.repository.*;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Spring Data  repository for the CustomerContact entity.
 | 
			
		||||
 */
 | 
			
		||||
@SuppressWarnings("unused")
 | 
			
		||||
@Repository
 | 
			
		||||
public interface CustomerContactRepository extends JpaRepository<CustomerContact, Long>, JpaSpecificationExecutor<CustomerContact> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -16,6 +16,6 @@ import org.springframework.stereotype.Repository;
 | 
			
		||||
public interface MembershipRepository extends JpaRepository<Membership, Long>, JpaSpecificationExecutor<Membership> {
 | 
			
		||||
 | 
			
		||||
    @Query("SELECT CASE WHEN COUNT(m)> 0 THEN TRUE ELSE FALSE END " +
 | 
			
		||||
        " FROM Membership m WHERE m.customer.id=:customerId AND m.untilDate IS NULL")
 | 
			
		||||
        " FROM Membership m WHERE m.customer.id=:customerId AND m.to IS NULL")
 | 
			
		||||
    boolean hasUncancelledMembershipForCustomer(@Param("customerId") final long customerId);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
package org.hostsharing.hsadminng.repository;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.SepaMandate;
 | 
			
		||||
import org.springframework.data.jpa.repository.*;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Spring Data  repository for the SepaMandate entity.
 | 
			
		||||
 */
 | 
			
		||||
@SuppressWarnings("unused")
 | 
			
		||||
@Repository
 | 
			
		||||
public interface SepaMandateRepository extends JpaRepository<SepaMandate, Long>, JpaSpecificationExecutor<SepaMandate> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -101,9 +101,9 @@ public class AssetQueryService extends QueryService<Asset> {
 | 
			
		||||
            if (criteria.getComment() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getComment(), Asset_.comment));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getMemberId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getMemberId(),
 | 
			
		||||
                    root -> root.join(Asset_.member, JoinType.LEFT).get(Membership_.id)));
 | 
			
		||||
            if (criteria.getMembershipId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getMembershipId(),
 | 
			
		||||
                    root -> root.join(Asset_.membership, JoinType.LEFT).get(Membership_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,108 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.criteria.JoinType;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.data.jpa.domain.Specification;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import io.github.jhipster.service.QueryService;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Contact;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*; // for static metamodels
 | 
			
		||||
import org.hostsharing.hsadminng.repository.ContactRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.ContactMapper;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service for executing complex queries for Contact entities in the database.
 | 
			
		||||
 * The main input is a {@link ContactCriteria} which gets converted to {@link Specification},
 | 
			
		||||
 * in a way that all the filters must apply.
 | 
			
		||||
 * It returns a {@link List} of {@link ContactDTO} or a {@link Page} of {@link ContactDTO} which fulfills the criteria.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional(readOnly = true)
 | 
			
		||||
public class ContactQueryService extends QueryService<Contact> {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(ContactQueryService.class);
 | 
			
		||||
 | 
			
		||||
    private final ContactRepository contactRepository;
 | 
			
		||||
 | 
			
		||||
    private final ContactMapper contactMapper;
 | 
			
		||||
 | 
			
		||||
    public ContactQueryService(ContactRepository contactRepository, ContactMapper contactMapper) {
 | 
			
		||||
        this.contactRepository = contactRepository;
 | 
			
		||||
        this.contactMapper = contactMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link List} of {@link ContactDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public List<ContactDTO> findByCriteria(ContactCriteria criteria) {
 | 
			
		||||
        log.debug("find by criteria : {}", criteria);
 | 
			
		||||
        final Specification<Contact> specification = createSpecification(criteria);
 | 
			
		||||
        return contactMapper.toDto(contactRepository.findAll(specification));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link Page} of {@link ContactDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @param page The page, which should be returned.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<ContactDTO> findByCriteria(ContactCriteria criteria, Pageable page) {
 | 
			
		||||
        log.debug("find by criteria : {}, page: {}", criteria, page);
 | 
			
		||||
        final Specification<Contact> specification = createSpecification(criteria);
 | 
			
		||||
        return contactRepository.findAll(specification, page)
 | 
			
		||||
            .map(contactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return the number of matching entities in the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the number of matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public long countByCriteria(ContactCriteria criteria) {
 | 
			
		||||
        log.debug("count by criteria : {}", criteria);
 | 
			
		||||
        final Specification<Contact> specification = createSpecification(criteria);
 | 
			
		||||
        return contactRepository.count(specification);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Function to convert ContactCriteria to a {@link Specification}
 | 
			
		||||
     */
 | 
			
		||||
    private Specification<Contact> createSpecification(ContactCriteria criteria) {
 | 
			
		||||
        Specification<Contact> specification = Specification.where(null);
 | 
			
		||||
        if (criteria != null) {
 | 
			
		||||
            if (criteria.getId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getId(), Contact_.id));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getFirstName() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getFirstName(), Contact_.firstName));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getLastName() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getLastName(), Contact_.lastName));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getEmail() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getEmail(), Contact_.email));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getRoleId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getRoleId(),
 | 
			
		||||
                    root -> root.join(Contact_.roles, JoinType.LEFT).get(CustomerContact_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,84 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Contact;
 | 
			
		||||
import org.hostsharing.hsadminng.repository.ContactRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.ContactMapper;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service Implementation for managing Contact.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional
 | 
			
		||||
public class ContactService {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(ContactService.class);
 | 
			
		||||
 | 
			
		||||
    private final ContactRepository contactRepository;
 | 
			
		||||
 | 
			
		||||
    private final ContactMapper contactMapper;
 | 
			
		||||
 | 
			
		||||
    public ContactService(ContactRepository contactRepository, ContactMapper contactMapper) {
 | 
			
		||||
        this.contactRepository = contactRepository;
 | 
			
		||||
        this.contactMapper = contactMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Save a contact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param contactDTO the entity to save
 | 
			
		||||
     * @return the persisted entity
 | 
			
		||||
     */
 | 
			
		||||
    public ContactDTO save(ContactDTO contactDTO) {
 | 
			
		||||
        log.debug("Request to save Contact : {}", contactDTO);
 | 
			
		||||
        Contact contact = contactMapper.toEntity(contactDTO);
 | 
			
		||||
        contact = contactRepository.save(contact);
 | 
			
		||||
        return contactMapper.toDto(contact);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get all the contacts.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @return the list of entities
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<ContactDTO> findAll(Pageable pageable) {
 | 
			
		||||
        log.debug("Request to get all Contacts");
 | 
			
		||||
        return contactRepository.findAll(pageable)
 | 
			
		||||
            .map(contactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get one contact by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     * @return the entity
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Optional<ContactDTO> findOne(Long id) {
 | 
			
		||||
        log.debug("Request to get Contact : {}", id);
 | 
			
		||||
        return contactRepository.findById(id)
 | 
			
		||||
            .map(contactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Delete the contact by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     */
 | 
			
		||||
    public void delete(Long id) {
 | 
			
		||||
        log.debug("Request to delete Contact : {}", id);
 | 
			
		||||
        contactRepository.deleteById(id);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,106 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.criteria.JoinType;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.data.jpa.domain.Specification;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import io.github.jhipster.service.QueryService;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.CustomerContact;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*; // for static metamodels
 | 
			
		||||
import org.hostsharing.hsadminng.repository.CustomerContactRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.CustomerContactMapper;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service for executing complex queries for CustomerContact entities in the database.
 | 
			
		||||
 * The main input is a {@link CustomerContactCriteria} which gets converted to {@link Specification},
 | 
			
		||||
 * in a way that all the filters must apply.
 | 
			
		||||
 * It returns a {@link List} of {@link CustomerContactDTO} or a {@link Page} of {@link CustomerContactDTO} which fulfills the criteria.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional(readOnly = true)
 | 
			
		||||
public class CustomerContactQueryService extends QueryService<CustomerContact> {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(CustomerContactQueryService.class);
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactRepository customerContactRepository;
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactMapper customerContactMapper;
 | 
			
		||||
 | 
			
		||||
    public CustomerContactQueryService(CustomerContactRepository customerContactRepository, CustomerContactMapper customerContactMapper) {
 | 
			
		||||
        this.customerContactRepository = customerContactRepository;
 | 
			
		||||
        this.customerContactMapper = customerContactMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link List} of {@link CustomerContactDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public List<CustomerContactDTO> findByCriteria(CustomerContactCriteria criteria) {
 | 
			
		||||
        log.debug("find by criteria : {}", criteria);
 | 
			
		||||
        final Specification<CustomerContact> specification = createSpecification(criteria);
 | 
			
		||||
        return customerContactMapper.toDto(customerContactRepository.findAll(specification));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link Page} of {@link CustomerContactDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @param page The page, which should be returned.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<CustomerContactDTO> findByCriteria(CustomerContactCriteria criteria, Pageable page) {
 | 
			
		||||
        log.debug("find by criteria : {}, page: {}", criteria, page);
 | 
			
		||||
        final Specification<CustomerContact> specification = createSpecification(criteria);
 | 
			
		||||
        return customerContactRepository.findAll(specification, page)
 | 
			
		||||
            .map(customerContactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return the number of matching entities in the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the number of matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public long countByCriteria(CustomerContactCriteria criteria) {
 | 
			
		||||
        log.debug("count by criteria : {}", criteria);
 | 
			
		||||
        final Specification<CustomerContact> specification = createSpecification(criteria);
 | 
			
		||||
        return customerContactRepository.count(specification);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Function to convert CustomerContactCriteria to a {@link Specification}
 | 
			
		||||
     */
 | 
			
		||||
    private Specification<CustomerContact> createSpecification(CustomerContactCriteria criteria) {
 | 
			
		||||
        Specification<CustomerContact> specification = Specification.where(null);
 | 
			
		||||
        if (criteria != null) {
 | 
			
		||||
            if (criteria.getId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getId(), CustomerContact_.id));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getRole() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getRole(), CustomerContact_.role));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getContactId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getContactId(),
 | 
			
		||||
                    root -> root.join(CustomerContact_.contact, JoinType.LEFT).get(Contact_.id)));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getCustomerId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getCustomerId(),
 | 
			
		||||
                    root -> root.join(CustomerContact_.customer, JoinType.LEFT).get(Customer_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,84 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.CustomerContact;
 | 
			
		||||
import org.hostsharing.hsadminng.repository.CustomerContactRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.CustomerContactMapper;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service Implementation for managing CustomerContact.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional
 | 
			
		||||
public class CustomerContactService {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(CustomerContactService.class);
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactRepository customerContactRepository;
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactMapper customerContactMapper;
 | 
			
		||||
 | 
			
		||||
    public CustomerContactService(CustomerContactRepository customerContactRepository, CustomerContactMapper customerContactMapper) {
 | 
			
		||||
        this.customerContactRepository = customerContactRepository;
 | 
			
		||||
        this.customerContactMapper = customerContactMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Save a customerContact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param customerContactDTO the entity to save
 | 
			
		||||
     * @return the persisted entity
 | 
			
		||||
     */
 | 
			
		||||
    public CustomerContactDTO save(CustomerContactDTO customerContactDTO) {
 | 
			
		||||
        log.debug("Request to save CustomerContact : {}", customerContactDTO);
 | 
			
		||||
        CustomerContact customerContact = customerContactMapper.toEntity(customerContactDTO);
 | 
			
		||||
        customerContact = customerContactRepository.save(customerContact);
 | 
			
		||||
        return customerContactMapper.toDto(customerContact);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get all the customerContacts.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @return the list of entities
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<CustomerContactDTO> findAll(Pageable pageable) {
 | 
			
		||||
        log.debug("Request to get all CustomerContacts");
 | 
			
		||||
        return customerContactRepository.findAll(pageable)
 | 
			
		||||
            .map(customerContactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get one customerContact by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     * @return the entity
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Optional<CustomerContactDTO> findOne(Long id) {
 | 
			
		||||
        log.debug("Request to get CustomerContact : {}", id);
 | 
			
		||||
        return customerContactRepository.findById(id)
 | 
			
		||||
            .map(customerContactMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Delete the customerContact by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     */
 | 
			
		||||
    public void delete(Long id) {
 | 
			
		||||
        log.debug("Request to delete CustomerContact : {}", id);
 | 
			
		||||
        customerContactRepository.deleteById(id);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,14 +1,9 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import io.github.jhipster.service.QueryService;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Customer;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.CustomerContact_;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Customer_;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Membership_;
 | 
			
		||||
import org.hostsharing.hsadminng.repository.CustomerRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.CustomerMapper;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.criteria.JoinType;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
@@ -17,8 +12,14 @@ import org.springframework.data.jpa.domain.Specification;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.criteria.JoinType;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import io.github.jhipster.service.QueryService;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Customer;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*; // for static metamodels
 | 
			
		||||
import org.hostsharing.hsadminng.repository.CustomerRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.CustomerMapper;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service for executing complex queries for Customer entities in the database.
 | 
			
		||||
@@ -97,26 +98,26 @@ public class CustomerQueryService extends QueryService<Customer> {
 | 
			
		||||
            if (criteria.getName() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getName(), Customer_.name));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getContractualAddress() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getContractualAddress(), Customer_.contractualAddress));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getContractualSalutation() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getContractualSalutation(), Customer_.contractualSalutation));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getBillingAddress() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getBillingAddress(), Customer_.billingAddress));
 | 
			
		||||
            if (criteria.getContractualAddress() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getContractualAddress(), Customer_.contractualAddress));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getBillingSalutation() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getBillingSalutation(), Customer_.billingSalutation));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getRoleId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getRoleId(),
 | 
			
		||||
                    root -> root.join(Customer_.roles, JoinType.LEFT).get(CustomerContact_.id)));
 | 
			
		||||
            if (criteria.getBillingAddress() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getBillingAddress(), Customer_.billingAddress));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getMembershipId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getMembershipId(),
 | 
			
		||||
                    root -> root.join(Customer_.memberships, JoinType.LEFT).get(Membership_.id)));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getSepamandateId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getSepamandateId(),
 | 
			
		||||
                    root -> root.join(Customer_.sepamandates, JoinType.LEFT).get(SepaMandate_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -89,11 +89,14 @@ public class MembershipQueryService extends QueryService<Membership> {
 | 
			
		||||
            if (criteria.getId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getId(), Membership_.id));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getSinceDate() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getSinceDate(), Membership_.sinceDate));
 | 
			
		||||
            if (criteria.getFrom() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getFrom(), Membership_.from));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getUntilDate() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getUntilDate(), Membership_.untilDate));
 | 
			
		||||
            if (criteria.getTo() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getTo(), Membership_.to));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getComment() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getComment(), Membership_.comment));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getShareId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getShareId(),
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ public class MembershipValidator {
 | 
			
		||||
    private MembershipRepository membershipRepository;
 | 
			
		||||
 | 
			
		||||
    public void validate(final MembershipDTO membershipDTO) {
 | 
			
		||||
        if (membershipDTO.getUntilDate() != null && !membershipDTO.getUntilDate().isAfter(membershipDTO.getSinceDate())) {
 | 
			
		||||
        if (membershipDTO.getTo() != null && !membershipDTO.getTo().isAfter(membershipDTO.getFrom())) {
 | 
			
		||||
            throw new BadRequestAlertException("Invalid untilDate", Membership.ENTITY_NAME, "untilDateMustBeAfterSinceDate");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,126 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import javax.persistence.criteria.JoinType;
 | 
			
		||||
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.data.jpa.domain.Specification;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import io.github.jhipster.service.QueryService;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.SepaMandate;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*; // for static metamodels
 | 
			
		||||
import org.hostsharing.hsadminng.repository.SepaMandateRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service for executing complex queries for SepaMandate entities in the database.
 | 
			
		||||
 * The main input is a {@link SepaMandateCriteria} which gets converted to {@link Specification},
 | 
			
		||||
 * in a way that all the filters must apply.
 | 
			
		||||
 * It returns a {@link List} of {@link SepaMandateDTO} or a {@link Page} of {@link SepaMandateDTO} which fulfills the criteria.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional(readOnly = true)
 | 
			
		||||
public class SepaMandateQueryService extends QueryService<SepaMandate> {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(SepaMandateQueryService.class);
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateRepository sepaMandateRepository;
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateMapper sepaMandateMapper;
 | 
			
		||||
 | 
			
		||||
    public SepaMandateQueryService(SepaMandateRepository sepaMandateRepository, SepaMandateMapper sepaMandateMapper) {
 | 
			
		||||
        this.sepaMandateRepository = sepaMandateRepository;
 | 
			
		||||
        this.sepaMandateMapper = sepaMandateMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link List} of {@link SepaMandateDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public List<SepaMandateDTO> findByCriteria(SepaMandateCriteria criteria) {
 | 
			
		||||
        log.debug("find by criteria : {}", criteria);
 | 
			
		||||
        final Specification<SepaMandate> specification = createSpecification(criteria);
 | 
			
		||||
        return sepaMandateMapper.toDto(sepaMandateRepository.findAll(specification));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return a {@link Page} of {@link SepaMandateDTO} which matches the criteria from the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @param page The page, which should be returned.
 | 
			
		||||
     * @return the matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<SepaMandateDTO> findByCriteria(SepaMandateCriteria criteria, Pageable page) {
 | 
			
		||||
        log.debug("find by criteria : {}, page: {}", criteria, page);
 | 
			
		||||
        final Specification<SepaMandate> specification = createSpecification(criteria);
 | 
			
		||||
        return sepaMandateRepository.findAll(specification, page)
 | 
			
		||||
            .map(sepaMandateMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Return the number of matching entities in the database
 | 
			
		||||
     * @param criteria The object which holds all the filters, which the entities should match.
 | 
			
		||||
     * @return the number of matching entities.
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public long countByCriteria(SepaMandateCriteria criteria) {
 | 
			
		||||
        log.debug("count by criteria : {}", criteria);
 | 
			
		||||
        final Specification<SepaMandate> specification = createSpecification(criteria);
 | 
			
		||||
        return sepaMandateRepository.count(specification);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Function to convert SepaMandateCriteria to a {@link Specification}
 | 
			
		||||
     */
 | 
			
		||||
    private Specification<SepaMandate> createSpecification(SepaMandateCriteria criteria) {
 | 
			
		||||
        Specification<SepaMandate> specification = Specification.where(null);
 | 
			
		||||
        if (criteria != null) {
 | 
			
		||||
            if (criteria.getId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getId(), SepaMandate_.id));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getReference() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getReference(), SepaMandate_.reference));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getIban() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getIban(), SepaMandate_.iban));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getBic() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getBic(), SepaMandate_.bic));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getCreated() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getCreated(), SepaMandate_.created));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getValidFrom() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getValidFrom(), SepaMandate_.validFrom));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getValidTo() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getValidTo(), SepaMandate_.validTo));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getLastUsed() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getLastUsed(), SepaMandate_.lastUsed));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getCancelled() != null) {
 | 
			
		||||
                specification = specification.and(buildRangeSpecification(criteria.getCancelled(), SepaMandate_.cancelled));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getComment() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getComment(), SepaMandate_.comment));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getCustomerId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getCustomerId(),
 | 
			
		||||
                    root -> root.join(SepaMandate_.customer, JoinType.LEFT).get(Customer_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,84 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.SepaMandate;
 | 
			
		||||
import org.hostsharing.hsadminng.repository.SepaMandateRepository;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.mapper.SepaMandateMapper;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Service Implementation for managing SepaMandate.
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional
 | 
			
		||||
public class SepaMandateService {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(SepaMandateService.class);
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateRepository sepaMandateRepository;
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateMapper sepaMandateMapper;
 | 
			
		||||
 | 
			
		||||
    public SepaMandateService(SepaMandateRepository sepaMandateRepository, SepaMandateMapper sepaMandateMapper) {
 | 
			
		||||
        this.sepaMandateRepository = sepaMandateRepository;
 | 
			
		||||
        this.sepaMandateMapper = sepaMandateMapper;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Save a sepaMandate.
 | 
			
		||||
     *
 | 
			
		||||
     * @param sepaMandateDTO the entity to save
 | 
			
		||||
     * @return the persisted entity
 | 
			
		||||
     */
 | 
			
		||||
    public SepaMandateDTO save(SepaMandateDTO sepaMandateDTO) {
 | 
			
		||||
        log.debug("Request to save SepaMandate : {}", sepaMandateDTO);
 | 
			
		||||
        SepaMandate sepaMandate = sepaMandateMapper.toEntity(sepaMandateDTO);
 | 
			
		||||
        sepaMandate = sepaMandateRepository.save(sepaMandate);
 | 
			
		||||
        return sepaMandateMapper.toDto(sepaMandate);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get all the sepaMandates.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @return the list of entities
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Page<SepaMandateDTO> findAll(Pageable pageable) {
 | 
			
		||||
        log.debug("Request to get all SepaMandates");
 | 
			
		||||
        return sepaMandateRepository.findAll(pageable)
 | 
			
		||||
            .map(sepaMandateMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Get one sepaMandate by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     * @return the entity
 | 
			
		||||
     */
 | 
			
		||||
    @Transactional(readOnly = true)
 | 
			
		||||
    public Optional<SepaMandateDTO> findOne(Long id) {
 | 
			
		||||
        log.debug("Request to get SepaMandate : {}", id);
 | 
			
		||||
        return sepaMandateRepository.findById(id)
 | 
			
		||||
            .map(sepaMandateMapper::toDto);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Delete the sepaMandate by id.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the entity
 | 
			
		||||
     */
 | 
			
		||||
    public void delete(Long id) {
 | 
			
		||||
        log.debug("Request to delete SepaMandate : {}", id);
 | 
			
		||||
        sepaMandateRepository.deleteById(id);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -101,9 +101,9 @@ public class ShareQueryService extends QueryService<Share> {
 | 
			
		||||
            if (criteria.getComment() != null) {
 | 
			
		||||
                specification = specification.and(buildStringSpecification(criteria.getComment(), Share_.comment));
 | 
			
		||||
            }
 | 
			
		||||
            if (criteria.getMemberId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getMemberId(),
 | 
			
		||||
                    root -> root.join(Share_.member, JoinType.LEFT).get(Membership_.id)));
 | 
			
		||||
            if (criteria.getMembershipId() != null) {
 | 
			
		||||
                specification = specification.and(buildSpecification(criteria.getMembershipId(),
 | 
			
		||||
                    root -> root.join(Share_.membership, JoinType.LEFT).get(Membership_.id)));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return specification;
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ public class AssetCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private StringFilter comment;
 | 
			
		||||
 | 
			
		||||
    private LongFilter memberId;
 | 
			
		||||
    private LongFilter membershipId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
@@ -82,12 +82,12 @@ public class AssetCriteria implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getMemberId() {
 | 
			
		||||
        return memberId;
 | 
			
		||||
    public LongFilter getMembershipId() {
 | 
			
		||||
        return membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMemberId(LongFilter memberId) {
 | 
			
		||||
        this.memberId = memberId;
 | 
			
		||||
    public void setMembershipId(LongFilter membershipId) {
 | 
			
		||||
        this.membershipId = membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -106,7 +106,7 @@ public class AssetCriteria implements Serializable {
 | 
			
		||||
            Objects.equals(action, that.action) &&
 | 
			
		||||
            Objects.equals(amount, that.amount) &&
 | 
			
		||||
            Objects.equals(comment, that.comment) &&
 | 
			
		||||
            Objects.equals(memberId, that.memberId);
 | 
			
		||||
            Objects.equals(membershipId, that.membershipId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -117,7 +117,7 @@ public class AssetCriteria implements Serializable {
 | 
			
		||||
        action,
 | 
			
		||||
        amount,
 | 
			
		||||
        comment,
 | 
			
		||||
        memberId
 | 
			
		||||
        membershipId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -129,7 +129,7 @@ public class AssetCriteria implements Serializable {
 | 
			
		||||
                (action != null ? "action=" + action + ", " : "") +
 | 
			
		||||
                (amount != null ? "amount=" + amount + ", " : "") +
 | 
			
		||||
                (comment != null ? "comment=" + comment + ", " : "") +
 | 
			
		||||
                (memberId != null ? "memberId=" + memberId + ", " : "") +
 | 
			
		||||
                (membershipId != null ? "membershipId=" + membershipId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,10 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
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 DTO for the Asset entity.
 | 
			
		||||
@@ -28,8 +25,10 @@ public class AssetDTO implements Serializable {
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private Long memberId;
 | 
			
		||||
 | 
			
		||||
    private Long membershipId;
 | 
			
		||||
 | 
			
		||||
    private String membershipFrom;
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
@@ -71,12 +70,20 @@ public class AssetDTO implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getMemberId() {
 | 
			
		||||
        return memberId;
 | 
			
		||||
    public Long getMembershipId() {
 | 
			
		||||
        return membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMemberId(Long membershipId) {
 | 
			
		||||
        this.memberId = membershipId;
 | 
			
		||||
    public void setMembershipId(Long membershipId) {
 | 
			
		||||
        this.membershipId = membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getMembershipFrom() {
 | 
			
		||||
        return membershipFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMembershipFrom(String membershipFrom) {
 | 
			
		||||
        this.membershipFrom = membershipFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -108,7 +115,8 @@ public class AssetDTO implements Serializable {
 | 
			
		||||
            ", action='" + getAction() + "'" +
 | 
			
		||||
            ", amount=" + getAmount() +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            ", member=" + getMemberId() +
 | 
			
		||||
            ", membership=" + getMembershipId() +
 | 
			
		||||
            ", membership='" + getMembershipFrom() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,115 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import io.github.jhipster.service.filter.BooleanFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.DoubleFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.Filter;
 | 
			
		||||
import io.github.jhipster.service.filter.FloatFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.IntegerFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.LongFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.StringFilter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Criteria class for the Contact entity. This class is used in ContactResource to
 | 
			
		||||
 * receive all the possible filtering options from the Http GET request parameters.
 | 
			
		||||
 * For example the following could be a valid requests:
 | 
			
		||||
 * <code> /contacts?id.greaterThan=5&attr1.contains=something&attr2.specified=false</code>
 | 
			
		||||
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 | 
			
		||||
 * fix type specific filters.
 | 
			
		||||
 */
 | 
			
		||||
public class ContactCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private LongFilter id;
 | 
			
		||||
 | 
			
		||||
    private StringFilter firstName;
 | 
			
		||||
 | 
			
		||||
    private StringFilter lastName;
 | 
			
		||||
 | 
			
		||||
    private StringFilter email;
 | 
			
		||||
 | 
			
		||||
    private LongFilter roleId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(LongFilter id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getFirstName() {
 | 
			
		||||
        return firstName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setFirstName(StringFilter firstName) {
 | 
			
		||||
        this.firstName = firstName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getLastName() {
 | 
			
		||||
        return lastName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setLastName(StringFilter lastName) {
 | 
			
		||||
        this.lastName = lastName;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getEmail() {
 | 
			
		||||
        return email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setEmail(StringFilter email) {
 | 
			
		||||
        this.email = email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getRoleId() {
 | 
			
		||||
        return roleId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setRoleId(LongFilter roleId) {
 | 
			
		||||
        this.roleId = roleId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final ContactCriteria that = (ContactCriteria) o;
 | 
			
		||||
        return
 | 
			
		||||
            Objects.equals(id, that.id) &&
 | 
			
		||||
            Objects.equals(firstName, that.firstName) &&
 | 
			
		||||
            Objects.equals(lastName, that.lastName) &&
 | 
			
		||||
            Objects.equals(email, that.email) &&
 | 
			
		||||
            Objects.equals(roleId, that.roleId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hash(
 | 
			
		||||
        id,
 | 
			
		||||
        firstName,
 | 
			
		||||
        lastName,
 | 
			
		||||
        email,
 | 
			
		||||
        roleId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "ContactCriteria{" +
 | 
			
		||||
                (id != null ? "id=" + id + ", " : "") +
 | 
			
		||||
                (firstName != null ? "firstName=" + firstName + ", " : "") +
 | 
			
		||||
                (lastName != null ? "lastName=" + lastName + ", " : "") +
 | 
			
		||||
                (email != null ? "email=" + email + ", " : "") +
 | 
			
		||||
                (roleId != null ? "roleId=" + roleId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,88 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A DTO for the Contact entity.
 | 
			
		||||
 */
 | 
			
		||||
public class ContactDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String firstName;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String lastName;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(Long id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    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 getEmail() {
 | 
			
		||||
        return email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setEmail(String email) {
 | 
			
		||||
        this.email = email;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ContactDTO contactDTO = (ContactDTO) o;
 | 
			
		||||
        if (contactDTO.getId() == null || getId() == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return Objects.equals(getId(), contactDTO.getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hashCode(getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "ContactDTO{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", firstName='" + getFirstName() + "'" +
 | 
			
		||||
            ", lastName='" + getLastName() + "'" +
 | 
			
		||||
            ", email='" + getEmail() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,108 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.CustomerContactRole;
 | 
			
		||||
import io.github.jhipster.service.filter.BooleanFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.DoubleFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.Filter;
 | 
			
		||||
import io.github.jhipster.service.filter.FloatFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.IntegerFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.LongFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.StringFilter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Criteria class for the CustomerContact entity. This class is used in CustomerContactResource to
 | 
			
		||||
 * receive all the possible filtering options from the Http GET request parameters.
 | 
			
		||||
 * For example the following could be a valid requests:
 | 
			
		||||
 * <code> /customer-contacts?id.greaterThan=5&attr1.contains=something&attr2.specified=false</code>
 | 
			
		||||
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 | 
			
		||||
 * fix type specific filters.
 | 
			
		||||
 */
 | 
			
		||||
public class CustomerContactCriteria implements Serializable {
 | 
			
		||||
    /**
 | 
			
		||||
     * Class for filtering CustomerContactRole
 | 
			
		||||
     */
 | 
			
		||||
    public static class CustomerContactRoleFilter extends Filter<CustomerContactRole> {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private LongFilter id;
 | 
			
		||||
 | 
			
		||||
    private CustomerContactRoleFilter role;
 | 
			
		||||
 | 
			
		||||
    private LongFilter contactId;
 | 
			
		||||
 | 
			
		||||
    private LongFilter customerId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(LongFilter id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public CustomerContactRoleFilter getRole() {
 | 
			
		||||
        return role;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setRole(CustomerContactRoleFilter role) {
 | 
			
		||||
        this.role = role;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getContactId() {
 | 
			
		||||
        return contactId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContactId(LongFilter contactId) {
 | 
			
		||||
        this.contactId = contactId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getCustomerId() {
 | 
			
		||||
        return customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerId(LongFilter customerId) {
 | 
			
		||||
        this.customerId = customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final CustomerContactCriteria that = (CustomerContactCriteria) o;
 | 
			
		||||
        return
 | 
			
		||||
            Objects.equals(id, that.id) &&
 | 
			
		||||
            Objects.equals(role, that.role) &&
 | 
			
		||||
            Objects.equals(contactId, that.contactId) &&
 | 
			
		||||
            Objects.equals(customerId, that.customerId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hash(
 | 
			
		||||
        id,
 | 
			
		||||
        role,
 | 
			
		||||
        contactId,
 | 
			
		||||
        customerId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "CustomerContactCriteria{" +
 | 
			
		||||
                (id != null ? "id=" + id + ", " : "") +
 | 
			
		||||
                (role != null ? "role=" + role + ", " : "") +
 | 
			
		||||
                (contactId != null ? "contactId=" + contactId + ", " : "") +
 | 
			
		||||
                (customerId != null ? "customerId=" + customerId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,106 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.CustomerContactRole;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A DTO for the CustomerContact entity.
 | 
			
		||||
 */
 | 
			
		||||
public class CustomerContactDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private CustomerContactRole role;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    private Long contactId;
 | 
			
		||||
 | 
			
		||||
    private String contactEmail;
 | 
			
		||||
 | 
			
		||||
    private Long customerId;
 | 
			
		||||
 | 
			
		||||
    private String customerPrefix;
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(Long id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public CustomerContactRole getRole() {
 | 
			
		||||
        return role;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setRole(CustomerContactRole role) {
 | 
			
		||||
        this.role = role;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getContactId() {
 | 
			
		||||
        return contactId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContactId(Long contactId) {
 | 
			
		||||
        this.contactId = contactId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getContactEmail() {
 | 
			
		||||
        return contactEmail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContactEmail(String contactEmail) {
 | 
			
		||||
        this.contactEmail = contactEmail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getCustomerId() {
 | 
			
		||||
        return customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerId(Long customerId) {
 | 
			
		||||
        this.customerId = customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getCustomerPrefix() {
 | 
			
		||||
        return customerPrefix;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerPrefix(String customerPrefix) {
 | 
			
		||||
        this.customerPrefix = customerPrefix;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        CustomerContactDTO customerContactDTO = (CustomerContactDTO) o;
 | 
			
		||||
        if (customerContactDTO.getId() == null || getId() == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return Objects.equals(getId(), customerContactDTO.getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hashCode(getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "CustomerContactDTO{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", role='" + getRole() + "'" +
 | 
			
		||||
            ", contact=" + getContactId() +
 | 
			
		||||
            ", contact='" + getContactEmail() + "'" +
 | 
			
		||||
            ", customer=" + getCustomerId() +
 | 
			
		||||
            ", customer='" + getCustomerPrefix() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,13 +1,12 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import io.github.jhipster.service.filter.Filter;
 | 
			
		||||
import io.github.jhipster.service.filter.IntegerFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.LongFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.StringFilter;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Criteria class for the Customer entity. This class is used in CustomerResource to
 | 
			
		||||
 * receive all the possible filtering options from the Http GET request parameters.
 | 
			
		||||
@@ -28,18 +27,18 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private StringFilter name;
 | 
			
		||||
 | 
			
		||||
    private StringFilter contractualAddress;
 | 
			
		||||
 | 
			
		||||
    private StringFilter contractualSalutation;
 | 
			
		||||
 | 
			
		||||
    private StringFilter billingAddress;
 | 
			
		||||
    private StringFilter contractualAddress;
 | 
			
		||||
 | 
			
		||||
    private StringFilter billingSalutation;
 | 
			
		||||
 | 
			
		||||
    private LongFilter roleId;
 | 
			
		||||
    private StringFilter billingAddress;
 | 
			
		||||
 | 
			
		||||
    private LongFilter membershipId;
 | 
			
		||||
 | 
			
		||||
    private LongFilter sepamandateId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
@@ -72,14 +71,6 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
        this.name = name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getContractualAddress() {
 | 
			
		||||
        return contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContractualAddress(StringFilter contractualAddress) {
 | 
			
		||||
        this.contractualAddress = contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getContractualSalutation() {
 | 
			
		||||
        return contractualSalutation;
 | 
			
		||||
    }
 | 
			
		||||
@@ -88,12 +79,12 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
        this.contractualSalutation = contractualSalutation;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getBillingAddress() {
 | 
			
		||||
        return billingAddress;
 | 
			
		||||
    public StringFilter getContractualAddress() {
 | 
			
		||||
        return contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBillingAddress(StringFilter billingAddress) {
 | 
			
		||||
        this.billingAddress = billingAddress;
 | 
			
		||||
    public void setContractualAddress(StringFilter contractualAddress) {
 | 
			
		||||
        this.contractualAddress = contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getBillingSalutation() {
 | 
			
		||||
@@ -104,12 +95,12 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
        this.billingSalutation = billingSalutation;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getRoleId() {
 | 
			
		||||
        return roleId;
 | 
			
		||||
    public StringFilter getBillingAddress() {
 | 
			
		||||
        return billingAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setRoleId(LongFilter roleId) {
 | 
			
		||||
        this.roleId = roleId;
 | 
			
		||||
    public void setBillingAddress(StringFilter billingAddress) {
 | 
			
		||||
        this.billingAddress = billingAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getMembershipId() {
 | 
			
		||||
@@ -120,6 +111,14 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
        this.membershipId = membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getSepamandateId() {
 | 
			
		||||
        return sepamandateId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSepamandateId(LongFilter sepamandateId) {
 | 
			
		||||
        this.sepamandateId = sepamandateId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
@@ -135,12 +134,12 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
            Objects.equals(number, that.number) &&
 | 
			
		||||
            Objects.equals(prefix, that.prefix) &&
 | 
			
		||||
            Objects.equals(name, that.name) &&
 | 
			
		||||
            Objects.equals(contractualAddress, that.contractualAddress) &&
 | 
			
		||||
            Objects.equals(contractualSalutation, that.contractualSalutation) &&
 | 
			
		||||
            Objects.equals(billingAddress, that.billingAddress) &&
 | 
			
		||||
            Objects.equals(contractualAddress, that.contractualAddress) &&
 | 
			
		||||
            Objects.equals(billingSalutation, that.billingSalutation) &&
 | 
			
		||||
                Objects.equals(roleId, that.roleId) &&
 | 
			
		||||
                Objects.equals(membershipId, that.membershipId);
 | 
			
		||||
            Objects.equals(billingAddress, that.billingAddress) &&
 | 
			
		||||
            Objects.equals(membershipId, that.membershipId) &&
 | 
			
		||||
            Objects.equals(sepamandateId, that.sepamandateId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -150,12 +149,12 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
        number,
 | 
			
		||||
        prefix,
 | 
			
		||||
        name,
 | 
			
		||||
        contractualAddress,
 | 
			
		||||
        contractualSalutation,
 | 
			
		||||
        billingAddress,
 | 
			
		||||
        contractualAddress,
 | 
			
		||||
        billingSalutation,
 | 
			
		||||
            roleId,
 | 
			
		||||
            membershipId
 | 
			
		||||
        billingAddress,
 | 
			
		||||
        membershipId,
 | 
			
		||||
        sepamandateId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -166,12 +165,12 @@ public class CustomerCriteria implements Serializable {
 | 
			
		||||
                (number != null ? "number=" + number + ", " : "") +
 | 
			
		||||
                (prefix != null ? "prefix=" + prefix + ", " : "") +
 | 
			
		||||
                (name != null ? "name=" + name + ", " : "") +
 | 
			
		||||
                (contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
 | 
			
		||||
                (contractualSalutation != null ? "contractualSalutation=" + contractualSalutation + ", " : "") +
 | 
			
		||||
                (billingAddress != null ? "billingAddress=" + billingAddress + ", " : "") +
 | 
			
		||||
                (contractualAddress != null ? "contractualAddress=" + contractualAddress + ", " : "") +
 | 
			
		||||
                (billingSalutation != null ? "billingSalutation=" + billingSalutation + ", " : "") +
 | 
			
		||||
                (roleId != null ? "roleId=" + roleId + ", " : "") +
 | 
			
		||||
            (membershipId != null ? "membershipId=" + membershipId + ", " : "") +
 | 
			
		||||
                (billingAddress != null ? "billingAddress=" + billingAddress + ", " : "") +
 | 
			
		||||
                (membershipId != null ? "membershipId=" + membershipId + ", " : "") +
 | 
			
		||||
                (sepamandateId != null ? "sepamandateId=" + sepamandateId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -23,19 +23,19 @@ public class CustomerDTO implements Serializable {
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String name;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String contractualSalutation;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 400)
 | 
			
		||||
    private String contractualAddress;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String contractualSalutation;
 | 
			
		||||
    private String billingSalutation;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 400)
 | 
			
		||||
    private String billingAddress;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 80)
 | 
			
		||||
    private String billingSalutation;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
@@ -69,14 +69,6 @@ public class CustomerDTO implements Serializable {
 | 
			
		||||
        this.name = name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getContractualAddress() {
 | 
			
		||||
        return contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setContractualAddress(String contractualAddress) {
 | 
			
		||||
        this.contractualAddress = contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getContractualSalutation() {
 | 
			
		||||
        return contractualSalutation;
 | 
			
		||||
    }
 | 
			
		||||
@@ -85,12 +77,12 @@ public class CustomerDTO implements Serializable {
 | 
			
		||||
        this.contractualSalutation = contractualSalutation;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBillingAddress() {
 | 
			
		||||
        return billingAddress;
 | 
			
		||||
    public String getContractualAddress() {
 | 
			
		||||
        return contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBillingAddress(String billingAddress) {
 | 
			
		||||
        this.billingAddress = billingAddress;
 | 
			
		||||
    public void setContractualAddress(String contractualAddress) {
 | 
			
		||||
        this.contractualAddress = contractualAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBillingSalutation() {
 | 
			
		||||
@@ -101,6 +93,14 @@ public class CustomerDTO implements Serializable {
 | 
			
		||||
        this.billingSalutation = billingSalutation;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBillingAddress() {
 | 
			
		||||
        return billingAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBillingAddress(String billingAddress) {
 | 
			
		||||
        this.billingAddress = billingAddress;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
@@ -129,10 +129,10 @@ public class CustomerDTO implements Serializable {
 | 
			
		||||
            ", number=" + getNumber() +
 | 
			
		||||
            ", prefix='" + getPrefix() + "'" +
 | 
			
		||||
            ", name='" + getName() + "'" +
 | 
			
		||||
            ", contractualAddress='" + getContractualAddress() + "'" +
 | 
			
		||||
            ", contractualSalutation='" + getContractualSalutation() + "'" +
 | 
			
		||||
            ", billingAddress='" + getBillingAddress() + "'" +
 | 
			
		||||
            ", contractualAddress='" + getContractualAddress() + "'" +
 | 
			
		||||
            ", billingSalutation='" + getBillingSalutation() + "'" +
 | 
			
		||||
            ", billingAddress='" + getBillingAddress() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -25,9 +25,11 @@ public class MembershipCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private LongFilter id;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter sinceDate;
 | 
			
		||||
    private LocalDateFilter from;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter untilDate;
 | 
			
		||||
    private LocalDateFilter to;
 | 
			
		||||
 | 
			
		||||
    private StringFilter comment;
 | 
			
		||||
 | 
			
		||||
    private LongFilter shareId;
 | 
			
		||||
 | 
			
		||||
@@ -43,20 +45,28 @@ public class MembershipCriteria implements Serializable {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getSinceDate() {
 | 
			
		||||
        return sinceDate;
 | 
			
		||||
    public LocalDateFilter getFrom() {
 | 
			
		||||
        return from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSinceDate(LocalDateFilter sinceDate) {
 | 
			
		||||
        this.sinceDate = sinceDate;
 | 
			
		||||
    public void setFrom(LocalDateFilter from) {
 | 
			
		||||
        this.from = from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getUntilDate() {
 | 
			
		||||
        return untilDate;
 | 
			
		||||
    public LocalDateFilter getTo() {
 | 
			
		||||
        return to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setUntilDate(LocalDateFilter untilDate) {
 | 
			
		||||
        this.untilDate = untilDate;
 | 
			
		||||
    public void setTo(LocalDateFilter to) {
 | 
			
		||||
        this.to = to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(StringFilter comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getShareId() {
 | 
			
		||||
@@ -95,8 +105,9 @@ public class MembershipCriteria implements Serializable {
 | 
			
		||||
        final MembershipCriteria that = (MembershipCriteria) o;
 | 
			
		||||
        return
 | 
			
		||||
            Objects.equals(id, that.id) &&
 | 
			
		||||
            Objects.equals(sinceDate, that.sinceDate) &&
 | 
			
		||||
            Objects.equals(untilDate, that.untilDate) &&
 | 
			
		||||
            Objects.equals(from, that.from) &&
 | 
			
		||||
            Objects.equals(to, that.to) &&
 | 
			
		||||
            Objects.equals(comment, that.comment) &&
 | 
			
		||||
            Objects.equals(shareId, that.shareId) &&
 | 
			
		||||
            Objects.equals(assetId, that.assetId) &&
 | 
			
		||||
            Objects.equals(customerId, that.customerId);
 | 
			
		||||
@@ -106,8 +117,9 @@ public class MembershipCriteria implements Serializable {
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hash(
 | 
			
		||||
        id,
 | 
			
		||||
        sinceDate,
 | 
			
		||||
        untilDate,
 | 
			
		||||
        from,
 | 
			
		||||
        to,
 | 
			
		||||
        comment,
 | 
			
		||||
        shareId,
 | 
			
		||||
        assetId,
 | 
			
		||||
        customerId
 | 
			
		||||
@@ -118,8 +130,9 @@ public class MembershipCriteria implements Serializable {
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "MembershipCriteria{" +
 | 
			
		||||
                (id != null ? "id=" + id + ", " : "") +
 | 
			
		||||
                (sinceDate != null ? "sinceDate=" + sinceDate + ", " : "") +
 | 
			
		||||
                (untilDate != null ? "untilDate=" + untilDate + ", " : "") +
 | 
			
		||||
                (from != null ? "from=" + from + ", " : "") +
 | 
			
		||||
                (to != null ? "to=" + to + ", " : "") +
 | 
			
		||||
                (comment != null ? "comment=" + comment + ", " : "") +
 | 
			
		||||
                (shareId != null ? "shareId=" + shareId + ", " : "") +
 | 
			
		||||
                (assetId != null ? "assetId=" + assetId + ", " : "") +
 | 
			
		||||
                (customerId != null ? "customerId=" + customerId + ", " : "") +
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
@@ -14,9 +15,12 @@ public class MembershipDTO implements Serializable {
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private LocalDate sinceDate;
 | 
			
		||||
    private LocalDate from;
 | 
			
		||||
 | 
			
		||||
    private LocalDate untilDate;
 | 
			
		||||
    private LocalDate to;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private Long customerId;
 | 
			
		||||
@@ -37,20 +41,28 @@ public class MembershipDTO implements Serializable {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getSinceDate() {
 | 
			
		||||
        return sinceDate;
 | 
			
		||||
    public LocalDate getFrom() {
 | 
			
		||||
        return from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setSinceDate(LocalDate sinceDate) {
 | 
			
		||||
        this.sinceDate = sinceDate;
 | 
			
		||||
    public void setFrom(LocalDate from) {
 | 
			
		||||
        this.from = from;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getUntilDate() {
 | 
			
		||||
        return untilDate;
 | 
			
		||||
    public LocalDate getTo() {
 | 
			
		||||
        return to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setUntilDate(LocalDate untilDate) {
 | 
			
		||||
        this.untilDate = untilDate;
 | 
			
		||||
    public void setTo(LocalDate to) {
 | 
			
		||||
        this.to = to;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getCustomerId() {
 | 
			
		||||
@@ -94,8 +106,9 @@ public class MembershipDTO implements Serializable {
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "MembershipDTO{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", sinceDate='" + getSinceDate() + "'" +
 | 
			
		||||
            ", untilDate='" + getUntilDate() + "'" +
 | 
			
		||||
            ", from='" + getFrom() + "'" +
 | 
			
		||||
            ", to='" + getTo() + "'" +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            ", customer=" + getCustomerId() +
 | 
			
		||||
            ", customer='" + getCustomerPrefix() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,194 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import io.github.jhipster.service.filter.BooleanFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.DoubleFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.Filter;
 | 
			
		||||
import io.github.jhipster.service.filter.FloatFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.IntegerFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.LongFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.StringFilter;
 | 
			
		||||
import io.github.jhipster.service.filter.LocalDateFilter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Criteria class for the SepaMandate entity. This class is used in SepaMandateResource to
 | 
			
		||||
 * receive all the possible filtering options from the Http GET request parameters.
 | 
			
		||||
 * For example the following could be a valid requests:
 | 
			
		||||
 * <code> /sepa-mandates?id.greaterThan=5&attr1.contains=something&attr2.specified=false</code>
 | 
			
		||||
 * As Spring is unable to properly convert the types, unless specific {@link Filter} class are used, we need to use
 | 
			
		||||
 * fix type specific filters.
 | 
			
		||||
 */
 | 
			
		||||
public class SepaMandateCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    private LongFilter id;
 | 
			
		||||
 | 
			
		||||
    private StringFilter reference;
 | 
			
		||||
 | 
			
		||||
    private StringFilter iban;
 | 
			
		||||
 | 
			
		||||
    private StringFilter bic;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter created;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter validFrom;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter validTo;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter lastUsed;
 | 
			
		||||
 | 
			
		||||
    private LocalDateFilter cancelled;
 | 
			
		||||
 | 
			
		||||
    private StringFilter comment;
 | 
			
		||||
 | 
			
		||||
    private LongFilter customerId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(LongFilter id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getReference() {
 | 
			
		||||
        return reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setReference(StringFilter reference) {
 | 
			
		||||
        this.reference = reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getIban() {
 | 
			
		||||
        return iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setIban(StringFilter iban) {
 | 
			
		||||
        this.iban = iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getBic() {
 | 
			
		||||
        return bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBic(StringFilter bic) {
 | 
			
		||||
        this.bic = bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getCreated() {
 | 
			
		||||
        return created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCreated(LocalDateFilter created) {
 | 
			
		||||
        this.created = created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getValidFrom() {
 | 
			
		||||
        return validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidFrom(LocalDateFilter validFrom) {
 | 
			
		||||
        this.validFrom = validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getValidTo() {
 | 
			
		||||
        return validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidTo(LocalDateFilter validTo) {
 | 
			
		||||
        this.validTo = validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getLastUsed() {
 | 
			
		||||
        return lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setLastUsed(LocalDateFilter lastUsed) {
 | 
			
		||||
        this.lastUsed = lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDateFilter getCancelled() {
 | 
			
		||||
        return cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCancelled(LocalDateFilter cancelled) {
 | 
			
		||||
        this.cancelled = cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public StringFilter getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(StringFilter comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getCustomerId() {
 | 
			
		||||
        return customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerId(LongFilter customerId) {
 | 
			
		||||
        this.customerId = customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        final SepaMandateCriteria that = (SepaMandateCriteria) o;
 | 
			
		||||
        return
 | 
			
		||||
            Objects.equals(id, that.id) &&
 | 
			
		||||
            Objects.equals(reference, that.reference) &&
 | 
			
		||||
            Objects.equals(iban, that.iban) &&
 | 
			
		||||
            Objects.equals(bic, that.bic) &&
 | 
			
		||||
            Objects.equals(created, that.created) &&
 | 
			
		||||
            Objects.equals(validFrom, that.validFrom) &&
 | 
			
		||||
            Objects.equals(validTo, that.validTo) &&
 | 
			
		||||
            Objects.equals(lastUsed, that.lastUsed) &&
 | 
			
		||||
            Objects.equals(cancelled, that.cancelled) &&
 | 
			
		||||
            Objects.equals(comment, that.comment) &&
 | 
			
		||||
            Objects.equals(customerId, that.customerId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hash(
 | 
			
		||||
        id,
 | 
			
		||||
        reference,
 | 
			
		||||
        iban,
 | 
			
		||||
        bic,
 | 
			
		||||
        created,
 | 
			
		||||
        validFrom,
 | 
			
		||||
        validTo,
 | 
			
		||||
        lastUsed,
 | 
			
		||||
        cancelled,
 | 
			
		||||
        comment,
 | 
			
		||||
        customerId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "SepaMandateCriteria{" +
 | 
			
		||||
                (id != null ? "id=" + id + ", " : "") +
 | 
			
		||||
                (reference != null ? "reference=" + reference + ", " : "") +
 | 
			
		||||
                (iban != null ? "iban=" + iban + ", " : "") +
 | 
			
		||||
                (bic != null ? "bic=" + bic + ", " : "") +
 | 
			
		||||
                (created != null ? "created=" + created + ", " : "") +
 | 
			
		||||
                (validFrom != null ? "validFrom=" + validFrom + ", " : "") +
 | 
			
		||||
                (validTo != null ? "validTo=" + validTo + ", " : "") +
 | 
			
		||||
                (lastUsed != null ? "lastUsed=" + lastUsed + ", " : "") +
 | 
			
		||||
                (cancelled != null ? "cancelled=" + cancelled + ", " : "") +
 | 
			
		||||
                (comment != null ? "comment=" + comment + ", " : "") +
 | 
			
		||||
                (customerId != null ? "customerId=" + customerId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,178 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A DTO for the SepaMandate entity.
 | 
			
		||||
 */
 | 
			
		||||
public class SepaMandateDTO implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private Long id;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Size(max = 40)
 | 
			
		||||
    private String reference;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 34)
 | 
			
		||||
    private String iban;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 11)
 | 
			
		||||
    private String bic;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private LocalDate created;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private LocalDate validFrom;
 | 
			
		||||
 | 
			
		||||
    private LocalDate validTo;
 | 
			
		||||
 | 
			
		||||
    private LocalDate lastUsed;
 | 
			
		||||
 | 
			
		||||
    private LocalDate cancelled;
 | 
			
		||||
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    private Long customerId;
 | 
			
		||||
 | 
			
		||||
    private String customerPrefix;
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setId(Long id) {
 | 
			
		||||
        this.id = id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getReference() {
 | 
			
		||||
        return reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setReference(String reference) {
 | 
			
		||||
        this.reference = reference;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getIban() {
 | 
			
		||||
        return iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setIban(String iban) {
 | 
			
		||||
        this.iban = iban;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getBic() {
 | 
			
		||||
        return bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setBic(String bic) {
 | 
			
		||||
        this.bic = bic;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getCreated() {
 | 
			
		||||
        return created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCreated(LocalDate created) {
 | 
			
		||||
        this.created = created;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getValidFrom() {
 | 
			
		||||
        return validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidFrom(LocalDate validFrom) {
 | 
			
		||||
        this.validFrom = validFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getValidTo() {
 | 
			
		||||
        return validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setValidTo(LocalDate validTo) {
 | 
			
		||||
        this.validTo = validTo;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getLastUsed() {
 | 
			
		||||
        return lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setLastUsed(LocalDate lastUsed) {
 | 
			
		||||
        this.lastUsed = lastUsed;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LocalDate getCancelled() {
 | 
			
		||||
        return cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCancelled(LocalDate cancelled) {
 | 
			
		||||
        this.cancelled = cancelled;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getComment() {
 | 
			
		||||
        return comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setComment(String comment) {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getCustomerId() {
 | 
			
		||||
        return customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerId(Long customerId) {
 | 
			
		||||
        this.customerId = customerId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getCustomerPrefix() {
 | 
			
		||||
        return customerPrefix;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setCustomerPrefix(String customerPrefix) {
 | 
			
		||||
        this.customerPrefix = customerPrefix;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public boolean equals(Object o) {
 | 
			
		||||
        if (this == o) {
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
        if (o == null || getClass() != o.getClass()) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        SepaMandateDTO sepaMandateDTO = (SepaMandateDTO) o;
 | 
			
		||||
        if (sepaMandateDTO.getId() == null || getId() == null) {
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
        return Objects.equals(getId(), sepaMandateDTO.getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public int hashCode() {
 | 
			
		||||
        return Objects.hashCode(getId());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String toString() {
 | 
			
		||||
        return "SepaMandateDTO{" +
 | 
			
		||||
            "id=" + getId() +
 | 
			
		||||
            ", reference='" + getReference() + "'" +
 | 
			
		||||
            ", iban='" + getIban() + "'" +
 | 
			
		||||
            ", bic='" + getBic() + "'" +
 | 
			
		||||
            ", created='" + getCreated() + "'" +
 | 
			
		||||
            ", validFrom='" + getValidFrom() + "'" +
 | 
			
		||||
            ", validTo='" + getValidTo() + "'" +
 | 
			
		||||
            ", lastUsed='" + getLastUsed() + "'" +
 | 
			
		||||
            ", cancelled='" + getCancelled() + "'" +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            ", customer=" + getCustomerId() +
 | 
			
		||||
            ", customer='" + getCustomerPrefix() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -39,7 +39,7 @@ public class ShareCriteria implements Serializable {
 | 
			
		||||
 | 
			
		||||
    private StringFilter comment;
 | 
			
		||||
 | 
			
		||||
    private LongFilter memberId;
 | 
			
		||||
    private LongFilter membershipId;
 | 
			
		||||
 | 
			
		||||
    public LongFilter getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
@@ -81,12 +81,12 @@ public class ShareCriteria implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LongFilter getMemberId() {
 | 
			
		||||
        return memberId;
 | 
			
		||||
    public LongFilter getMembershipId() {
 | 
			
		||||
        return membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMemberId(LongFilter memberId) {
 | 
			
		||||
        this.memberId = memberId;
 | 
			
		||||
    public void setMembershipId(LongFilter membershipId) {
 | 
			
		||||
        this.membershipId = membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -105,7 +105,7 @@ public class ShareCriteria implements Serializable {
 | 
			
		||||
            Objects.equals(action, that.action) &&
 | 
			
		||||
            Objects.equals(quantity, that.quantity) &&
 | 
			
		||||
            Objects.equals(comment, that.comment) &&
 | 
			
		||||
            Objects.equals(memberId, that.memberId);
 | 
			
		||||
            Objects.equals(membershipId, that.membershipId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -116,7 +116,7 @@ public class ShareCriteria implements Serializable {
 | 
			
		||||
        action,
 | 
			
		||||
        quantity,
 | 
			
		||||
        comment,
 | 
			
		||||
        memberId
 | 
			
		||||
        membershipId
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -128,7 +128,7 @@ public class ShareCriteria implements Serializable {
 | 
			
		||||
                (action != null ? "action=" + action + ", " : "") +
 | 
			
		||||
                (quantity != null ? "quantity=" + quantity + ", " : "") +
 | 
			
		||||
                (comment != null ? "comment=" + comment + ", " : "") +
 | 
			
		||||
                (memberId != null ? "memberId=" + memberId + ", " : "") +
 | 
			
		||||
                (membershipId != null ? "membershipId=" + membershipId + ", " : "") +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,9 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.dto;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
 | 
			
		||||
 | 
			
		||||
import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.time.LocalDate;
 | 
			
		||||
import javax.validation.constraints.*;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Objects;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * A DTO for the Share entity.
 | 
			
		||||
@@ -27,8 +24,10 @@ public class ShareDTO implements Serializable {
 | 
			
		||||
    @Size(max = 160)
 | 
			
		||||
    private String comment;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    private Long memberId;
 | 
			
		||||
 | 
			
		||||
    private Long membershipId;
 | 
			
		||||
 | 
			
		||||
    private String membershipFrom;
 | 
			
		||||
 | 
			
		||||
    public Long getId() {
 | 
			
		||||
        return id;
 | 
			
		||||
@@ -70,12 +69,20 @@ public class ShareDTO implements Serializable {
 | 
			
		||||
        this.comment = comment;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public Long getMemberId() {
 | 
			
		||||
        return memberId;
 | 
			
		||||
    public Long getMembershipId() {
 | 
			
		||||
        return membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMemberId(Long membershipId) {
 | 
			
		||||
        this.memberId = membershipId;
 | 
			
		||||
    public void setMembershipId(Long membershipId) {
 | 
			
		||||
        this.membershipId = membershipId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public String getMembershipFrom() {
 | 
			
		||||
        return membershipFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setMembershipFrom(String membershipFrom) {
 | 
			
		||||
        this.membershipFrom = membershipFrom;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
@@ -107,7 +114,8 @@ public class ShareDTO implements Serializable {
 | 
			
		||||
            ", action='" + getAction() + "'" +
 | 
			
		||||
            ", quantity=" + getQuantity() +
 | 
			
		||||
            ", comment='" + getComment() + "'" +
 | 
			
		||||
            ", member=" + getMemberId() +
 | 
			
		||||
            ", membership=" + getMembershipId() +
 | 
			
		||||
            ", membership='" + getMembershipFrom() + "'" +
 | 
			
		||||
            "}";
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,11 @@ import org.mapstruct.*;
 | 
			
		||||
@Mapper(componentModel = "spring", uses = {MembershipMapper.class})
 | 
			
		||||
public interface AssetMapper extends EntityMapper<AssetDTO, Asset> {
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "member.id", target = "memberId")
 | 
			
		||||
    @Mapping(source = "membership.id", target = "membershipId")
 | 
			
		||||
    @Mapping(source = "membership.from", target = "membershipFrom")
 | 
			
		||||
    AssetDTO toDto(Asset asset);
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "memberId", target = "member")
 | 
			
		||||
    @Mapping(source = "membershipId", target = "membership")
 | 
			
		||||
    Asset toEntity(AssetDTO assetDTO);
 | 
			
		||||
 | 
			
		||||
    default Asset fromId(Long id) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.mapper;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactDTO;
 | 
			
		||||
 | 
			
		||||
import org.mapstruct.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Mapper for the entity Contact and its DTO ContactDTO.
 | 
			
		||||
 */
 | 
			
		||||
@Mapper(componentModel = "spring", uses = {})
 | 
			
		||||
public interface ContactMapper extends EntityMapper<ContactDTO, Contact> {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Mapping(target = "roles", ignore = true)
 | 
			
		||||
    Contact toEntity(ContactDTO contactDTO);
 | 
			
		||||
 | 
			
		||||
    default Contact fromId(Long id) {
 | 
			
		||||
        if (id == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        Contact contact = new Contact();
 | 
			
		||||
        contact.setId(id);
 | 
			
		||||
        return contact;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.mapper;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactDTO;
 | 
			
		||||
 | 
			
		||||
import org.mapstruct.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Mapper for the entity CustomerContact and its DTO CustomerContactDTO.
 | 
			
		||||
 */
 | 
			
		||||
@Mapper(componentModel = "spring", uses = {ContactMapper.class, CustomerMapper.class})
 | 
			
		||||
public interface CustomerContactMapper extends EntityMapper<CustomerContactDTO, CustomerContact> {
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "contact.id", target = "contactId")
 | 
			
		||||
    @Mapping(source = "contact.email", target = "contactEmail")
 | 
			
		||||
    @Mapping(source = "customer.id", target = "customerId")
 | 
			
		||||
    @Mapping(source = "customer.prefix", target = "customerPrefix")
 | 
			
		||||
    CustomerContactDTO toDto(CustomerContact customerContact);
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "contactId", target = "contact")
 | 
			
		||||
    @Mapping(source = "customerId", target = "customer")
 | 
			
		||||
    CustomerContact toEntity(CustomerContactDTO customerContactDTO);
 | 
			
		||||
 | 
			
		||||
    default CustomerContact fromId(Long id) {
 | 
			
		||||
        if (id == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        CustomerContact customerContact = new CustomerContact();
 | 
			
		||||
        customerContact.setId(id);
 | 
			
		||||
        return customerContact;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.mapper;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.Customer;
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerDTO;
 | 
			
		||||
import org.mapstruct.Mapper;
 | 
			
		||||
import org.mapstruct.Mapping;
 | 
			
		||||
 | 
			
		||||
import org.mapstruct.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Mapper for the entity Customer and its DTO CustomerDTO.
 | 
			
		||||
@@ -12,8 +12,8 @@ import org.mapstruct.Mapping;
 | 
			
		||||
public interface CustomerMapper extends EntityMapper<CustomerDTO, Customer> {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Mapping(target = "roles", ignore = true)
 | 
			
		||||
    @Mapping(target = "memberships", ignore = true)
 | 
			
		||||
    @Mapping(target = "sepamandates", ignore = true)
 | 
			
		||||
    Customer toEntity(CustomerDTO customerDTO);
 | 
			
		||||
 | 
			
		||||
    default Customer fromId(Long id) {
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,29 @@
 | 
			
		||||
package org.hostsharing.hsadminng.service.mapper;
 | 
			
		||||
 | 
			
		||||
import org.hostsharing.hsadminng.domain.*;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateDTO;
 | 
			
		||||
 | 
			
		||||
import org.mapstruct.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Mapper for the entity SepaMandate and its DTO SepaMandateDTO.
 | 
			
		||||
 */
 | 
			
		||||
@Mapper(componentModel = "spring", uses = {CustomerMapper.class})
 | 
			
		||||
public interface SepaMandateMapper extends EntityMapper<SepaMandateDTO, SepaMandate> {
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "customer.id", target = "customerId")
 | 
			
		||||
    @Mapping(source = "customer.prefix", target = "customerPrefix")
 | 
			
		||||
    SepaMandateDTO toDto(SepaMandate sepaMandate);
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "customerId", target = "customer")
 | 
			
		||||
    SepaMandate toEntity(SepaMandateDTO sepaMandateDTO);
 | 
			
		||||
 | 
			
		||||
    default SepaMandate fromId(Long id) {
 | 
			
		||||
        if (id == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        SepaMandate sepaMandate = new SepaMandate();
 | 
			
		||||
        sepaMandate.setId(id);
 | 
			
		||||
        return sepaMandate;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -11,10 +11,11 @@ import org.mapstruct.*;
 | 
			
		||||
@Mapper(componentModel = "spring", uses = {MembershipMapper.class})
 | 
			
		||||
public interface ShareMapper extends EntityMapper<ShareDTO, Share> {
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "member.id", target = "memberId")
 | 
			
		||||
    @Mapping(source = "membership.id", target = "membershipId")
 | 
			
		||||
    @Mapping(source = "membership.from", target = "membershipFrom")
 | 
			
		||||
    ShareDTO toDto(Share share);
 | 
			
		||||
 | 
			
		||||
    @Mapping(source = "memberId", target = "member")
 | 
			
		||||
    @Mapping(source = "membershipId", target = "membership")
 | 
			
		||||
    Share toEntity(ShareDTO shareDTO);
 | 
			
		||||
 | 
			
		||||
    default Share fromId(Long id) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,138 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.web.rest;
 | 
			
		||||
import org.hostsharing.hsadminng.service.ContactService;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.HeaderUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.PaginationUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.ContactCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.ContactQueryService;
 | 
			
		||||
import io.github.jhipster.web.util.ResponseUtil;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.http.HttpHeaders;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import javax.validation.Valid;
 | 
			
		||||
import java.net.URI;
 | 
			
		||||
import java.net.URISyntaxException;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * REST controller for managing Contact.
 | 
			
		||||
 */
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/api")
 | 
			
		||||
public class ContactResource {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(ContactResource.class);
 | 
			
		||||
 | 
			
		||||
    private static final String ENTITY_NAME = "contact";
 | 
			
		||||
 | 
			
		||||
    private final ContactService contactService;
 | 
			
		||||
 | 
			
		||||
    private final ContactQueryService contactQueryService;
 | 
			
		||||
 | 
			
		||||
    public ContactResource(ContactService contactService, ContactQueryService contactQueryService) {
 | 
			
		||||
        this.contactService = contactService;
 | 
			
		||||
        this.contactQueryService = contactQueryService;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * POST  /contacts : Create a new contact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param contactDTO the contactDTO to create
 | 
			
		||||
     * @return the ResponseEntity with status 201 (Created) and with body the new contactDTO, or with status 400 (Bad Request) if the contact has already an ID
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/contacts")
 | 
			
		||||
    public ResponseEntity<ContactDTO> createContact(@Valid @RequestBody ContactDTO contactDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to save Contact : {}", contactDTO);
 | 
			
		||||
        if (contactDTO.getId() != null) {
 | 
			
		||||
            throw new BadRequestAlertException("A new contact cannot already have an ID", ENTITY_NAME, "idexists");
 | 
			
		||||
        }
 | 
			
		||||
        ContactDTO result = contactService.save(contactDTO);
 | 
			
		||||
        return ResponseEntity.created(new URI("/api/contacts/" + result.getId()))
 | 
			
		||||
            .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * PUT  /contacts : Updates an existing contact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param contactDTO the contactDTO to update
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the updated contactDTO,
 | 
			
		||||
     * or with status 400 (Bad Request) if the contactDTO is not valid,
 | 
			
		||||
     * or with status 500 (Internal Server Error) if the contactDTO couldn't be updated
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PutMapping("/contacts")
 | 
			
		||||
    public ResponseEntity<ContactDTO> updateContact(@Valid @RequestBody ContactDTO contactDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to update Contact : {}", contactDTO);
 | 
			
		||||
        if (contactDTO.getId() == null) {
 | 
			
		||||
            throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
 | 
			
		||||
        }
 | 
			
		||||
        ContactDTO result = contactService.save(contactDTO);
 | 
			
		||||
        return ResponseEntity.ok()
 | 
			
		||||
            .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, contactDTO.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /contacts : get all the contacts.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @param criteria the criterias which the requested entities should match
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and the list of contacts in body
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/contacts")
 | 
			
		||||
    public ResponseEntity<List<ContactDTO>> getAllContacts(ContactCriteria criteria, Pageable pageable) {
 | 
			
		||||
        log.debug("REST request to get Contacts by criteria: {}", criteria);
 | 
			
		||||
        Page<ContactDTO> page = contactQueryService.findByCriteria(criteria, pageable);
 | 
			
		||||
        HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/contacts");
 | 
			
		||||
        return ResponseEntity.ok().headers(headers).body(page.getContent());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
    * GET  /contacts/count : count all the contacts.
 | 
			
		||||
    *
 | 
			
		||||
    * @param criteria the criterias which the requested entities should match
 | 
			
		||||
    * @return the ResponseEntity with status 200 (OK) and the count in body
 | 
			
		||||
    */
 | 
			
		||||
    @GetMapping("/contacts/count")
 | 
			
		||||
    public ResponseEntity<Long> countContacts(ContactCriteria criteria) {
 | 
			
		||||
        log.debug("REST request to count Contacts by criteria: {}", criteria);
 | 
			
		||||
        return ResponseEntity.ok().body(contactQueryService.countByCriteria(criteria));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /contacts/:id : get the "id" contact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the contactDTO to retrieve
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the contactDTO, or with status 404 (Not Found)
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/contacts/{id}")
 | 
			
		||||
    public ResponseEntity<ContactDTO> getContact(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to get Contact : {}", id);
 | 
			
		||||
        Optional<ContactDTO> contactDTO = contactService.findOne(id);
 | 
			
		||||
        return ResponseUtil.wrapOrNotFound(contactDTO);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * DELETE  /contacts/:id : delete the "id" contact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the contactDTO to delete
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK)
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("/contacts/{id}")
 | 
			
		||||
    public ResponseEntity<Void> deleteContact(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to delete Contact : {}", id);
 | 
			
		||||
        contactService.delete(id);
 | 
			
		||||
        return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,138 +0,0 @@
 | 
			
		||||
package org.hostsharing.hsadminng.web.rest;
 | 
			
		||||
import org.hostsharing.hsadminng.service.CustomerContactService;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.HeaderUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.PaginationUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.CustomerContactCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.CustomerContactQueryService;
 | 
			
		||||
import io.github.jhipster.web.util.ResponseUtil;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.http.HttpHeaders;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import javax.validation.Valid;
 | 
			
		||||
import java.net.URI;
 | 
			
		||||
import java.net.URISyntaxException;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * REST controller for managing CustomerContact.
 | 
			
		||||
 */
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/api")
 | 
			
		||||
public class CustomerContactResource {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(CustomerContactResource.class);
 | 
			
		||||
 | 
			
		||||
    private static final String ENTITY_NAME = "customerContact";
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactService customerContactService;
 | 
			
		||||
 | 
			
		||||
    private final CustomerContactQueryService customerContactQueryService;
 | 
			
		||||
 | 
			
		||||
    public CustomerContactResource(CustomerContactService customerContactService, CustomerContactQueryService customerContactQueryService) {
 | 
			
		||||
        this.customerContactService = customerContactService;
 | 
			
		||||
        this.customerContactQueryService = customerContactQueryService;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * POST  /customer-contacts : Create a new customerContact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param customerContactDTO the customerContactDTO to create
 | 
			
		||||
     * @return the ResponseEntity with status 201 (Created) and with body the new customerContactDTO, or with status 400 (Bad Request) if the customerContact has already an ID
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/customer-contacts")
 | 
			
		||||
    public ResponseEntity<CustomerContactDTO> createCustomerContact(@Valid @RequestBody CustomerContactDTO customerContactDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to save CustomerContact : {}", customerContactDTO);
 | 
			
		||||
        if (customerContactDTO.getId() != null) {
 | 
			
		||||
            throw new BadRequestAlertException("A new customerContact cannot already have an ID", ENTITY_NAME, "idexists");
 | 
			
		||||
        }
 | 
			
		||||
        CustomerContactDTO result = customerContactService.save(customerContactDTO);
 | 
			
		||||
        return ResponseEntity.created(new URI("/api/customer-contacts/" + result.getId()))
 | 
			
		||||
            .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * PUT  /customer-contacts : Updates an existing customerContact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param customerContactDTO the customerContactDTO to update
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the updated customerContactDTO,
 | 
			
		||||
     * or with status 400 (Bad Request) if the customerContactDTO is not valid,
 | 
			
		||||
     * or with status 500 (Internal Server Error) if the customerContactDTO couldn't be updated
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PutMapping("/customer-contacts")
 | 
			
		||||
    public ResponseEntity<CustomerContactDTO> updateCustomerContact(@Valid @RequestBody CustomerContactDTO customerContactDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to update CustomerContact : {}", customerContactDTO);
 | 
			
		||||
        if (customerContactDTO.getId() == null) {
 | 
			
		||||
            throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
 | 
			
		||||
        }
 | 
			
		||||
        CustomerContactDTO result = customerContactService.save(customerContactDTO);
 | 
			
		||||
        return ResponseEntity.ok()
 | 
			
		||||
            .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, customerContactDTO.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /customer-contacts : get all the customerContacts.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @param criteria the criterias which the requested entities should match
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and the list of customerContacts in body
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/customer-contacts")
 | 
			
		||||
    public ResponseEntity<List<CustomerContactDTO>> getAllCustomerContacts(CustomerContactCriteria criteria, Pageable pageable) {
 | 
			
		||||
        log.debug("REST request to get CustomerContacts by criteria: {}", criteria);
 | 
			
		||||
        Page<CustomerContactDTO> page = customerContactQueryService.findByCriteria(criteria, pageable);
 | 
			
		||||
        HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/customer-contacts");
 | 
			
		||||
        return ResponseEntity.ok().headers(headers).body(page.getContent());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
    * GET  /customer-contacts/count : count all the customerContacts.
 | 
			
		||||
    *
 | 
			
		||||
    * @param criteria the criterias which the requested entities should match
 | 
			
		||||
    * @return the ResponseEntity with status 200 (OK) and the count in body
 | 
			
		||||
    */
 | 
			
		||||
    @GetMapping("/customer-contacts/count")
 | 
			
		||||
    public ResponseEntity<Long> countCustomerContacts(CustomerContactCriteria criteria) {
 | 
			
		||||
        log.debug("REST request to count CustomerContacts by criteria: {}", criteria);
 | 
			
		||||
        return ResponseEntity.ok().body(customerContactQueryService.countByCriteria(criteria));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /customer-contacts/:id : get the "id" customerContact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the customerContactDTO to retrieve
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the customerContactDTO, or with status 404 (Not Found)
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/customer-contacts/{id}")
 | 
			
		||||
    public ResponseEntity<CustomerContactDTO> getCustomerContact(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to get CustomerContact : {}", id);
 | 
			
		||||
        Optional<CustomerContactDTO> customerContactDTO = customerContactService.findOne(id);
 | 
			
		||||
        return ResponseUtil.wrapOrNotFound(customerContactDTO);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * DELETE  /customer-contacts/:id : delete the "id" customerContact.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the customerContactDTO to delete
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK)
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("/customer-contacts/{id}")
 | 
			
		||||
    public ResponseEntity<Void> deleteCustomerContact(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to delete CustomerContact : {}", id);
 | 
			
		||||
        customerContactService.delete(id);
 | 
			
		||||
        return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,138 @@
 | 
			
		||||
package org.hostsharing.hsadminng.web.rest;
 | 
			
		||||
import org.hostsharing.hsadminng.service.SepaMandateService;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.errors.BadRequestAlertException;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.HeaderUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.web.rest.util.PaginationUtil;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateDTO;
 | 
			
		||||
import org.hostsharing.hsadminng.service.dto.SepaMandateCriteria;
 | 
			
		||||
import org.hostsharing.hsadminng.service.SepaMandateQueryService;
 | 
			
		||||
import io.github.jhipster.web.util.ResponseUtil;
 | 
			
		||||
import org.slf4j.Logger;
 | 
			
		||||
import org.slf4j.LoggerFactory;
 | 
			
		||||
import org.springframework.data.domain.Page;
 | 
			
		||||
import org.springframework.data.domain.Pageable;
 | 
			
		||||
import org.springframework.http.HttpHeaders;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
import javax.validation.Valid;
 | 
			
		||||
import java.net.URI;
 | 
			
		||||
import java.net.URISyntaxException;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Optional;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * REST controller for managing SepaMandate.
 | 
			
		||||
 */
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/api")
 | 
			
		||||
public class SepaMandateResource {
 | 
			
		||||
 | 
			
		||||
    private final Logger log = LoggerFactory.getLogger(SepaMandateResource.class);
 | 
			
		||||
 | 
			
		||||
    private static final String ENTITY_NAME = "sepaMandate";
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateService sepaMandateService;
 | 
			
		||||
 | 
			
		||||
    private final SepaMandateQueryService sepaMandateQueryService;
 | 
			
		||||
 | 
			
		||||
    public SepaMandateResource(SepaMandateService sepaMandateService, SepaMandateQueryService sepaMandateQueryService) {
 | 
			
		||||
        this.sepaMandateService = sepaMandateService;
 | 
			
		||||
        this.sepaMandateQueryService = sepaMandateQueryService;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * POST  /sepa-mandates : Create a new sepaMandate.
 | 
			
		||||
     *
 | 
			
		||||
     * @param sepaMandateDTO the sepaMandateDTO to create
 | 
			
		||||
     * @return the ResponseEntity with status 201 (Created) and with body the new sepaMandateDTO, or with status 400 (Bad Request) if the sepaMandate has already an ID
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/sepa-mandates")
 | 
			
		||||
    public ResponseEntity<SepaMandateDTO> createSepaMandate(@Valid @RequestBody SepaMandateDTO sepaMandateDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to save SepaMandate : {}", sepaMandateDTO);
 | 
			
		||||
        if (sepaMandateDTO.getId() != null) {
 | 
			
		||||
            throw new BadRequestAlertException("A new sepaMandate cannot already have an ID", ENTITY_NAME, "idexists");
 | 
			
		||||
        }
 | 
			
		||||
        SepaMandateDTO result = sepaMandateService.save(sepaMandateDTO);
 | 
			
		||||
        return ResponseEntity.created(new URI("/api/sepa-mandates/" + result.getId()))
 | 
			
		||||
            .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * PUT  /sepa-mandates : Updates an existing sepaMandate.
 | 
			
		||||
     *
 | 
			
		||||
     * @param sepaMandateDTO the sepaMandateDTO to update
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the updated sepaMandateDTO,
 | 
			
		||||
     * or with status 400 (Bad Request) if the sepaMandateDTO is not valid,
 | 
			
		||||
     * or with status 500 (Internal Server Error) if the sepaMandateDTO couldn't be updated
 | 
			
		||||
     * @throws URISyntaxException if the Location URI syntax is incorrect
 | 
			
		||||
     */
 | 
			
		||||
    @PutMapping("/sepa-mandates")
 | 
			
		||||
    public ResponseEntity<SepaMandateDTO> updateSepaMandate(@Valid @RequestBody SepaMandateDTO sepaMandateDTO) throws URISyntaxException {
 | 
			
		||||
        log.debug("REST request to update SepaMandate : {}", sepaMandateDTO);
 | 
			
		||||
        if (sepaMandateDTO.getId() == null) {
 | 
			
		||||
            throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
 | 
			
		||||
        }
 | 
			
		||||
        SepaMandateDTO result = sepaMandateService.save(sepaMandateDTO);
 | 
			
		||||
        return ResponseEntity.ok()
 | 
			
		||||
            .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, sepaMandateDTO.getId().toString()))
 | 
			
		||||
            .body(result);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /sepa-mandates : get all the sepaMandates.
 | 
			
		||||
     *
 | 
			
		||||
     * @param pageable the pagination information
 | 
			
		||||
     * @param criteria the criterias which the requested entities should match
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and the list of sepaMandates in body
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/sepa-mandates")
 | 
			
		||||
    public ResponseEntity<List<SepaMandateDTO>> getAllSepaMandates(SepaMandateCriteria criteria, Pageable pageable) {
 | 
			
		||||
        log.debug("REST request to get SepaMandates by criteria: {}", criteria);
 | 
			
		||||
        Page<SepaMandateDTO> page = sepaMandateQueryService.findByCriteria(criteria, pageable);
 | 
			
		||||
        HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/sepa-mandates");
 | 
			
		||||
        return ResponseEntity.ok().headers(headers).body(page.getContent());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
    * GET  /sepa-mandates/count : count all the sepaMandates.
 | 
			
		||||
    *
 | 
			
		||||
    * @param criteria the criterias which the requested entities should match
 | 
			
		||||
    * @return the ResponseEntity with status 200 (OK) and the count in body
 | 
			
		||||
    */
 | 
			
		||||
    @GetMapping("/sepa-mandates/count")
 | 
			
		||||
    public ResponseEntity<Long> countSepaMandates(SepaMandateCriteria criteria) {
 | 
			
		||||
        log.debug("REST request to count SepaMandates by criteria: {}", criteria);
 | 
			
		||||
        return ResponseEntity.ok().body(sepaMandateQueryService.countByCriteria(criteria));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * GET  /sepa-mandates/:id : get the "id" sepaMandate.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the sepaMandateDTO to retrieve
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK) and with body the sepaMandateDTO, or with status 404 (Not Found)
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/sepa-mandates/{id}")
 | 
			
		||||
    public ResponseEntity<SepaMandateDTO> getSepaMandate(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to get SepaMandate : {}", id);
 | 
			
		||||
        Optional<SepaMandateDTO> sepaMandateDTO = sepaMandateService.findOne(id);
 | 
			
		||||
        return ResponseUtil.wrapOrNotFound(sepaMandateDTO);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * DELETE  /sepa-mandates/:id : delete the "id" sepaMandate.
 | 
			
		||||
     *
 | 
			
		||||
     * @param id the id of the sepaMandateDTO to delete
 | 
			
		||||
     * @return the ResponseEntity with status 200 (OK)
 | 
			
		||||
     */
 | 
			
		||||
    @DeleteMapping("/sepa-mandates/{id}")
 | 
			
		||||
    public ResponseEntity<Void> deleteSepaMandate(@PathVariable Long id) {
 | 
			
		||||
        log.debug("REST request to delete SepaMandate : {}", id);
 | 
			
		||||
        sepaMandateService.delete(id);
 | 
			
		||||
        return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,37 +1,22 @@
 | 
			
		||||
filter all
 | 
			
		||||
dto all with mapstruct
 | 
			
		||||
service all with serviceClass
 | 
			
		||||
paginate all with  infinite-scroll
 | 
			
		||||
paginate all with infinite-scroll
 | 
			
		||||
 | 
			
		||||
entity Customer {
 | 
			
		||||
    number Integer required unique min(10000) max(99999),
 | 
			
		||||
    prefix String required unique pattern(/[a-z][a-z0-9]+/),
 | 
			
		||||
    name String required maxlength(80),
 | 
			
		||||
    contractualAddress String required maxlength(400),
 | 
			
		||||
    contractualSalutation String maxlength(80),
 | 
			
		||||
    billingAddress String maxlength(400),
 | 
			
		||||
    billingSalutation String maxlength(80)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
entity Contact {
 | 
			
		||||
    firstName String required maxlength(80),
 | 
			
		||||
    lastName String required maxlength(80),
 | 
			
		||||
    email String required maxlength(80)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
enum CustomerContactRole {
 | 
			
		||||
    CONTRACTUAL,
 | 
			
		||||
    TECHNICAL,
 | 
			
		||||
    FINANCIAL
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
entity CustomerContact {
 | 
			
		||||
    role CustomerContactRole required
 | 
			
		||||
    contractualAddress String required maxlength(400),
 | 
			
		||||
    billingSalutation String maxlength(80),
 | 
			
		||||
    billingAddress String maxlength(400)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
entity Membership {
 | 
			
		||||
    sinceDate LocalDate required,
 | 
			
		||||
    untilDate LocalDate
 | 
			
		||||
    from LocalDate required,
 | 
			
		||||
    to LocalDate,
 | 
			
		||||
    comment String maxlength(160)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
enum ShareAction {
 | 
			
		||||
@@ -62,11 +47,21 @@ entity Asset {
 | 
			
		||||
    comment String maxlength(160)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
relationship OneToMany {
 | 
			
		||||
  Contact{role} to CustomerContact{contact(email) required},
 | 
			
		||||
  Customer{role} to CustomerContact{customer(prefix) required},
 | 
			
		||||
  Customer to Membership{customer(prefix) required},
 | 
			
		||||
  Membership to Share{member required},
 | 
			
		||||
  Membership to Asset{member required}
 | 
			
		||||
entity SepaMandate {
 | 
			
		||||
    reference String maxlength(40) unique required,
 | 
			
		||||
    iban String maxlength(34),
 | 
			
		||||
    bic String maxlength(11),
 | 
			
		||||
    created LocalDate required,
 | 
			
		||||
    validFrom LocalDate required,
 | 
			
		||||
    validTo LocalDate,
 | 
			
		||||
    lastUsed LocalDate,
 | 
			
		||||
    cancelled LocalDate,
 | 
			
		||||
    comment String maxlength(160)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
relationship OneToMany {
 | 
			
		||||
    Customer{membership} to Membership{customer(prefix) required},
 | 
			
		||||
    Customer{sepamandate} to SepaMandate{customer(prefix) required},
 | 
			
		||||
    Membership{share} to Share{membership(from) required},
 | 
			
		||||
    Membership{asset} to Asset{membership(from) required}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,40 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
 | 
			
		||||
    <property name="now" value="now()" dbms="h2"/>
 | 
			
		||||
    
 | 
			
		||||
    <property name="now" value="current_timestamp" dbms="postgresql"/>
 | 
			
		||||
 | 
			
		||||
    <property name="floatType" value="float4" dbms="postgresql, h2"/>
 | 
			
		||||
    <property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
 | 
			
		||||
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity Contact.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083736-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="contact">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
            </column>
 | 
			
		||||
            <column name="first_name" type="varchar(80)">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="last_name" type="varchar(80)">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="email" type="varchar(80)">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
 | 
			
		||||
        </createTable>
 | 
			
		||||
        
 | 
			
		||||
    </changeSet>
 | 
			
		||||
 | 
			
		||||
    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the constraints for entity CustomerContact.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083737-2" author="jhipster">
 | 
			
		||||
        
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="contact_id"
 | 
			
		||||
                                 baseTableName="customer_contact"
 | 
			
		||||
                                 constraintName="fk_customer_contact_contact_id"
 | 
			
		||||
                                 referencedColumnNames="id"
 | 
			
		||||
                                 referencedTableName="contact"/>
 | 
			
		||||
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="customer_id"
 | 
			
		||||
                                 baseTableName="customer_contact"
 | 
			
		||||
                                 constraintName="fk_customer_contact_customer_id"
 | 
			
		||||
                                 referencedColumnNames="id"
 | 
			
		||||
                                 referencedTableName="customer"/>
 | 
			
		||||
 | 
			
		||||
    </changeSet>
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
 | 
			
		||||
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
 | 
			
		||||
 | 
			
		||||
    <property name="now" value="now()" dbms="h2"/>
 | 
			
		||||
    
 | 
			
		||||
@@ -14,7 +16,7 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity Customer.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083735-1" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073043-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="customer">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
@@ -31,22 +33,22 @@
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="contractual_address" type="varchar(400)">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="contractual_salutation" type="varchar(80)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="billing_address" type="varchar(400)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            <column name="contractual_address" type="varchar(400)">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="billing_salutation" type="varchar(80)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="billing_address" type="varchar(400)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
 | 
			
		||||
        </createTable>
 | 
			
		||||
        
 | 
			
		||||
@@ -14,26 +14,31 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity Membership.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083738-1" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073044-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="membership">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
            </column>
 | 
			
		||||
            <column name="since_date" type="date">
 | 
			
		||||
            <column name="jhi_from" type="date">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="until_date" type="date">
 | 
			
		||||
            <column name="jhi_to" type="date">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="jhi_comment" type="varchar(160)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="customer_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false"/>
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
 | 
			
		||||
        </createTable>
 | 
			
		||||
        
 | 
			
		||||
    </changeSet>
 | 
			
		||||
 | 
			
		||||
    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -6,7 +6,7 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the constraints for entity Membership.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083738-2" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073044-2" author="jhipster">
 | 
			
		||||
        
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="customer_id"
 | 
			
		||||
                                 baseTableName="membership"
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
 | 
			
		||||
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
 | 
			
		||||
 | 
			
		||||
    <property name="now" value="now()" dbms="h2"/>
 | 
			
		||||
    
 | 
			
		||||
@@ -14,7 +16,7 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity Share.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083739-1" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073045-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="share">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
@@ -35,8 +37,8 @@
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="member_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false"/>
 | 
			
		||||
            <column name="membership_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
 | 
			
		||||
@@ -6,11 +6,11 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the constraints for entity Share.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083739-2" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073045-2" author="jhipster">
 | 
			
		||||
        
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="member_id"
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="membership_id"
 | 
			
		||||
                                 baseTableName="share"
 | 
			
		||||
                                 constraintName="fk_share_member_id"
 | 
			
		||||
                                 constraintName="fk_share_membership_id"
 | 
			
		||||
                                 referencedColumnNames="id"
 | 
			
		||||
                                 referencedTableName="membership"/>
 | 
			
		||||
 | 
			
		||||
@@ -1,8 +1,10 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd
 | 
			
		||||
                        http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
 | 
			
		||||
 | 
			
		||||
    <property name="now" value="now()" dbms="h2"/>
 | 
			
		||||
    
 | 
			
		||||
@@ -14,7 +16,7 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity Asset.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083740-1" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073046-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="asset">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
@@ -35,8 +37,8 @@
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="member_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false"/>
 | 
			
		||||
            <column name="membership_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <!-- jhipster-needle-liquibase-add-column - JHipster will add columns here, do not remove-->
 | 
			
		||||
@@ -6,11 +6,11 @@
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the constraints for entity Asset.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083740-2" author="jhipster">
 | 
			
		||||
    <changeSet id="20190418073046-2" author="jhipster">
 | 
			
		||||
        
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="member_id"
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="membership_id"
 | 
			
		||||
                                 baseTableName="asset"
 | 
			
		||||
                                 constraintName="fk_asset_member_id"
 | 
			
		||||
                                 constraintName="fk_asset_membership_id"
 | 
			
		||||
                                 referencedColumnNames="id"
 | 
			
		||||
                                 referencedTableName="membership"/>
 | 
			
		||||
 | 
			
		||||
@@ -12,21 +12,49 @@
 | 
			
		||||
    <property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
 | 
			
		||||
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the entity CustomerContact.
 | 
			
		||||
        Added the entity SepaMandate.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190403083737-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="customer_contact">
 | 
			
		||||
    <changeSet id="20190418073047-1" author="jhipster">
 | 
			
		||||
        <createTable tableName="sepa_mandate">
 | 
			
		||||
            <column name="id" type="bigint" autoIncrement="${autoIncrement}">
 | 
			
		||||
                <constraints primaryKey="true" nullable="false"/>
 | 
			
		||||
            </column>
 | 
			
		||||
            <column name="jhi_role" type="varchar(255)">
 | 
			
		||||
            <column name="reference" type="varchar(40)">
 | 
			
		||||
                <constraints nullable="false" unique="true" uniqueConstraintName="ux_sepa_mandate_reference" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="iban" type="varchar(34)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="bic" type="varchar(11)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="created" type="date">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="contact_id" type="bigint">
 | 
			
		||||
            <column name="valid_from" type="date">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="valid_to" type="date">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="last_used" type="date">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="cancelled" type="date">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="jhi_comment" type="varchar(160)">
 | 
			
		||||
                <constraints nullable="true" />
 | 
			
		||||
            </column>
 | 
			
		||||
 | 
			
		||||
            <column name="customer_id" type="bigint">
 | 
			
		||||
                <constraints nullable="false" />
 | 
			
		||||
            </column>
 | 
			
		||||
@@ -0,0 +1,18 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
    <!--
 | 
			
		||||
        Added the constraints for entity SepaMandate.
 | 
			
		||||
    -->
 | 
			
		||||
    <changeSet id="20190418073047-2" author="jhipster">
 | 
			
		||||
        
 | 
			
		||||
        <addForeignKeyConstraint baseColumnNames="customer_id"
 | 
			
		||||
                                 baseTableName="sepa_mandate"
 | 
			
		||||
                                 constraintName="fk_sepa_mandate_customer_id"
 | 
			
		||||
                                 referencedColumnNames="id"
 | 
			
		||||
                                 referencedTableName="customer"/>
 | 
			
		||||
 | 
			
		||||
    </changeSet>
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
 | 
			
		||||
    <changeSet id="sample-data-Contact-01" author="mhoennig" context="sample-data">
 | 
			
		||||
        <loadData encoding="UTF-8"
 | 
			
		||||
                  file="config/liquibase/sample-data/contacts.csv"
 | 
			
		||||
                  separator=";"
 | 
			
		||||
                  tableName="contact">
 | 
			
		||||
            <column name="id" type="numeric"/>
 | 
			
		||||
            <column name="first_name" type="string"/>
 | 
			
		||||
            <column name="last_name" type="string"/>
 | 
			
		||||
            <column name="email" type="string"/>
 | 
			
		||||
        </loadData>
 | 
			
		||||
    </changeSet>
 | 
			
		||||
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<databaseChangeLog
 | 
			
		||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
			
		||||
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
 | 
			
		||||
    <changeSet id="sample-data-CustomerContact-01" author="mhoennig" context="sample-data">
 | 
			
		||||
        <loadData encoding="UTF-8"
 | 
			
		||||
                  file="config/liquibase/sample-data/customer-contacts.csv"
 | 
			
		||||
                  separator=";"
 | 
			
		||||
                  tableName="customer_contact">
 | 
			
		||||
            <column name="id" type="numeric"/>
 | 
			
		||||
            <column name="customer" type="numeric"/>
 | 
			
		||||
            <column name="role" type="string"/>
 | 
			
		||||
            <column name="contact" type="numeric"/>
 | 
			
		||||
        </loadData>
 | 
			
		||||
    </changeSet>
 | 
			
		||||
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
@@ -11,8 +11,8 @@
 | 
			
		||||
                  tableName="membership">
 | 
			
		||||
            <column name="id" type="numeric"/>
 | 
			
		||||
            <column name="customer" type="numeric"/>
 | 
			
		||||
            <column name="since_date" type="date"/>
 | 
			
		||||
            <column name="until_date" type="date"/>
 | 
			
		||||
            <column name="jhi_from" type="date"/>
 | 
			
		||||
            <column name="jhi_to" type="date"/>
 | 
			
		||||
        </loadData>
 | 
			
		||||
    </changeSet>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,22 +5,19 @@
 | 
			
		||||
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
 | 
			
		||||
 | 
			
		||||
    <include file="config/liquibase/changelog/00000000000000_initial_schema.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083735_added_entity_Customer.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083736_added_entity_Contact.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083737_added_entity_CustomerContact.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083738_added_entity_Membership.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083739_added_entity_Share.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083740_added_entity_Asset.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073043_added_entity_Customer.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073044_added_entity_Membership.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073045_added_entity_Share.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073046_added_entity_Asset.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073047_added_entity_SepaMandate.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <!-- jhipster-needle-liquibase-add-changelog - JHipster will add liquibase changelogs here -->
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083737_added_entity_constraints_CustomerContact.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083738_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083739_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190403083740_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073044_added_entity_constraints_Membership.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073045_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073046_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/20190418073047_added_entity_constraints_SepaMandate.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
 | 
			
		||||
 | 
			
		||||
    <include file="config/liquibase/changelog/sample-data-Customer.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/sample-data-Contact.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/sample-data-CustomerContact.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
    <include file="config/liquibase/changelog/sample-data-Membership.xml" relativeToChangelogFile="false"/>
 | 
			
		||||
 | 
			
		||||
</databaseChangeLog>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
id;first_name;last_name;email
 | 
			
		||||
1;Paule;Müller;paule.mueller@example.com
 | 
			
		||||
2;Helma;Schmidt;helma.schmidt@example.com
 | 
			
		||||
3;Vidi;Vitt;vidi.vitt@example.com
 | 
			
		||||
4;Saskia;Balder;saskia@balder.example.com
 | 
			
		||||
 | 
			
		||||
		
		
			
  | 
@@ -1,8 +0,0 @@
 | 
			
		||||
id;customer_id;jhi_role;contact_id
 | 
			
		||||
1;1;CONTRACTUAL;1
 | 
			
		||||
2;1;TECHNICAL;1
 | 
			
		||||
3;1;FINANCIAL;1
 | 
			
		||||
4;2;CONTRACTUAL;1
 | 
			
		||||
5;2;TECHNICAL;2
 | 
			
		||||
6;2;FINANCIAL;3
 | 
			
		||||
 | 
			
		||||
		
		
			
  | 
@@ -1,7 +1,6 @@
 | 
			
		||||
id;customer_id;since_date;until_date
 | 
			
		||||
id;customer_id;jhi_from;jhi_to
 | 
			
		||||
1;1;2001-04-10;2007-12-31
 | 
			
		||||
2;1;2017-01-15;null
 | 
			
		||||
3;3;2003-05-15;2019-12-31
 | 
			
		||||
4;4;2017-05-15;null
 | 
			
		||||
5;5;2011-08-18;null
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		
		
			
  | 
@@ -21,10 +21,10 @@
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{asset.comment}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.asset.member">Member</span></dt>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <div *ngIf="asset.memberId">
 | 
			
		||||
                        <a [routerLink]="['/membership', asset.memberId, 'view']">{{asset.memberId}}</a>
 | 
			
		||||
                    <div *ngIf="asset.membershipId">
 | 
			
		||||
                        <a [routerLink]="['/membership', asset.membershipId, 'view']">{{asset.membershipFrom}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </dd>
 | 
			
		||||
            </dl>
 | 
			
		||||
 
 | 
			
		||||
@@ -70,16 +70,15 @@
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.asset.member" for="field_member">Member</label>
 | 
			
		||||
                    <select class="form-control" id="field_member" name="member" [(ngModel)]="asset.memberId" required>
 | 
			
		||||
                        <option *ngIf="!editForm.value.member" [ngValue]="null" selected></option>
 | 
			
		||||
                        <option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.id}}</option>
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.asset.membership" for="field_membership">Membership</label>
 | 
			
		||||
                    <select class="form-control" id="field_membership" name="membership" [(ngModel)]="asset.membershipId"  required>
 | 
			
		||||
                        <option *ngIf="!editForm.value.membership" [ngValue]="null" selected></option>
 | 
			
		||||
                        <option [ngValue]="membershipOption.id" *ngFor="let membershipOption of memberships; trackBy: trackMembershipById">{{membershipOption.from}}</option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div [hidden]="!(editForm.controls.member?.dirty && editForm.controls.member?.invalid)">
 | 
			
		||||
                <div [hidden]="!(editForm.controls.membership?.dirty && editForm.controls.membership?.invalid)">
 | 
			
		||||
                    <small class="form-text text-danger"
 | 
			
		||||
                           [hidden]="!editForm.controls.member?.errors?.required"
 | 
			
		||||
                           jhiTranslate="entity.validation.required">
 | 
			
		||||
                        [hidden]="!editForm.controls.membership?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                    </small>
 | 
			
		||||
                </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@
 | 
			
		||||
            <th jhiSortBy="action"><span jhiTranslate="hsadminNgApp.asset.action">Action</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="amount"><span jhiTranslate="hsadminNgApp.asset.amount">Amount</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="comment"><span jhiTranslate="hsadminNgApp.asset.comment">Comment</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="memberId"><span jhiTranslate="hsadminNgApp.asset.member">Member</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="membershipFrom"><span jhiTranslate="hsadminNgApp.asset.membership">Membership</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
@@ -31,8 +31,8 @@
 | 
			
		||||
                <td>{{asset.amount}}</td>
 | 
			
		||||
                <td>{{asset.comment}}</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <div *ngIf="asset.memberId">
 | 
			
		||||
                        <a [routerLink]="['../membership', asset.memberId , 'view' ]" >{{asset.memberId}}</a>
 | 
			
		||||
                    <div *ngIf="asset.membershipId">
 | 
			
		||||
                        <a [routerLink]="['../membership', asset.membershipId , 'view' ]" >{{asset.membershipFrom}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td class="text-right">
 | 
			
		||||
 
 | 
			
		||||
@@ -1,65 +0,0 @@
 | 
			
		||||
import { Component, OnInit, OnDestroy } from '@angular/core';
 | 
			
		||||
import { ActivatedRoute, Router } from '@angular/router';
 | 
			
		||||
 | 
			
		||||
import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
 | 
			
		||||
import { JhiEventManager } from 'ng-jhipster';
 | 
			
		||||
 | 
			
		||||
import { IContact } from 'app/shared/model/contact.model';
 | 
			
		||||
import { ContactService } from './contact.service';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-contact-delete-dialog',
 | 
			
		||||
    templateUrl: './contact-delete-dialog.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class ContactDeleteDialogComponent {
 | 
			
		||||
    contact: IContact;
 | 
			
		||||
 | 
			
		||||
    constructor(protected contactService: ContactService, public activeModal: NgbActiveModal, protected eventManager: JhiEventManager) {}
 | 
			
		||||
 | 
			
		||||
    clear() {
 | 
			
		||||
        this.activeModal.dismiss('cancel');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    confirmDelete(id: number) {
 | 
			
		||||
        this.contactService.delete(id).subscribe(response => {
 | 
			
		||||
            this.eventManager.broadcast({
 | 
			
		||||
                name: 'contactListModification',
 | 
			
		||||
                content: 'Deleted an contact'
 | 
			
		||||
            });
 | 
			
		||||
            this.activeModal.dismiss(true);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-contact-delete-popup',
 | 
			
		||||
    template: ''
 | 
			
		||||
})
 | 
			
		||||
export class ContactDeletePopupComponent implements OnInit, OnDestroy {
 | 
			
		||||
    protected ngbModalRef: NgbModalRef;
 | 
			
		||||
 | 
			
		||||
    constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {}
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ contact }) => {
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
                this.ngbModalRef = this.modalService.open(ContactDeleteDialogComponent as Component, { size: 'lg', backdrop: 'static' });
 | 
			
		||||
                this.ngbModalRef.componentInstance.contact = contact;
 | 
			
		||||
                this.ngbModalRef.result.then(
 | 
			
		||||
                    result => {
 | 
			
		||||
                        this.router.navigate(['/contact', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.ngbModalRef = null;
 | 
			
		||||
                    },
 | 
			
		||||
                    reason => {
 | 
			
		||||
                        this.router.navigate(['/contact', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.ngbModalRef = null;
 | 
			
		||||
                    }
 | 
			
		||||
                );
 | 
			
		||||
            }, 0);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ngOnDestroy() {
 | 
			
		||||
        this.ngbModalRef = null;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,35 +0,0 @@
 | 
			
		||||
<div class="row justify-content-center">
 | 
			
		||||
    <div class="col-8">
 | 
			
		||||
        <div *ngIf="contact">
 | 
			
		||||
            <h2><span jhiTranslate="hsadminNgApp.contact.detail.title">Contact</span> {{contact.id}}</h2>
 | 
			
		||||
            <hr>
 | 
			
		||||
            <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
            <dl class="row-md jh-entity-details">
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.contact.firstName">First Name</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{contact.firstName}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.contact.lastName">Last Name</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{contact.lastName}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.contact.email">Email</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{contact.email}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
            </dl>
 | 
			
		||||
 | 
			
		||||
            <button type="submit"
 | 
			
		||||
                    (click)="previousState()"
 | 
			
		||||
                    class="btn btn-info">
 | 
			
		||||
                <fa-icon [icon]="'arrow-left'"></fa-icon> <span jhiTranslate="entity.action.back"> Back</span>
 | 
			
		||||
            </button>
 | 
			
		||||
 | 
			
		||||
            <button type="button"
 | 
			
		||||
                    [routerLink]="['/contact', contact.id, 'edit']"
 | 
			
		||||
                    class="btn btn-primary">
 | 
			
		||||
                <fa-icon [icon]="'pencil-alt'"></fa-icon> <span jhiTranslate="entity.action.edit"> Edit</span>
 | 
			
		||||
            </button>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
import { Component, OnInit } from '@angular/core';
 | 
			
		||||
import { ActivatedRoute } from '@angular/router';
 | 
			
		||||
 | 
			
		||||
import { IContact } from 'app/shared/model/contact.model';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-contact-detail',
 | 
			
		||||
    templateUrl: './contact-detail.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class ContactDetailComponent implements OnInit {
 | 
			
		||||
    contact: IContact;
 | 
			
		||||
 | 
			
		||||
    constructor(protected activatedRoute: ActivatedRoute) {}
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ contact }) => {
 | 
			
		||||
            this.contact = contact;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    previousState() {
 | 
			
		||||
        window.history.back();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,69 +0,0 @@
 | 
			
		||||
<div class="row justify-content-center">
 | 
			
		||||
    <div class="col-8">
 | 
			
		||||
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
 | 
			
		||||
            <h2 id="jhi-contact-heading" jhiTranslate="hsadminNgApp.contact.home.createOrEditLabel">Create or edit a Contact</h2>
 | 
			
		||||
            <div>
 | 
			
		||||
                <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
                <div class="form-group" [hidden]="!contact.id">
 | 
			
		||||
                    <label for="id" jhiTranslate="global.field.id">ID</label>
 | 
			
		||||
                    <input type="text" class="form-control" id="id" name="id"
 | 
			
		||||
                        [(ngModel)]="contact.id" readonly />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.contact.firstName" for="field_firstName">First Name</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="firstName" id="field_firstName"
 | 
			
		||||
                        [(ngModel)]="contact.firstName" required maxlength="80"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.firstName?.dirty && editForm.controls.firstName?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.firstName?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.firstName?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
 | 
			
		||||
                        This field cannot be longer than 80 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.contact.lastName" for="field_lastName">Last Name</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="lastName" id="field_lastName"
 | 
			
		||||
                        [(ngModel)]="contact.lastName" required maxlength="80"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.lastName?.dirty && editForm.controls.lastName?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.lastName?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.lastName?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
 | 
			
		||||
                        This field cannot be longer than 80 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.contact.email" for="field_email">Email</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="email" id="field_email"
 | 
			
		||||
                        [(ngModel)]="contact.email" required maxlength="80"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.email?.dirty && editForm.controls.email?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.email?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.email?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
 | 
			
		||||
                        This field cannot be longer than 80 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
            </div>
 | 
			
		||||
            <div>
 | 
			
		||||
                <button type="button" id="cancel-save" class="btn btn-secondary"  (click)="previousState()">
 | 
			
		||||
                    <fa-icon [icon]="'ban'"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
 | 
			
		||||
                </button>
 | 
			
		||||
                <button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
 | 
			
		||||
                    <fa-icon [icon]="'save'"></fa-icon> <span jhiTranslate="entity.action.save">Save</span>
 | 
			
		||||
                </button>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,51 +0,0 @@
 | 
			
		||||
import { Component, OnInit } from '@angular/core';
 | 
			
		||||
import { ActivatedRoute } from '@angular/router';
 | 
			
		||||
import { HttpResponse, HttpErrorResponse } from '@angular/common/http';
 | 
			
		||||
import { Observable } from 'rxjs';
 | 
			
		||||
import { filter, map } from 'rxjs/operators';
 | 
			
		||||
import { IContact } from 'app/shared/model/contact.model';
 | 
			
		||||
import { ContactService } from './contact.service';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-contact-update',
 | 
			
		||||
    templateUrl: './contact-update.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class ContactUpdateComponent implements OnInit {
 | 
			
		||||
    contact: IContact;
 | 
			
		||||
    isSaving: boolean;
 | 
			
		||||
 | 
			
		||||
    constructor(protected contactService: ContactService, protected activatedRoute: ActivatedRoute) {}
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.isSaving = false;
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ contact }) => {
 | 
			
		||||
            this.contact = contact;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    previousState() {
 | 
			
		||||
        window.history.back();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    save() {
 | 
			
		||||
        this.isSaving = true;
 | 
			
		||||
        if (this.contact.id !== undefined) {
 | 
			
		||||
            this.subscribeToSaveResponse(this.contactService.update(this.contact));
 | 
			
		||||
        } else {
 | 
			
		||||
            this.subscribeToSaveResponse(this.contactService.create(this.contact));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected subscribeToSaveResponse(result: Observable<HttpResponse<IContact>>) {
 | 
			
		||||
        result.subscribe((res: HttpResponse<IContact>) => this.onSaveSuccess(), (res: HttpErrorResponse) => this.onSaveError());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected onSaveSuccess() {
 | 
			
		||||
        this.isSaving = false;
 | 
			
		||||
        this.previousState();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected onSaveError() {
 | 
			
		||||
        this.isSaving = false;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,58 +0,0 @@
 | 
			
		||||
<div>
 | 
			
		||||
    <h2 id="page-heading">
 | 
			
		||||
        <span jhiTranslate="hsadminNgApp.contact.home.title">Contacts</span>
 | 
			
		||||
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-contact" [routerLink]="['/contact/new']">
 | 
			
		||||
            <fa-icon [icon]="'plus'"></fa-icon>
 | 
			
		||||
            <span  jhiTranslate="hsadminNgApp.contact.home.createLabel">
 | 
			
		||||
            Create new Contact
 | 
			
		||||
            </span>
 | 
			
		||||
        </button>
 | 
			
		||||
    </h2>
 | 
			
		||||
    <jhi-alert></jhi-alert>
 | 
			
		||||
    <br/>
 | 
			
		||||
    <div class="table-responsive" *ngIf="contacts">
 | 
			
		||||
        <table class="table table-striped">
 | 
			
		||||
            <thead>
 | 
			
		||||
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="reset.bind(this)">
 | 
			
		||||
            <th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="firstName"><span jhiTranslate="hsadminNgApp.contact.firstName">First Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="lastName"><span jhiTranslate="hsadminNgApp.contact.lastName">Last Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="email"><span jhiTranslate="hsadminNgApp.contact.email">Email</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
            <tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
 | 
			
		||||
            <tr *ngFor="let contact of contacts ;trackBy: trackId">
 | 
			
		||||
                <td><a [routerLink]="['/contact', contact.id, 'view' ]">{{contact.id}}</a></td>
 | 
			
		||||
                <td>{{contact.firstName}}</td>
 | 
			
		||||
                <td>{{contact.lastName}}</td>
 | 
			
		||||
                <td>{{contact.email}}</td>
 | 
			
		||||
                <td class="text-right">
 | 
			
		||||
                    <div class="btn-group flex-btn-group-container">
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/contact', contact.id, 'view' ]"
 | 
			
		||||
                                class="btn btn-info btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'eye'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/contact', contact.id, 'edit']"
 | 
			
		||||
                                class="btn btn-primary btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'pencil-alt'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/', 'contact', { outlets: { popup: contact.id + '/delete'} }]"
 | 
			
		||||
                                replaceUrl="true"
 | 
			
		||||
                                queryParamsHandling="merge"
 | 
			
		||||
                                class="btn btn-danger btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'times'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
        </table>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,93 +0,0 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
import { HttpResponse } from '@angular/common/http';
 | 
			
		||||
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router';
 | 
			
		||||
import { UserRouteAccessService } from 'app/core';
 | 
			
		||||
import { Observable, of } from 'rxjs';
 | 
			
		||||
import { filter, map } from 'rxjs/operators';
 | 
			
		||||
import { Contact } from 'app/shared/model/contact.model';
 | 
			
		||||
import { ContactService } from './contact.service';
 | 
			
		||||
import { ContactComponent } from './contact.component';
 | 
			
		||||
import { ContactDetailComponent } from './contact-detail.component';
 | 
			
		||||
import { ContactUpdateComponent } from './contact-update.component';
 | 
			
		||||
import { ContactDeletePopupComponent } from './contact-delete-dialog.component';
 | 
			
		||||
import { IContact } from 'app/shared/model/contact.model';
 | 
			
		||||
 | 
			
		||||
@Injectable({ providedIn: 'root' })
 | 
			
		||||
export class ContactResolve implements Resolve<IContact> {
 | 
			
		||||
    constructor(private service: ContactService) {}
 | 
			
		||||
 | 
			
		||||
    resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<IContact> {
 | 
			
		||||
        const id = route.params['id'] ? route.params['id'] : null;
 | 
			
		||||
        if (id) {
 | 
			
		||||
            return this.service.find(id).pipe(
 | 
			
		||||
                filter((response: HttpResponse<Contact>) => response.ok),
 | 
			
		||||
                map((contact: HttpResponse<Contact>) => contact.body)
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
        return of(new Contact());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const contactRoute: Routes = [
 | 
			
		||||
    {
 | 
			
		||||
        path: '',
 | 
			
		||||
        component: ContactComponent,
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.contact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/view',
 | 
			
		||||
        component: ContactDetailComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            contact: ContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.contact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: 'new',
 | 
			
		||||
        component: ContactUpdateComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            contact: ContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.contact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/edit',
 | 
			
		||||
        component: ContactUpdateComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            contact: ContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.contact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export const contactPopupRoute: Routes = [
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/delete',
 | 
			
		||||
        component: ContactDeletePopupComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            contact: ContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.contact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService],
 | 
			
		||||
        outlet: 'popup'
 | 
			
		||||
    }
 | 
			
		||||
];
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
import { HttpClient, HttpResponse } from '@angular/common/http';
 | 
			
		||||
import { Observable } from 'rxjs';
 | 
			
		||||
 | 
			
		||||
import { SERVER_API_URL } from 'app/app.constants';
 | 
			
		||||
import { createRequestOption } from 'app/shared';
 | 
			
		||||
import { IContact } from 'app/shared/model/contact.model';
 | 
			
		||||
 | 
			
		||||
type EntityResponseType = HttpResponse<IContact>;
 | 
			
		||||
type EntityArrayResponseType = HttpResponse<IContact[]>;
 | 
			
		||||
 | 
			
		||||
@Injectable({ providedIn: 'root' })
 | 
			
		||||
export class ContactService {
 | 
			
		||||
    public resourceUrl = SERVER_API_URL + 'api/contacts';
 | 
			
		||||
 | 
			
		||||
    constructor(protected http: HttpClient) {}
 | 
			
		||||
 | 
			
		||||
    create(contact: IContact): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.post<IContact>(this.resourceUrl, contact, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    update(contact: IContact): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.put<IContact>(this.resourceUrl, contact, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    find(id: number): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.get<IContact>(`${this.resourceUrl}/${id}`, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    query(req?: any): Observable<EntityArrayResponseType> {
 | 
			
		||||
        const options = createRequestOption(req);
 | 
			
		||||
        return this.http.get<IContact[]>(this.resourceUrl, { params: options, observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    delete(id: number): Observable<HttpResponse<any>> {
 | 
			
		||||
        return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
export * from './contact.service';
 | 
			
		||||
export * from './contact-update.component';
 | 
			
		||||
export * from './contact-delete-dialog.component';
 | 
			
		||||
export * from './contact-detail.component';
 | 
			
		||||
export * from './contact.component';
 | 
			
		||||
export * from './contact.route';
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
<form name="deleteForm" (ngSubmit)="confirmDelete(customerContact.id)">
 | 
			
		||||
    <div class="modal-header">
 | 
			
		||||
        <h4 class="modal-title" jhiTranslate="entity.delete.title">Confirm delete operation</h4>
 | 
			
		||||
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
 | 
			
		||||
                (click)="clear()">×</button>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="modal-body">
 | 
			
		||||
        <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
        <p id="jhi-delete-customerContact-heading" jhiTranslate="hsadminNgApp.customerContact.delete.question" [translateValues]="{id: customerContact.id}">Are you sure you want to delete this Customer Contact?</p>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="modal-footer">
 | 
			
		||||
        <button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="clear()">
 | 
			
		||||
            <fa-icon [icon]="'ban'"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
 | 
			
		||||
        </button>
 | 
			
		||||
        <button id="jhi-confirm-delete-customerContact" type="submit" class="btn btn-danger">
 | 
			
		||||
            <fa-icon [icon]="'times'"></fa-icon> <span jhiTranslate="entity.action.delete">Delete</span>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
</form>
 | 
			
		||||
@@ -1,39 +0,0 @@
 | 
			
		||||
<div class="row justify-content-center">
 | 
			
		||||
    <div class="col-8">
 | 
			
		||||
        <div *ngIf="customerContact">
 | 
			
		||||
            <h2><span jhiTranslate="hsadminNgApp.customerContact.detail.title">Customer Contact</span> {{customerContact.id}}</h2>
 | 
			
		||||
            <hr>
 | 
			
		||||
            <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
            <dl class="row-md jh-entity-details">
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customerContact.role">Role</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span jhiTranslate="{{'hsadminNgApp.CustomerContactRole.' + customerContact.role}}">{{customerContact.role}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customerContact.contact">Contact</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <div *ngIf="customerContact.contactId">
 | 
			
		||||
                        <a [routerLink]="['/contact', customerContact.contactId, 'view']">{{customerContact.contactEmail}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customerContact.customer">Customer</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <div *ngIf="customerContact.customerId">
 | 
			
		||||
                        <a [routerLink]="['/customer', customerContact.customerId, 'view']">{{customerContact.customerPrefix}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </dd>
 | 
			
		||||
            </dl>
 | 
			
		||||
 | 
			
		||||
            <button type="submit"
 | 
			
		||||
                    (click)="previousState()"
 | 
			
		||||
                    class="btn btn-info">
 | 
			
		||||
                <fa-icon [icon]="'arrow-left'"></fa-icon> <span jhiTranslate="entity.action.back"> Back</span>
 | 
			
		||||
            </button>
 | 
			
		||||
 | 
			
		||||
            <button type="button"
 | 
			
		||||
                    [routerLink]="['/customer-contact', customerContact.id, 'edit']"
 | 
			
		||||
                    class="btn btn-primary">
 | 
			
		||||
                <fa-icon [icon]="'pencil-alt'"></fa-icon> <span jhiTranslate="entity.action.edit"> Edit</span>
 | 
			
		||||
            </button>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,24 +0,0 @@
 | 
			
		||||
import { Component, OnInit } from '@angular/core';
 | 
			
		||||
import { ActivatedRoute } from '@angular/router';
 | 
			
		||||
 | 
			
		||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-customer-contact-detail',
 | 
			
		||||
    templateUrl: './customer-contact-detail.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class CustomerContactDetailComponent implements OnInit {
 | 
			
		||||
    customerContact: ICustomerContact;
 | 
			
		||||
 | 
			
		||||
    constructor(protected activatedRoute: ActivatedRoute) {}
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ customerContact }) => {
 | 
			
		||||
            this.customerContact = customerContact;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    previousState() {
 | 
			
		||||
        window.history.back();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,64 +0,0 @@
 | 
			
		||||
<div class="row justify-content-center">
 | 
			
		||||
    <div class="col-8">
 | 
			
		||||
        <form name="editForm" role="form" novalidate (ngSubmit)="save()" #editForm="ngForm">
 | 
			
		||||
            <h2 id="jhi-customer-contact-heading" jhiTranslate="hsadminNgApp.customerContact.home.createOrEditLabel">Create or edit a Customer Contact</h2>
 | 
			
		||||
            <div>
 | 
			
		||||
                <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
                <div class="form-group" [hidden]="!customerContact.id">
 | 
			
		||||
                    <label for="id" jhiTranslate="global.field.id">ID</label>
 | 
			
		||||
                    <input type="text" class="form-control" id="id" name="id"
 | 
			
		||||
                        [(ngModel)]="customerContact.id" readonly />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customerContact.role" for="field_role">Role</label>
 | 
			
		||||
                    <select class="form-control" name="role" [(ngModel)]="customerContact.role" id="field_role"  required>
 | 
			
		||||
                        <option value="CONTRACTUAL">{{'hsadminNgApp.CustomerContactRole.CONTRACTUAL' | translate}}</option>
 | 
			
		||||
                        <option value="TECHNICAL">{{'hsadminNgApp.CustomerContactRole.TECHNICAL' | translate}}</option>
 | 
			
		||||
                        <option value="FINANCIAL">{{'hsadminNgApp.CustomerContactRole.FINANCIAL' | translate}}</option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.role?.dirty && editForm.controls.role?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.role?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customerContact.contact" for="field_contact">Contact</label>
 | 
			
		||||
                    <select class="form-control" id="field_contact" name="contact" [(ngModel)]="customerContact.contactId"  required>
 | 
			
		||||
                        <option *ngIf="!editForm.value.contact" [ngValue]="null" selected></option>
 | 
			
		||||
                        <option [ngValue]="contactOption.id" *ngFor="let contactOption of contacts; trackBy: trackContactById">{{contactOption.email}}</option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div [hidden]="!(editForm.controls.contact?.dirty && editForm.controls.contact?.invalid)">
 | 
			
		||||
                    <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.contact?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                    </small>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customerContact.customer" for="field_customer">Customer</label>
 | 
			
		||||
                    <select class="form-control" id="field_customer" name="customer" [(ngModel)]="customerContact.customerId"  required>
 | 
			
		||||
                        <option *ngIf="!editForm.value.customer" [ngValue]="null" selected></option>
 | 
			
		||||
                        <option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.prefix}}</option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
 | 
			
		||||
                    <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.customer?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                    </small>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div>
 | 
			
		||||
                <button type="button" id="cancel-save" class="btn btn-secondary"  (click)="previousState()">
 | 
			
		||||
                    <fa-icon [icon]="'ban'"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
 | 
			
		||||
                </button>
 | 
			
		||||
                <button type="submit" id="save-entity" [disabled]="editForm.form.invalid || isSaving" class="btn btn-primary">
 | 
			
		||||
                    <fa-icon [icon]="'save'"></fa-icon> <span jhiTranslate="entity.action.save">Save</span>
 | 
			
		||||
                </button>
 | 
			
		||||
            </div>
 | 
			
		||||
        </form>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,66 +0,0 @@
 | 
			
		||||
<div>
 | 
			
		||||
    <h2 id="page-heading">
 | 
			
		||||
        <span jhiTranslate="hsadminNgApp.customerContact.home.title">Customer Contacts</span>
 | 
			
		||||
        <button id="jh-create-entity" class="btn btn-primary float-right jh-create-entity create-customer-contact" [routerLink]="['/customer-contact/new']">
 | 
			
		||||
            <fa-icon [icon]="'plus'"></fa-icon>
 | 
			
		||||
            <span  jhiTranslate="hsadminNgApp.customerContact.home.createLabel">
 | 
			
		||||
            Create new Customer Contact
 | 
			
		||||
            </span>
 | 
			
		||||
        </button>
 | 
			
		||||
    </h2>
 | 
			
		||||
    <jhi-alert></jhi-alert>
 | 
			
		||||
    <br/>
 | 
			
		||||
    <div class="table-responsive" *ngIf="customerContacts">
 | 
			
		||||
        <table class="table table-striped">
 | 
			
		||||
            <thead>
 | 
			
		||||
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="reset.bind(this)">
 | 
			
		||||
            <th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="role"><span jhiTranslate="hsadminNgApp.customerContact.role">Role</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="contactEmail"><span jhiTranslate="hsadminNgApp.customerContact.contact">Contact</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.customerContact.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
            <tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
 | 
			
		||||
            <tr *ngFor="let customerContact of customerContacts ;trackBy: trackId">
 | 
			
		||||
                <td><a [routerLink]="['/customer-contact', customerContact.id, 'view' ]">{{customerContact.id}}</a></td>
 | 
			
		||||
                <td jhiTranslate="{{'hsadminNgApp.CustomerContactRole.' + customerContact.role}}">{{customerContact.role}}</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <div *ngIf="customerContact.contactId">
 | 
			
		||||
                        <a [routerLink]="['../contact', customerContact.contactId , 'view' ]" >{{customerContact.contactEmail}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <div *ngIf="customerContact.customerId">
 | 
			
		||||
                        <a [routerLink]="['../customer', customerContact.customerId , 'view' ]" >{{customerContact.customerPrefix}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </td>
 | 
			
		||||
                <td class="text-right">
 | 
			
		||||
                    <div class="btn-group flex-btn-group-container">
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/customer-contact', customerContact.id, 'view' ]"
 | 
			
		||||
                                class="btn btn-info btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'eye'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/customer-contact', customerContact.id, 'edit']"
 | 
			
		||||
                                class="btn btn-primary btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'pencil-alt'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
                                [routerLink]="['/', 'customer-contact', { outlets: { popup: customerContact.id + '/delete'} }]"
 | 
			
		||||
                                replaceUrl="true"
 | 
			
		||||
                                queryParamsHandling="merge"
 | 
			
		||||
                                class="btn btn-danger btn-sm">
 | 
			
		||||
                            <fa-icon [icon]="'times'"></fa-icon>
 | 
			
		||||
                            <span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
 | 
			
		||||
                        </button>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </td>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </tbody>
 | 
			
		||||
        </table>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -1,108 +0,0 @@
 | 
			
		||||
import { Component, OnInit, OnDestroy } from '@angular/core';
 | 
			
		||||
import { HttpErrorResponse, HttpHeaders, HttpResponse } from '@angular/common/http';
 | 
			
		||||
import { Subscription } from 'rxjs';
 | 
			
		||||
import { filter, map } from 'rxjs/operators';
 | 
			
		||||
import { JhiEventManager, JhiParseLinks, JhiAlertService } from 'ng-jhipster';
 | 
			
		||||
 | 
			
		||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
import { AccountService } from 'app/core';
 | 
			
		||||
 | 
			
		||||
import { ITEMS_PER_PAGE } from 'app/shared';
 | 
			
		||||
import { CustomerContactService } from './customer-contact.service';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-customer-contact',
 | 
			
		||||
    templateUrl: './customer-contact.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class CustomerContactComponent implements OnInit, OnDestroy {
 | 
			
		||||
    customerContacts: ICustomerContact[];
 | 
			
		||||
    currentAccount: any;
 | 
			
		||||
    eventSubscriber: Subscription;
 | 
			
		||||
    itemsPerPage: number;
 | 
			
		||||
    links: any;
 | 
			
		||||
    page: any;
 | 
			
		||||
    predicate: any;
 | 
			
		||||
    reverse: any;
 | 
			
		||||
    totalItems: number;
 | 
			
		||||
 | 
			
		||||
    constructor(
 | 
			
		||||
        protected customerContactService: CustomerContactService,
 | 
			
		||||
        protected jhiAlertService: JhiAlertService,
 | 
			
		||||
        protected eventManager: JhiEventManager,
 | 
			
		||||
        protected parseLinks: JhiParseLinks,
 | 
			
		||||
        protected accountService: AccountService
 | 
			
		||||
    ) {
 | 
			
		||||
        this.customerContacts = [];
 | 
			
		||||
        this.itemsPerPage = ITEMS_PER_PAGE;
 | 
			
		||||
        this.page = 0;
 | 
			
		||||
        this.links = {
 | 
			
		||||
            last: 0
 | 
			
		||||
        };
 | 
			
		||||
        this.predicate = 'id';
 | 
			
		||||
        this.reverse = true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    loadAll() {
 | 
			
		||||
        this.customerContactService
 | 
			
		||||
            .query({
 | 
			
		||||
                page: this.page,
 | 
			
		||||
                size: this.itemsPerPage,
 | 
			
		||||
                sort: this.sort()
 | 
			
		||||
            })
 | 
			
		||||
            .subscribe(
 | 
			
		||||
                (res: HttpResponse<ICustomerContact[]>) => this.paginateCustomerContacts(res.body, res.headers),
 | 
			
		||||
                (res: HttpErrorResponse) => this.onError(res.message)
 | 
			
		||||
            );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    reset() {
 | 
			
		||||
        this.page = 0;
 | 
			
		||||
        this.customerContacts = [];
 | 
			
		||||
        this.loadAll();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    loadPage(page) {
 | 
			
		||||
        this.page = page;
 | 
			
		||||
        this.loadAll();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.loadAll();
 | 
			
		||||
        this.accountService.identity().then(account => {
 | 
			
		||||
            this.currentAccount = account;
 | 
			
		||||
        });
 | 
			
		||||
        this.registerChangeInCustomerContacts();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    ngOnDestroy() {
 | 
			
		||||
        this.eventManager.destroy(this.eventSubscriber);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    trackId(index: number, item: ICustomerContact) {
 | 
			
		||||
        return item.id;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    registerChangeInCustomerContacts() {
 | 
			
		||||
        this.eventSubscriber = this.eventManager.subscribe('customerContactListModification', response => this.reset());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    sort() {
 | 
			
		||||
        const result = [this.predicate + ',' + (this.reverse ? 'asc' : 'desc')];
 | 
			
		||||
        if (this.predicate !== 'id') {
 | 
			
		||||
            result.push('id');
 | 
			
		||||
        }
 | 
			
		||||
        return result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected paginateCustomerContacts(data: ICustomerContact[], headers: HttpHeaders) {
 | 
			
		||||
        this.links = this.parseLinks.parse(headers.get('link'));
 | 
			
		||||
        this.totalItems = parseInt(headers.get('X-Total-Count'), 10);
 | 
			
		||||
        for (let i = 0; i < data.length; i++) {
 | 
			
		||||
            this.customerContacts.push(data[i]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected onError(errorMessage: string) {
 | 
			
		||||
        this.jhiAlertService.error(errorMessage, null, null);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,45 +0,0 @@
 | 
			
		||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 | 
			
		||||
import { RouterModule } from '@angular/router';
 | 
			
		||||
import { JhiLanguageService } from 'ng-jhipster';
 | 
			
		||||
import { JhiLanguageHelper } from 'app/core';
 | 
			
		||||
 | 
			
		||||
import { HsadminNgSharedModule } from 'app/shared';
 | 
			
		||||
import {
 | 
			
		||||
    CustomerContactComponent,
 | 
			
		||||
    CustomerContactDetailComponent,
 | 
			
		||||
    CustomerContactUpdateComponent,
 | 
			
		||||
    CustomerContactDeletePopupComponent,
 | 
			
		||||
    CustomerContactDeleteDialogComponent,
 | 
			
		||||
    customerContactRoute,
 | 
			
		||||
    customerContactPopupRoute
 | 
			
		||||
} from './';
 | 
			
		||||
 | 
			
		||||
const ENTITY_STATES = [...customerContactRoute, ...customerContactPopupRoute];
 | 
			
		||||
 | 
			
		||||
@NgModule({
 | 
			
		||||
    imports: [HsadminNgSharedModule, RouterModule.forChild(ENTITY_STATES)],
 | 
			
		||||
    declarations: [
 | 
			
		||||
        CustomerContactComponent,
 | 
			
		||||
        CustomerContactDetailComponent,
 | 
			
		||||
        CustomerContactUpdateComponent,
 | 
			
		||||
        CustomerContactDeleteDialogComponent,
 | 
			
		||||
        CustomerContactDeletePopupComponent
 | 
			
		||||
    ],
 | 
			
		||||
    entryComponents: [
 | 
			
		||||
        CustomerContactComponent,
 | 
			
		||||
        CustomerContactUpdateComponent,
 | 
			
		||||
        CustomerContactDeleteDialogComponent,
 | 
			
		||||
        CustomerContactDeletePopupComponent
 | 
			
		||||
    ],
 | 
			
		||||
    providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }],
 | 
			
		||||
    schemas: [CUSTOM_ELEMENTS_SCHEMA]
 | 
			
		||||
})
 | 
			
		||||
export class HsadminNgCustomerContactModule {
 | 
			
		||||
    constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
 | 
			
		||||
        this.languageHelper.language.subscribe((languageKey: string) => {
 | 
			
		||||
            if (languageKey !== undefined) {
 | 
			
		||||
                this.languageService.changeLanguage(languageKey);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,93 +0,0 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
import { HttpResponse } from '@angular/common/http';
 | 
			
		||||
import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Routes } from '@angular/router';
 | 
			
		||||
import { UserRouteAccessService } from 'app/core';
 | 
			
		||||
import { Observable, of } from 'rxjs';
 | 
			
		||||
import { filter, map } from 'rxjs/operators';
 | 
			
		||||
import { CustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
import { CustomerContactService } from './customer-contact.service';
 | 
			
		||||
import { CustomerContactComponent } from './customer-contact.component';
 | 
			
		||||
import { CustomerContactDetailComponent } from './customer-contact-detail.component';
 | 
			
		||||
import { CustomerContactUpdateComponent } from './customer-contact-update.component';
 | 
			
		||||
import { CustomerContactDeletePopupComponent } from './customer-contact-delete-dialog.component';
 | 
			
		||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
 | 
			
		||||
@Injectable({ providedIn: 'root' })
 | 
			
		||||
export class CustomerContactResolve implements Resolve<ICustomerContact> {
 | 
			
		||||
    constructor(private service: CustomerContactService) {}
 | 
			
		||||
 | 
			
		||||
    resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<ICustomerContact> {
 | 
			
		||||
        const id = route.params['id'] ? route.params['id'] : null;
 | 
			
		||||
        if (id) {
 | 
			
		||||
            return this.service.find(id).pipe(
 | 
			
		||||
                filter((response: HttpResponse<CustomerContact>) => response.ok),
 | 
			
		||||
                map((customerContact: HttpResponse<CustomerContact>) => customerContact.body)
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
        return of(new CustomerContact());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const customerContactRoute: Routes = [
 | 
			
		||||
    {
 | 
			
		||||
        path: '',
 | 
			
		||||
        component: CustomerContactComponent,
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.customerContact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/view',
 | 
			
		||||
        component: CustomerContactDetailComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            customerContact: CustomerContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.customerContact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: 'new',
 | 
			
		||||
        component: CustomerContactUpdateComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            customerContact: CustomerContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.customerContact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/edit',
 | 
			
		||||
        component: CustomerContactUpdateComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            customerContact: CustomerContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.customerContact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService]
 | 
			
		||||
    }
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
export const customerContactPopupRoute: Routes = [
 | 
			
		||||
    {
 | 
			
		||||
        path: ':id/delete',
 | 
			
		||||
        component: CustomerContactDeletePopupComponent,
 | 
			
		||||
        resolve: {
 | 
			
		||||
            customerContact: CustomerContactResolve
 | 
			
		||||
        },
 | 
			
		||||
        data: {
 | 
			
		||||
            authorities: ['ROLE_USER'],
 | 
			
		||||
            pageTitle: 'hsadminNgApp.customerContact.home.title'
 | 
			
		||||
        },
 | 
			
		||||
        canActivate: [UserRouteAccessService],
 | 
			
		||||
        outlet: 'popup'
 | 
			
		||||
    }
 | 
			
		||||
];
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
import { Injectable } from '@angular/core';
 | 
			
		||||
import { HttpClient, HttpResponse } from '@angular/common/http';
 | 
			
		||||
import { Observable } from 'rxjs';
 | 
			
		||||
 | 
			
		||||
import { SERVER_API_URL } from 'app/app.constants';
 | 
			
		||||
import { createRequestOption } from 'app/shared';
 | 
			
		||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
 | 
			
		||||
type EntityResponseType = HttpResponse<ICustomerContact>;
 | 
			
		||||
type EntityArrayResponseType = HttpResponse<ICustomerContact[]>;
 | 
			
		||||
 | 
			
		||||
@Injectable({ providedIn: 'root' })
 | 
			
		||||
export class CustomerContactService {
 | 
			
		||||
    public resourceUrl = SERVER_API_URL + 'api/customer-contacts';
 | 
			
		||||
 | 
			
		||||
    constructor(protected http: HttpClient) {}
 | 
			
		||||
 | 
			
		||||
    create(customerContact: ICustomerContact): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.post<ICustomerContact>(this.resourceUrl, customerContact, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    update(customerContact: ICustomerContact): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.put<ICustomerContact>(this.resourceUrl, customerContact, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    find(id: number): Observable<EntityResponseType> {
 | 
			
		||||
        return this.http.get<ICustomerContact>(`${this.resourceUrl}/${id}`, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    query(req?: any): Observable<EntityArrayResponseType> {
 | 
			
		||||
        const options = createRequestOption(req);
 | 
			
		||||
        return this.http.get<ICustomerContact[]>(this.resourceUrl, { params: options, observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    delete(id: number): Observable<HttpResponse<any>> {
 | 
			
		||||
        return this.http.delete<any>(`${this.resourceUrl}/${id}`, { observe: 'response' });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
export * from './customer-contact.service';
 | 
			
		||||
export * from './customer-contact-update.component';
 | 
			
		||||
export * from './customer-contact-delete-dialog.component';
 | 
			
		||||
export * from './customer-contact-detail.component';
 | 
			
		||||
export * from './customer-contact.component';
 | 
			
		||||
export * from './customer-contact.route';
 | 
			
		||||
@@ -17,22 +17,22 @@
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{customer.name}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span [innerHTML]="customer.contractualAddress | linebreaks"></span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{customer.contractualSalutation}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span></dt>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span [innerHTML]="customer.billingAddress | linebreaks"></span>
 | 
			
		||||
                    <span>{{customer.contractualAddress}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{customer.billingSalutation}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{customer.billingAddress}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
            </dl>
 | 
			
		||||
 | 
			
		||||
            <button type="submit"
 | 
			
		||||
 
 | 
			
		||||
@@ -48,33 +48,20 @@
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name" for="field_name">Name</label>
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.name"
 | 
			
		||||
                           for="field_name">Name</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="name" id="field_name"
 | 
			
		||||
                        [(ngModel)]="customer.name" required maxlength="80"/>
 | 
			
		||||
                           [(ngModel)]="customer.name" required maxlength="80"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.name?.dirty && editForm.controls.name?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.name?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                               [hidden]="!editForm.controls.name?.errors?.required"
 | 
			
		||||
                               jhiTranslate="entity.validation.required">
 | 
			
		||||
                            This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.name?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
 | 
			
		||||
                        This field cannot be longer than 80 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress"
 | 
			
		||||
                           for="field_contractualAddress">Contractual Address</label>
 | 
			
		||||
                    <textarea class="form-control" name="contractualAddress" id="field_contractualAddress" rows="3"
 | 
			
		||||
                              [(ngModel)]="customer.contractualAddress" required maxlength="400"></textarea>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.contractualAddress?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.contractualAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
 | 
			
		||||
                        This field cannot be longer than 400 characters.
 | 
			
		||||
                               [hidden]="!editForm.controls.name?.errors?.maxlength"
 | 
			
		||||
                               jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 80 }">
 | 
			
		||||
                            This field cannot be longer than 80 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
@@ -90,13 +77,19 @@
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingAddress" for="field_billingAddress">Billing Address</label>
 | 
			
		||||
                    <textarea class="form-control" name="billingAddress" id="field_billingAddress" rows="3"
 | 
			
		||||
                              [(ngModel)]="customer.billingAddress" maxlength="400"></textarea>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.contractualAddress" for="field_contractualAddress">Contractual Address</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="contractualAddress" id="field_contractualAddress"
 | 
			
		||||
                        [(ngModel)]="customer.contractualAddress" required maxlength="400"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.contractualAddress?.dirty && editForm.controls.contractualAddress?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.billingAddress?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
 | 
			
		||||
                        This field cannot be longer than 400 characters.
 | 
			
		||||
                               [hidden]="!editForm.controls.contractualAddress?.errors?.required"
 | 
			
		||||
                               jhiTranslate="entity.validation.required">
 | 
			
		||||
                            This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                               [hidden]="!editForm.controls.contractualAddress?.errors?.maxlength"
 | 
			
		||||
                               jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
 | 
			
		||||
                            This field cannot be longer than 400 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
@@ -111,6 +104,18 @@
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.customer.billingAddress" for="field_billingAddress">Billing Address</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="billingAddress" id="field_billingAddress"
 | 
			
		||||
                        [(ngModel)]="customer.billingAddress" maxlength="400"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.billingAddress?.dirty && editForm.controls.billingAddress?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                               [hidden]="!editForm.controls.billingAddress?.errors?.maxlength"
 | 
			
		||||
                               jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 400 }">
 | 
			
		||||
                            This field cannot be longer than 400 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
            </div>
 | 
			
		||||
            <div>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,18 +18,12 @@
 | 
			
		||||
            <th jhiSortBy="number"><span jhiTranslate="hsadminNgApp.customer.number">Number</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="prefix"><span jhiTranslate="hsadminNgApp.customer.prefix">Prefix</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="name"><span jhiTranslate="hsadminNgApp.customer.name">Name</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="contractualAddress"><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="contractualSalutation"><span jhiTranslate="hsadminNgApp.customer.contractualSalutation">Contractual Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="billingAddress"><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="contractualAddress"><span jhiTranslate="hsadminNgApp.customer.contractualAddress">Contractual Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="billingSalutation"><span jhiTranslate="hsadminNgApp.customer.billingSalutation">Billing Salutation</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="billingAddress"><span jhiTranslate="hsadminNgApp.customer.billingAddress">Billing Address</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            <tr>
 | 
			
		||||
                <th></th>
 | 
			
		||||
                <th><input type="text" class="form-control" [(ngModel)]="filterValue.number" (keyup)="filter($event)"></th>
 | 
			
		||||
                <th><input type="text" class="form-control" [(ngModel)]="filterValue.prefix" (keyup)="filter($event)"></th>
 | 
			
		||||
                <th><button class="btn btn-primary float-left" (click)="resetFilter()">Reset Filter</button></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
            </thead>
 | 
			
		||||
            <tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
 | 
			
		||||
            <tr *ngFor="let customer of customers ;trackBy: trackId">
 | 
			
		||||
@@ -37,10 +31,10 @@
 | 
			
		||||
                <td>{{customer.number}}</td>
 | 
			
		||||
                <td>{{customer.prefix}}</td>
 | 
			
		||||
                <td>{{customer.name}}</td>
 | 
			
		||||
                <td>{{customer.contractualAddress | linebreaks:' | '}}</td>
 | 
			
		||||
                <td>{{customer.contractualSalutation}}</td>
 | 
			
		||||
                <td>{{customer.billingAddress | linebreaks:' | '}}</td>
 | 
			
		||||
                <td>{{customer.contractualAddress}}</td>
 | 
			
		||||
                <td>{{customer.billingSalutation}}</td>
 | 
			
		||||
                <td>{{customer.billingAddress}}</td>
 | 
			
		||||
                <td class="text-right">
 | 
			
		||||
                    <div class="btn-group flex-btn-group-container">
 | 
			
		||||
                        <button type="submit"
 | 
			
		||||
 
 | 
			
		||||
@@ -8,14 +8,6 @@ import { RouterModule } from '@angular/router';
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'contact',
 | 
			
		||||
                loadChildren: './contact/contact.module#HsadminNgContactModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer-contact',
 | 
			
		||||
                loadChildren: './customer-contact/customer-contact.module#HsadminNgCustomerContactModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'membership',
 | 
			
		||||
                loadChildren: './membership/membership.module#HsadminNgMembershipModule'
 | 
			
		||||
@@ -29,64 +21,8 @@ import { RouterModule } from '@angular/router';
 | 
			
		||||
                loadChildren: './asset/asset.module#HsadminNgAssetModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'membership',
 | 
			
		||||
                loadChildren: './membership/membership.module#HsadminNgMembershipModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'share',
 | 
			
		||||
                loadChildren: './share/share.module#HsadminNgShareModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'asset',
 | 
			
		||||
                loadChildren: './asset/asset.module#HsadminNgAssetModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'membership',
 | 
			
		||||
                loadChildren: './membership/membership.module#HsadminNgMembershipModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'share',
 | 
			
		||||
                loadChildren: './share/share.module#HsadminNgShareModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'asset',
 | 
			
		||||
                loadChildren: './asset/asset.module#HsadminNgAssetModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'customer',
 | 
			
		||||
                loadChildren: './customer/customer.module#HsadminNgCustomerModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'membership',
 | 
			
		||||
                loadChildren: './membership/membership.module#HsadminNgMembershipModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'share',
 | 
			
		||||
                loadChildren: './share/share.module#HsadminNgShareModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'asset',
 | 
			
		||||
                loadChildren: './asset/asset.module#HsadminNgAssetModule'
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
                path: 'membership',
 | 
			
		||||
                loadChildren: './membership/membership.module#HsadminNgMembershipModule'
 | 
			
		||||
                path: 'sepa-mandate',
 | 
			
		||||
                loadChildren: './sepa-mandate/sepa-mandate.module#HsadminNgSepaMandateModule'
 | 
			
		||||
            }
 | 
			
		||||
            /* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */
 | 
			
		||||
        ])
 | 
			
		||||
 
 | 
			
		||||
@@ -5,13 +5,17 @@
 | 
			
		||||
            <hr>
 | 
			
		||||
            <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
            <dl class="row-md jh-entity-details">
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.sinceDate">Since Date</span></dt>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.from">From</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{membership.sinceDate}}</span>
 | 
			
		||||
                    <span>{{membership.from}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.untilDate">Until Date</span></dt>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.to">To</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{membership.untilDate}}</span>
 | 
			
		||||
                    <span>{{membership.to}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.comment">Comment</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{membership.comment}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
 
 | 
			
		||||
@@ -10,44 +10,53 @@
 | 
			
		||||
                        [(ngModel)]="membership.id" readonly />
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.sinceDate" for="field_sinceDate">Since Date</label>
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.from" for="field_from">From</label>
 | 
			
		||||
                    <div class="input-group">
 | 
			
		||||
                        <input id="field_sinceDate" type="text" class="form-control" name="sinceDate" ngbDatepicker  #sinceDateDp="ngbDatepicker" [(ngModel)]="membership.sinceDate"
 | 
			
		||||
                        <input id="field_from" type="text" class="form-control" name="from" ngbDatepicker  #fromDp="ngbDatepicker" [(ngModel)]="membership.from"
 | 
			
		||||
                        required/>
 | 
			
		||||
                        <span class="input-group-append">
 | 
			
		||||
                            <button type="button" class="btn btn-secondary" (click)="sinceDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
			
		||||
                            <button type="button" class="btn btn-secondary" (click)="fromDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
			
		||||
                        </span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.sinceDate?.dirty && editForm.controls.sinceDate?.invalid)">
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.from?.dirty && editForm.controls.from?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.sinceDate?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        [hidden]="!editForm.controls.from?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.untilDate" for="field_untilDate">Until Date</label>
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.to" for="field_to">To</label>
 | 
			
		||||
                    <div class="input-group">
 | 
			
		||||
                        <input id="field_untilDate" type="text" class="form-control" name="untilDate" ngbDatepicker  #untilDateDp="ngbDatepicker" [(ngModel)]="membership.untilDate"
 | 
			
		||||
                        <input id="field_to" type="text" class="form-control" name="to" ngbDatepicker  #toDp="ngbDatepicker" [(ngModel)]="membership.to"
 | 
			
		||||
                        />
 | 
			
		||||
                        <span class="input-group-append">
 | 
			
		||||
                            <button type="button" class="btn btn-secondary" (click)="untilDateDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
			
		||||
                            <button type="button" class="btn btn-secondary" (click)="toDp.toggle()"><fa-icon [icon]="'calendar-alt'"></fa-icon></button>
 | 
			
		||||
                        </span>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.comment" for="field_comment">Comment</label>
 | 
			
		||||
                    <input type="text" class="form-control" name="comment" id="field_comment"
 | 
			
		||||
                        [(ngModel)]="membership.comment" maxlength="160"/>
 | 
			
		||||
                    <div [hidden]="!(editForm.controls.comment?.dirty && editForm.controls.comment?.invalid)">
 | 
			
		||||
                        <small class="form-text text-danger"
 | 
			
		||||
                        [hidden]="!editForm.controls.comment?.errors?.maxlength" jhiTranslate="entity.validation.maxlength" [translateValues]="{ max: 160 }">
 | 
			
		||||
                        This field cannot be longer than 160 characters.
 | 
			
		||||
                        </small>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
 | 
			
		||||
                <div class="form-group">
 | 
			
		||||
                    <label class="form-control-label" jhiTranslate="hsadminNgApp.membership.customer" for="field_customer">Customer</label>
 | 
			
		||||
                    <select class="form-control" id="field_customer" name="customer" [(ngModel)]="membership.customerId"
 | 
			
		||||
                            required>
 | 
			
		||||
                    <select class="form-control" id="field_customer" name="customer" [(ngModel)]="membership.customerId"  required>
 | 
			
		||||
                        <option *ngIf="!editForm.value.customer" [ngValue]="null" selected></option>
 | 
			
		||||
                        <option [ngValue]="customerOption.id" *ngFor="let customerOption of customers; trackBy: trackCustomerById">{{customerOption.prefix}}</option>
 | 
			
		||||
                    </select>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div [hidden]="!(editForm.controls.customer?.dirty && editForm.controls.customer?.invalid)">
 | 
			
		||||
                    <small class="form-text text-danger"
 | 
			
		||||
                           [hidden]="!editForm.controls.customer?.errors?.required"
 | 
			
		||||
                           jhiTranslate="entity.validation.required">
 | 
			
		||||
                        [hidden]="!editForm.controls.customer?.errors?.required" jhiTranslate="entity.validation.required">
 | 
			
		||||
                        This field is required.
 | 
			
		||||
                    </small>
 | 
			
		||||
                </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,8 @@ export class MembershipUpdateComponent implements OnInit {
 | 
			
		||||
    isSaving: boolean;
 | 
			
		||||
 | 
			
		||||
    customers: ICustomer[];
 | 
			
		||||
    sinceDateDp: any;
 | 
			
		||||
    untilDateDp: any;
 | 
			
		||||
    fromDp: any;
 | 
			
		||||
    toDp: any;
 | 
			
		||||
 | 
			
		||||
    constructor(
 | 
			
		||||
        protected jhiAlertService: JhiAlertService,
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,9 @@
 | 
			
		||||
            <thead>
 | 
			
		||||
            <tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="reset.bind(this)">
 | 
			
		||||
            <th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="sinceDate"><span jhiTranslate="hsadminNgApp.membership.sinceDate">Since Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="untilDate"><span jhiTranslate="hsadminNgApp.membership.untilDate">Until Date</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="from"><span jhiTranslate="hsadminNgApp.membership.from">From</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="to"><span jhiTranslate="hsadminNgApp.membership.to">To</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="comment"><span jhiTranslate="hsadminNgApp.membership.comment">Comment</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th jhiSortBy="customerPrefix"><span jhiTranslate="hsadminNgApp.membership.customer">Customer</span> <fa-icon [icon]="'sort'"></fa-icon></th>
 | 
			
		||||
            <th></th>
 | 
			
		||||
            </tr>
 | 
			
		||||
@@ -24,8 +25,9 @@
 | 
			
		||||
            <tbody infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0">
 | 
			
		||||
            <tr *ngFor="let membership of memberships ;trackBy: trackId">
 | 
			
		||||
                <td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
 | 
			
		||||
                <td>{{membership.sinceDate | date:'mediumDate'}}</td>
 | 
			
		||||
                <td>{{membership.untilDate | date:'mediumDate'}}</td>
 | 
			
		||||
                <td>{{membership.from | date:'mediumDate'}}</td>
 | 
			
		||||
                <td>{{membership.to | date:'mediumDate'}}</td>
 | 
			
		||||
                <td>{{membership.comment}}</td>
 | 
			
		||||
                <td>
 | 
			
		||||
                    <div *ngIf="membership.customerId">
 | 
			
		||||
                        <a [routerLink]="['../customer', membership.customerId , 'view' ]" >{{membership.customerPrefix}}</a>
 | 
			
		||||
 
 | 
			
		||||
@@ -51,16 +51,16 @@ export class MembershipService {
 | 
			
		||||
 | 
			
		||||
    protected convertDateFromClient(membership: IMembership): IMembership {
 | 
			
		||||
        const copy: IMembership = Object.assign({}, membership, {
 | 
			
		||||
            sinceDate: membership.sinceDate != null && membership.sinceDate.isValid() ? membership.sinceDate.format(DATE_FORMAT) : null,
 | 
			
		||||
            untilDate: membership.untilDate != null && membership.untilDate.isValid() ? membership.untilDate.format(DATE_FORMAT) : null
 | 
			
		||||
            from: membership.from != null && membership.from.isValid() ? membership.from.format(DATE_FORMAT) : null,
 | 
			
		||||
            to: membership.to != null && membership.to.isValid() ? membership.to.format(DATE_FORMAT) : null
 | 
			
		||||
        });
 | 
			
		||||
        return copy;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected convertDateFromServer(res: EntityResponseType): EntityResponseType {
 | 
			
		||||
        if (res.body) {
 | 
			
		||||
            res.body.sinceDate = res.body.sinceDate != null ? moment(res.body.sinceDate) : null;
 | 
			
		||||
            res.body.untilDate = res.body.untilDate != null ? moment(res.body.untilDate) : null;
 | 
			
		||||
            res.body.from = res.body.from != null ? moment(res.body.from) : null;
 | 
			
		||||
            res.body.to = res.body.to != null ? moment(res.body.to) : null;
 | 
			
		||||
        }
 | 
			
		||||
        return res;
 | 
			
		||||
    }
 | 
			
		||||
@@ -68,8 +68,8 @@ export class MembershipService {
 | 
			
		||||
    protected convertDateArrayFromServer(res: EntityArrayResponseType): EntityArrayResponseType {
 | 
			
		||||
        if (res.body) {
 | 
			
		||||
            res.body.forEach((membership: IMembership) => {
 | 
			
		||||
                membership.sinceDate = membership.sinceDate != null ? moment(membership.sinceDate) : null;
 | 
			
		||||
                membership.untilDate = membership.untilDate != null ? moment(membership.untilDate) : null;
 | 
			
		||||
                membership.from = membership.from != null ? moment(membership.from) : null;
 | 
			
		||||
                membership.to = membership.to != null ? moment(membership.to) : null;
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
        return res;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								src/main/webapp/app/entities/sepa-mandate/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								src/main/webapp/app/entities/sepa-mandate/index.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
export * from './sepa-mandate.service';
 | 
			
		||||
export * from './sepa-mandate-update.component';
 | 
			
		||||
export * from './sepa-mandate-delete-dialog.component';
 | 
			
		||||
export * from './sepa-mandate-detail.component';
 | 
			
		||||
export * from './sepa-mandate.component';
 | 
			
		||||
export * from './sepa-mandate.route';
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
<form name="deleteForm" (ngSubmit)="confirmDelete(contact.id)">
 | 
			
		||||
<form name="deleteForm" (ngSubmit)="confirmDelete(sepaMandate.id)">
 | 
			
		||||
    <div class="modal-header">
 | 
			
		||||
        <h4 class="modal-title" jhiTranslate="entity.delete.title">Confirm delete operation</h4>
 | 
			
		||||
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
 | 
			
		||||
@@ -6,13 +6,13 @@
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="modal-body">
 | 
			
		||||
        <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
        <p id="jhi-delete-contact-heading" jhiTranslate="hsadminNgApp.contact.delete.question" [translateValues]="{id: contact.id}">Are you sure you want to delete this Contact?</p>
 | 
			
		||||
        <p id="jhi-delete-sepaMandate-heading" jhiTranslate="hsadminNgApp.sepaMandate.delete.question" [translateValues]="{id: sepaMandate.id}">Are you sure you want to delete this Sepa Mandate?</p>
 | 
			
		||||
    </div>
 | 
			
		||||
    <div class="modal-footer">
 | 
			
		||||
        <button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="clear()">
 | 
			
		||||
            <fa-icon [icon]="'ban'"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
 | 
			
		||||
        </button>
 | 
			
		||||
        <button id="jhi-confirm-delete-contact" type="submit" class="btn btn-danger">
 | 
			
		||||
        <button id="jhi-confirm-delete-sepaMandate" type="submit" class="btn btn-danger">
 | 
			
		||||
            <fa-icon [icon]="'times'"></fa-icon> <span jhiTranslate="entity.action.delete">Delete</span>
 | 
			
		||||
        </button>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -4,18 +4,18 @@ import { ActivatedRoute, Router } from '@angular/router';
 | 
			
		||||
import { NgbActiveModal, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
 | 
			
		||||
import { JhiEventManager } from 'ng-jhipster';
 | 
			
		||||
 | 
			
		||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
 | 
			
		||||
import { CustomerContactService } from './customer-contact.service';
 | 
			
		||||
import { ISepaMandate } from 'app/shared/model/sepa-mandate.model';
 | 
			
		||||
import { SepaMandateService } from './sepa-mandate.service';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-customer-contact-delete-dialog',
 | 
			
		||||
    templateUrl: './customer-contact-delete-dialog.component.html'
 | 
			
		||||
    selector: 'jhi-sepa-mandate-delete-dialog',
 | 
			
		||||
    templateUrl: './sepa-mandate-delete-dialog.component.html'
 | 
			
		||||
})
 | 
			
		||||
export class CustomerContactDeleteDialogComponent {
 | 
			
		||||
    customerContact: ICustomerContact;
 | 
			
		||||
export class SepaMandateDeleteDialogComponent {
 | 
			
		||||
    sepaMandate: ISepaMandate;
 | 
			
		||||
 | 
			
		||||
    constructor(
 | 
			
		||||
        protected customerContactService: CustomerContactService,
 | 
			
		||||
        protected sepaMandateService: SepaMandateService,
 | 
			
		||||
        public activeModal: NgbActiveModal,
 | 
			
		||||
        protected eventManager: JhiEventManager
 | 
			
		||||
    ) {}
 | 
			
		||||
@@ -25,10 +25,10 @@ export class CustomerContactDeleteDialogComponent {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    confirmDelete(id: number) {
 | 
			
		||||
        this.customerContactService.delete(id).subscribe(response => {
 | 
			
		||||
        this.sepaMandateService.delete(id).subscribe(response => {
 | 
			
		||||
            this.eventManager.broadcast({
 | 
			
		||||
                name: 'customerContactListModification',
 | 
			
		||||
                content: 'Deleted an customerContact'
 | 
			
		||||
                name: 'sepaMandateListModification',
 | 
			
		||||
                content: 'Deleted an sepaMandate'
 | 
			
		||||
            });
 | 
			
		||||
            this.activeModal.dismiss(true);
 | 
			
		||||
        });
 | 
			
		||||
@@ -36,29 +36,29 @@ export class CustomerContactDeleteDialogComponent {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
    selector: 'jhi-customer-contact-delete-popup',
 | 
			
		||||
    selector: 'jhi-sepa-mandate-delete-popup',
 | 
			
		||||
    template: ''
 | 
			
		||||
})
 | 
			
		||||
export class CustomerContactDeletePopupComponent implements OnInit, OnDestroy {
 | 
			
		||||
export class SepaMandateDeletePopupComponent implements OnInit, OnDestroy {
 | 
			
		||||
    protected ngbModalRef: NgbModalRef;
 | 
			
		||||
 | 
			
		||||
    constructor(protected activatedRoute: ActivatedRoute, protected router: Router, protected modalService: NgbModal) {}
 | 
			
		||||
 | 
			
		||||
    ngOnInit() {
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ customerContact }) => {
 | 
			
		||||
        this.activatedRoute.data.subscribe(({ sepaMandate }) => {
 | 
			
		||||
            setTimeout(() => {
 | 
			
		||||
                this.ngbModalRef = this.modalService.open(CustomerContactDeleteDialogComponent as Component, {
 | 
			
		||||
                this.ngbModalRef = this.modalService.open(SepaMandateDeleteDialogComponent as Component, {
 | 
			
		||||
                    size: 'lg',
 | 
			
		||||
                    backdrop: 'static'
 | 
			
		||||
                });
 | 
			
		||||
                this.ngbModalRef.componentInstance.customerContact = customerContact;
 | 
			
		||||
                this.ngbModalRef.componentInstance.sepaMandate = sepaMandate;
 | 
			
		||||
                this.ngbModalRef.result.then(
 | 
			
		||||
                    result => {
 | 
			
		||||
                        this.router.navigate(['/customer-contact', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.ngbModalRef = null;
 | 
			
		||||
                    },
 | 
			
		||||
                    reason => {
 | 
			
		||||
                        this.router.navigate(['/customer-contact', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.router.navigate(['/sepa-mandate', { outlets: { popup: null } }]);
 | 
			
		||||
                        this.ngbModalRef = null;
 | 
			
		||||
                    }
 | 
			
		||||
                );
 | 
			
		||||
@@ -0,0 +1,65 @@
 | 
			
		||||
<div class="row justify-content-center">
 | 
			
		||||
    <div class="col-8">
 | 
			
		||||
        <div *ngIf="sepaMandate">
 | 
			
		||||
            <h2><span jhiTranslate="hsadminNgApp.sepaMandate.detail.title">Sepa Mandate</span> {{sepaMandate.id}}</h2>
 | 
			
		||||
            <hr>
 | 
			
		||||
            <jhi-alert-error></jhi-alert-error>
 | 
			
		||||
            <dl class="row-md jh-entity-details">
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.reference">Reference</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.reference}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.iban">Iban</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.iban}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.bic">Bic</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.bic}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.created">Created</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.created}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.validFrom">Valid From</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.validFrom}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.validTo">Valid To</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.validTo}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.lastUsed">Last Used</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.lastUsed}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.cancelled">Cancelled</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.cancelled}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.comment">Comment</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <span>{{sepaMandate.comment}}</span>
 | 
			
		||||
                </dd>
 | 
			
		||||
                <dt><span jhiTranslate="hsadminNgApp.sepaMandate.customer">Customer</span></dt>
 | 
			
		||||
                <dd>
 | 
			
		||||
                    <div *ngIf="sepaMandate.customerId">
 | 
			
		||||
                        <a [routerLink]="['/customer', sepaMandate.customerId, 'view']">{{sepaMandate.customerPrefix}}</a>
 | 
			
		||||
                    </div>
 | 
			
		||||
                </dd>
 | 
			
		||||
            </dl>
 | 
			
		||||
 | 
			
		||||
            <button type="submit"
 | 
			
		||||
                    (click)="previousState()"
 | 
			
		||||
                    class="btn btn-info">
 | 
			
		||||
                <fa-icon [icon]="'arrow-left'"></fa-icon> <span jhiTranslate="entity.action.back"> Back</span>
 | 
			
		||||
            </button>
 | 
			
		||||
 | 
			
		||||
            <button type="button"
 | 
			
		||||
                    [routerLink]="['/sepa-mandate', sepaMandate.id, 'edit']"
 | 
			
		||||
                    class="btn btn-primary">
 | 
			
		||||
                <fa-icon [icon]="'pencil-alt'"></fa-icon> <span jhiTranslate="entity.action.edit"> Edit</span>
 | 
			
		||||
            </button>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user