diff --git a/hsarback/src/de/hsadmin/mods/cust/Customer.java b/hsarback/src/de/hsadmin/mods/cust/Customer.java index 3d87efe..add367f 100644 --- a/hsarback/src/de/hsadmin/mods/cust/Customer.java +++ b/hsarback/src/de/hsadmin/mods/cust/Customer.java @@ -93,8 +93,8 @@ public class Customer extends AbstractEntity implements Serializable { @OneToMany(fetch = EAGER, cascade = ALL, mappedBy = "customer") private Set contacts; - @OneToOne(fetch = EAGER, cascade = ALL, mappedBy = "customer") - private BankAccount bankAccount; +// @OneToOne(fetch = EAGER, cascade = ALL, mappedBy = "customer") +// private BankAccount bankAccount; @OneToMany(fetch = LAZY, cascade = ALL, mappedBy = "customer") @OrderBy("name") @@ -233,13 +233,13 @@ public class Customer extends AbstractEntity implements Serializable { contacts.add(contact); } - public BankAccount getBankAccount() { - return bankAccount; - } - - public void setBankAccount(BankAccount bankAccount) { - this.bankAccount = bankAccount; - } +// public BankAccount getBankAccount() { +// return bankAccount; +// } +// +// public void setBankAccount(BankAccount bankAccount) { +// this.bankAccount = bankAccount; +// } public Set getPacs() { return pacs; diff --git a/hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java b/hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java index 042983d..7ce9c41 100644 --- a/hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java +++ b/hsarback/src/de/hsadmin/mods/cust/CustomerModuleImpl.java @@ -36,12 +36,12 @@ public class CustomerModuleImpl extends AbstractModuleImpl { if (contact.getFirstName() != null && contact.getFirstName().length() > 0) { custComment = contact.getFirstName() + " " + contact.getLastName(); } - BankAccount bankAccount = newCustomer.getBankAccount(); - if (bankAccount == null) { - bankAccount = new BankAccount(); - bankAccount.setCustomer(newCustomer); - newCustomer.setBankAccount(bankAccount); - } +// BankAccount bankAccount = newCustomer.getBankAccount(); +// if (bankAccount == null) { +// bankAccount = new BankAccount(); +// bankAccount.setCustomer(newCustomer); +// newCustomer.setBankAccount(bankAccount); +// } GenericModuleImpl helperModule = new GenericModuleImpl(getTransaction()); UnixUser custAccount = new UnixUser(); diff --git a/hsarback/src/de/hsadmin/remote/CustomerRemote.java b/hsarback/src/de/hsadmin/remote/CustomerRemote.java index 1b8a20c..4b96975 100644 --- a/hsarback/src/de/hsadmin/remote/CustomerRemote.java +++ b/hsarback/src/de/hsadmin/remote/CustomerRemote.java @@ -47,17 +47,17 @@ public class CustomerRemote extends AbstractRemote { } resultMap.put("sharessigned", Integer.toString(cust.getSharesSigned())); resultMap.put("uidvat", cust.getUidVAT()); - BankAccount bank = cust.getBankAccount(); - if (bank != null) { - resultMap.put("autodebit_ga", bank.getAutoDebitGA() != null && bank.getAutoDebitGA() ? "Yes" : "No"); - resultMap.put("autodebit_ar", bank.getAutoDebitAR() != null && bank.getAutoDebitAR() ? "Yes" : "No"); - resultMap.put("autodebit_op", bank.getAutoDebitOP() != null && bank.getAutoDebitOP() ? "Yes" : "No"); - resultMap.put("bank_customer", bank.getBankCustomer()); - resultMap.put("bank_iban", bank.getBankIBAN()); - resultMap.put("bank_bic", bank.getBankBIC()); - resultMap.put("bank_name", bank.getBankName()); - resultMap.put("mandat_ref", bank.getMandatRef()); - } +// BankAccount bank = cust.getBankAccount(); +// if (bank != null) { +// resultMap.put("autodebit_ga", bank.getAutoDebitGA() != null && bank.getAutoDebitGA() ? "Yes" : "No"); +// resultMap.put("autodebit_ar", bank.getAutoDebitAR() != null && bank.getAutoDebitAR() ? "Yes" : "No"); +// resultMap.put("autodebit_op", bank.getAutoDebitOP() != null && bank.getAutoDebitOP() ? "Yes" : "No"); +// resultMap.put("bank_customer", bank.getBankCustomer()); +// resultMap.put("bank_iban", bank.getBankIBAN()); +// resultMap.put("bank_bic", bank.getBankBIC()); +// resultMap.put("bank_name", bank.getBankName()); +// resultMap.put("mandat_ref", bank.getMandatRef()); +// } Set contacts = cust.getContacts(); if (contacts != null && !contacts.isEmpty()) { Contact c = contacts.iterator().next(); @@ -131,44 +131,44 @@ public class CustomerRemote extends AbstractRemote { if (assertNotNull(uidVat)) { cust.setUidVAT(uidVat); } - BankAccount bank = cust.getBankAccount(); - if (bank == null) { - bank = new BankAccount(); - bank.setCustomer(cust); - cust.setBankAccount(bank); - bank.setMandatRef(memberNo); - } - String autoDebitGA = (String) setParams.get("autodebit_ga"); - if (assertNotNull(autoDebitGA)) { - autoDebitGA = autoDebitGA.toUpperCase(); - bank.setAutoDebitGA(new Boolean(autoDebitGA.startsWith("T") || autoDebitGA.startsWith("Y"))); - } - String autoDebitAR = (String) setParams.get("autodebit_ar"); - if (assertNotNull(autoDebitAR)) { - autoDebitAR = autoDebitAR.toUpperCase(); - bank.setAutoDebitAR(new Boolean(autoDebitAR.startsWith("T") || autoDebitAR.startsWith("Y"))); - } - String autoDebitOP = (String) setParams.get("autodebit_op"); - if (assertNotNull(autoDebitOP)) { - autoDebitOP = autoDebitOP.toUpperCase(); - bank.setAutoDebitOP(new Boolean(autoDebitOP.startsWith("T") || autoDebitOP.startsWith("Y"))); - } - String bankCustomer = (String) setParams.get("bank_customer"); - if (assertNotNull(bankCustomer)) { - bank.setBankCustomer(bankCustomer); - } - String bankIBAN = (String) setParams.get("bank_iban"); - if (assertNotNull(bankIBAN)) { - bank.setBankIBAN(bankIBAN); - } - String bankBIC = (String) setParams.get("bank_bic"); - if (assertNotNull(bankBIC)) { - bank.setBankBIC(bankBIC); - } - String bankName = (String) setParams.get("bank_name"); - if (assertNotNull(bankName)) { - bank.setBankName(bankName); - } +// BankAccount bank = cust.getBankAccount(); +// if (bank == null) { +// bank = new BankAccount(); +// bank.setCustomer(cust); +// cust.setBankAccount(bank); +// bank.setMandatRef(memberNo); +// } +// String autoDebitGA = (String) setParams.get("autodebit_ga"); +// if (assertNotNull(autoDebitGA)) { +// autoDebitGA = autoDebitGA.toUpperCase(); +// bank.setAutoDebitGA(new Boolean(autoDebitGA.startsWith("T") || autoDebitGA.startsWith("Y"))); +// } +// String autoDebitAR = (String) setParams.get("autodebit_ar"); +// if (assertNotNull(autoDebitAR)) { +// autoDebitAR = autoDebitAR.toUpperCase(); +// bank.setAutoDebitAR(new Boolean(autoDebitAR.startsWith("T") || autoDebitAR.startsWith("Y"))); +// } +// String autoDebitOP = (String) setParams.get("autodebit_op"); +// if (assertNotNull(autoDebitOP)) { +// autoDebitOP = autoDebitOP.toUpperCase(); +// bank.setAutoDebitOP(new Boolean(autoDebitOP.startsWith("T") || autoDebitOP.startsWith("Y"))); +// } +// String bankCustomer = (String) setParams.get("bank_customer"); +// if (assertNotNull(bankCustomer)) { +// bank.setBankCustomer(bankCustomer); +// } +// String bankIBAN = (String) setParams.get("bank_iban"); +// if (assertNotNull(bankIBAN)) { +// bank.setBankIBAN(bankIBAN); +// } +// String bankBIC = (String) setParams.get("bank_bic"); +// if (assertNotNull(bankBIC)) { +// bank.setBankBIC(bankBIC); +// } +// String bankName = (String) setParams.get("bank_name"); +// if (assertNotNull(bankName)) { +// bank.setBankName(bankName); +// } Set contacts = cust.getContacts(); Contact c = null; if (contacts == null || contacts.isEmpty()) {