HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-07-27 081a95257cf142268e20e6c02c1d381a87283671
clean code
2 files modified
105 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/cust/Contact.java 51 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/cust/CustomersTariff.java 54 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/cust/Contact.java
@@ -4,70 +4,77 @@
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import de.hsadmin.core.model.AbstractEntity;
import de.hsadmin.mods.user.UnixUser;
@javax.persistence.Entity(name = "Contacts")
@javax.persistence.Table(name = "contact")
@Entity(name = "Contacts")
@Table(name = "contact")
public class Contact extends AbstractEntity implements Serializable {
    private static final long serialVersionUID = 9119607911598098558L;
    @javax.persistence.Id
    @javax.persistence.GeneratedValue(strategy = GenerationType.IDENTITY)
    @javax.persistence.Column(name = "contact_id", columnDefinition = "integer")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "contact_id", columnDefinition = "integer")
    private long id;
    @javax.persistence.JoinColumn(name = "bp_id", columnDefinition = "integer")
    @javax.persistence.ManyToOne(fetch = EAGER)
    @JoinColumn(name = "bp_id", columnDefinition = "integer")
    @ManyToOne(fetch = EAGER)
    private Customer customer;
    @javax.persistence.Column(name = "salut", columnDefinition = "character varying(30)")
    @Column(name = "salut", columnDefinition = "character varying(30)")
    private String salut;
    @javax.persistence.Column(name = "first_name", columnDefinition = "character varying(40)")
    @Column(name = "first_name", columnDefinition = "character varying(40)")
    private String firstName;
    @javax.persistence.Column(name = "last_name", columnDefinition = "character varying(40)")
    @Column(name = "last_name", columnDefinition = "character varying(40)")
    private String lastName;
    @javax.persistence.Column(name = "title", columnDefinition = "character varying(20)")
    @Column(name = "title", columnDefinition = "character varying(20)")
    private String title;
    @javax.persistence.Column(name = "firma", columnDefinition = "character varying(120)")
    @Column(name = "firma", columnDefinition = "character varying(120)")
    private String firma;
    @javax.persistence.Column(name = "co", columnDefinition = "character varying(50)")
    @Column(name = "co", columnDefinition = "character varying(50)")
    private String co;
    @javax.persistence.Column(name = "street", columnDefinition = "character varying(50)")
    @Column(name = "street", columnDefinition = "character varying(50)")
    private String street;
    @javax.persistence.Column(name = "zipcode", columnDefinition = "character varying(10)")
    @Column(name = "zipcode", columnDefinition = "character varying(10)")
    private String zipCode;
    @javax.persistence.Column(name = "city", columnDefinition = "character varying(40)")
    @Column(name = "city", columnDefinition = "character varying(40)")
    private String city;
    @javax.persistence.Column(name = "country", columnDefinition = "character varying(30)")
    @Column(name = "country", columnDefinition = "character varying(30)")
    private String country;
    @javax.persistence.Column(name = "phone_private", columnDefinition = "character varying(30)")
    @Column(name = "phone_private", columnDefinition = "character varying(30)")
    private String phonePrivate;
    @javax.persistence.Column(name = "phone_office", columnDefinition = "character varying(30)")
    @Column(name = "phone_office", columnDefinition = "character varying(30)")
    private String phoneOffice;
    @javax.persistence.Column(name = "phone_mobile", columnDefinition = "character varying(30)")
    @Column(name = "phone_mobile", columnDefinition = "character varying(30)")
    private String phoneMobile;
    @javax.persistence.Column(name = "fax", columnDefinition = "character varying(30)")
    @Column(name = "fax", columnDefinition = "character varying(30)")
    private String fax;
    @javax.persistence.Column(name = "email", columnDefinition = "character varying(50)")
    @Column(name = "email", columnDefinition = "character varying(50)")
    private String email;
    public Contact() {
hsarback/src/de/hsadmin/mods/cust/CustomersTariff.java
@@ -5,57 +5,65 @@
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import de.hsadmin.core.model.AbstractEntity;
import de.hsadmin.mods.user.UnixUser;
@javax.persistence.Entity(name = "CustomersTariffs")
@javax.persistence.Table(name = "billdata")
@Entity(name = "CustomersTariffs")
@Table(name = "billdata")
public class CustomersTariff extends AbstractEntity implements Serializable {
    
    private static final long serialVersionUID = -3628577459027111705L;
    @javax.persistence.Id
    @javax.persistence.GeneratedValue(strategy = GenerationType.IDENTITY)
    @javax.persistence.Column(name = "billdata_id", columnDefinition = "integer")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "billdata_id", columnDefinition = "integer")
    private long id;
    @javax.persistence.JoinColumn(name = "bp_id", columnDefinition = "integer")
    @javax.persistence.OneToOne(fetch = EAGER)
    @JoinColumn(name = "bp_id", columnDefinition = "integer")
    @OneToOne(fetch = EAGER)
    private Customer customer;
    @javax.persistence.Column(name = "tariff_domain_discount_since", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_domain_discount_since", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date domainDiscountSince;
    @javax.persistence.Column(name = "tariff_domain_discount_until", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_domain_discount_until", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date domainDiscountUntil;
    @javax.persistence.Column(name = "tariff_traffic_discount_since", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_traffic_discount_since", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date trafficDiscountSince;
    @javax.persistence.Column(name = "tariff_traffic_discount_until", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_traffic_discount_until", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date trafficDiscountUntil;
    @javax.persistence.Column(name = "tariff_quota_discount_since", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_quota_discount_since", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date quotaDiscountSince;
    @javax.persistence.Column(name = "tariff_quota_discount_until", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_quota_discount_until", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date quotaDiscountUntil;
    @javax.persistence.Column(name = "tariff_discount_since", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_discount_since", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date discountSince;
    @javax.persistence.Column(name = "tariff_discount_until", columnDefinition = "date")
    @javax.persistence.Temporal(javax.persistence.TemporalType.DATE)
    @Column(name = "tariff_discount_until", columnDefinition = "date")
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date discountUntil;
    public CustomersTariff() {