SEPA Nuclet business object facades: defining the used classes and attributes for database access. |
Language: Deutsch · English
Define the actually used business object classes and attributes via facades so that the SEPA Nuclet's database accesses operate on your objects.
On this page |
This page was machine-translated from German as a first draft and is currently under review. The authoritative source remains the German original (see the language switch above). |
The SEPA Nuclet works with wrapper objects instead of the BusinessObjects known only to the target Nuclet (see section 4.8.1). Therefore, when integrating the SEPA Nuclet, it must be ensured that certain database accesses can operate on the actually used business objects, i.e. the classes and attribute names used must be known. This is provided via business-object-specific facades.
In addition, the facades provide wrapper methods that convert the actually used business objects into the wrapper objects defined in section 4.8.1.
You normally do not have to adjust these methods, provided you use the wrapper classes from the SEPA Nuclet.
When connecting the SEPA Nuclet, the following facade classes for debtors, references and payment references must be adjusted (the classes are all located in the Java package org.nuclet.sepa.facade):
| Facade class | Note | Function | Use case |
|---|---|---|---|
| CreditorFacade | new from v2.0.0 |
| Credit transfers |
| CreditorReferenceFacade | new from v2.0.0 |
| |
| CreditTransferReferenceFacade | new from v2.0.0 |
| |
| DebitorFacade | new from v2.0.0 |
| Direct debits |
| DebitorReferenceFacade | new from v2.0.0 |
| |
| DirectDebitReferenceFacade | new from v2.0.0 |
| |
replaced from v2.0.0 by DebitorReferenceFacade | obsolet |
| |
replaced from v2.0.0 by DirectDebitReferenceFacade | obsolet |
|
Table 4.8.2: Overview, adjustments in facade classes
One method must be implemented in the CreditorFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used debtor business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 37 and 84. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.context.UpdateContext;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.facade.AbstractCreditorFacade;
import org.nuclet.sepa.wrapper.AbstractCreditorWrapper;
import org.nuclet.sepa.wrapper.CreditorWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
//
// import org.nuclet.businesstemplate.Supplier;
/**
* Facade for Business Objects of type "Creditor"
*
* @version 1.0
* @date 30.01.2015
* @nuclet org.nuclet.SEPA
* @nucletversion 2.0.0
* @sincenucletversion 2.0.0
* @since 30.01.2015
*
* @author frank.lehmann@nuclos.de
*
*/
public class CreditorFacade<T extends BusinessObject & Modifiable> extends AbstractCreditorFacade<T> // replace! AbstractCreditorFacade<Supplier>
{
private static final CreditorFacade instance = new CreditorFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static CreditorFacade getInstance()
{
return instance;
}
/**
* Wrap the context's actual reference objects inside an <code>AbstractReferenceWrapper</code>
*
* @param context A given <code>UpdateContext</code>
*
* @return the context's actual reference object, wrapped inside an <code>AbstractReferenceWrapper</code>
*
*/
public AbstractCreditorWrapper getWrapper(final UpdateContext context)
{
return new CreditorWrapper(context.getBusinessObject(getWrappedClass()));
}
/**
* Wrap the actual reference object inside an <code>AbstractReferenceWrapper</code>
*
* @param boCreditor The actual reference object
*
* @return the actual reference object, wrapped inside an <code>AbstractReferenceWrapper</code>
*
*/
public AbstractCreditorWrapper getWrapper(final Modifiable boCreditor)
{
return new CreditorWrapper(boCreditor);
}
/**
* Get the class of the actual reference objects, i.e. the class wrapped by <code>CreditorWrapper</code>
*
* @return the class of the actual reference objects, i.e. the class wrapped by <code>CreditorWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace! public class<Supplier> getWrappedClass()
{
// @replace!
//
// return Supplier.class;
return null;
}
} |
Likewise, only one method must be implemented in the CreditorReferenceFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used reference business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 35 and 66. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.facade.AbstractCreditorReferenceFacade;
import org.nuclet.sepa.wrapper.AbstractCreditorReferenceWrapper;
import org.nuclet.sepa.wrapper.CreditorReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// import org.nuclet.businesstemplate.SupplierBilling;
/**
* Facade for Business Objects of type "Creditor Reference"
*
*
* @version 1.0
* @date 02.02.2015
* @nuclet org.nuclet.SEPA
* @nucletversion 2.0.0
* @sincenucletversion 2.0.0
* @since 02.02.2015
*
* @author frank.lehmann@nuclos.de
*
*/
public class CreditorReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractCreditorReferenceFacade<T> // @replace public class<ClientBilling> getWrappedClass()
{
private static final CreditorReferenceFacade instance = new CreditorReferenceFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static CreditorReferenceFacade getInstance()
{
return instance;
}
/**
* Wrap the actual reference objects inside an <code>AbstractCreditorReferenceWrapper</code>
*
* @return the actual reference objects, wrapped inside an <code>AbstractCreditorReferenceWrapper</code>
*
*/
public AbstractCreditorReferenceWrapper getWrapper(final Modifiable boReference)
{
return new CreditorReferenceWrapper(boReference);
}
/**
* Get the class of the actual reference objects, i.e. the class wrapped by <code>CreditorReferenceWrapper</code>
*
* @return the class of the actual reference objects, i.e. the class wrapped by <code>CreditorReferenceWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace public class<SupplierBilling> getWrappedClass()
{
// @replace!
//
// return SupplierBilling.class;
return null;
}
} |
Two methods must be implemented in the CreditTransferReferenceFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used payment reference business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 39 and 70. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.businessobject.attribute.ForeignKeyAttribute;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.facade.AbstractCreditTransferReferenceFacade;
import org.nuclet.sepa.wrapper.AbstractCreditTransferReferenceWrapper;
import org.nuclet.sepa.wrapper.CreditTransferReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
//
// import org.nuclet.businesstemplate.SupplierBillingPosition;
/**
* Facade for Business Objects of type "CreditTransferReference"
*
* @note replaces the original class PaymentReferenceFacade
*
* @version 1.0
* @date 02.02.2015
* @nuclet org.nuclet.SEPA
* @nucletversion 2.0.0
* @sincenucletversion 2.0.0
* @since 02.02.2015
*
* @author frank.lehmann@nuclos.de
*
*/
public class CreditTransferReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractCreditTransferReferenceFacade<T> // @replace! AbstractCreditTransferReferenceFacade<SupplierBillingPosition>
{
private static final CreditTransferReferenceFacade instance = new CreditTransferReferenceFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static CreditTransferReferenceFacade getInstance()
{
return instance;
}
/**
* Wrap the actual payment reference objects inside an <code>AbstractCreditTransferReferenceWrapper</code>
*
* @return the actual payment reference objects, wrapped inside an <code>AbstractCreditTransferReferenceWrapper</code>
*
*/
public AbstractCreditTransferReferenceWrapper getWrapper(final Modifiable boDirectDebitReference)
{
return new CreditTransferReferenceWrapper(boDirectDebitReference);
}
/**
* Get the class of the actual payment reference objects, i.e. the class wrapped by <code>CreditTransferReferenceWrapper</code>
*
* @return the class of the actual payment reference objects, i.e. the class wrapped by <code>CreditTransferReferenceWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace! public Class<SupplierBillingPosition> getWrappedClass()
{
// @replace!
//
// return SupplierBillingPosition.class;
return null;
}
/**
* Get the attribue, that identifies the SEPA transaction
*
* @return the attribue, that identifies the SEPA transaction
*
*/
protected ForeignKeyAttribute<Long> getSEPATransactionIdAttribute()
{
// @replace!
//
// return SupplierBillingPosition.SEPATransactionId;
return null;
}
} |
One method must be implemented in the DebitorFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used debtor business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 36 and 84. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.context.UpdateContext;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.facade.AbstractDebitorFacade;
import org.nuclet.sepa.wrapper.AbstractDebitorWrapper;
import org.nuclet.sepa.wrapper.DebitorWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
//
// import org.nuclet.businesstemplate.Client;
/**
* Facade for Business Objects of type "Debitor"
*
* @version 1.0
* @date 21.03.2014
* @nuclet org.nuclet.SEPA
* @nucletversion 1.1.4
* @sincenucletversion 1.0.0
* @since 21.03.2014
*
* @author frank.lehmann@nuclos.de
*
*/
public class DebitorFacade<T extends BusinessObject & Modifiable> extends AbstractDebitorFacade<T> // replace! AbstractDebitorFacade<Client>
{
private static final DebitorFacade instance = new DebitorFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static DebitorFacade getInstance()
{
return instance;
}
/**
* Wrap the context's actual reference objects inside an <code>AbstractReferenceWrapper</code>
*
* @param context A given <code>UpdateContext</code>
*
* @return the context's actual reference object, wrapped inside an <code>AbstractReferenceWrapper</code>
*
*/
public AbstractDebitorWrapper getWrapper(final UpdateContext context)
{
return new DebitorWrapper(context.getBusinessObject(getWrappedClass()));
}
/**
* Wrap the actual reference object inside an <code>AbstractReferenceWrapper</code>
*
* @param boDebitor The actual reference object
*
* @return the actual reference object, wrapped inside an <code>AbstractReferenceWrapper</code>
*
*/
public AbstractDebitorWrapper getWrapper(final Modifiable boDebitor)
{
return new DebitorWrapper(boDebitor);
}
/**
* Get the class of the actual reference objects, i.e. the class wrapped by <code>DebitorWrapper</code>
*
* @return the class of the actual reference objects, i.e. the class wrapped by <code>DebitorWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace! public class<Client> getWrappedClass()
{
// @replace!
//
// return Client.class;
return null;
}
} |
Likewise, only one method must be implemented in the DebitorReferenceFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used reference business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 35 and 66. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.wrapper.AbstractDebitorReferenceWrapper;
import org.nuclet.sepa.wrapper.DebitorReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// import org.nuclet.businesstemplate.ClientBilling;
/**
* Facade for Business Objects of type "Debitor Reference"
*
* @note replaces the original class ReferenceFacade
*
* @version 1.0
* @date 30.01.2015
* @nuclet org.nuclet.SEPA
* @nucletversion 2.0.0
* @sincenucletversion 2.0.0
* @since 30.01.2015
*
* @author frank.lehmann@nuclos.de
*
*/
public class DebitorReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractDebitorReferenceFacade<T> // @replace public class<ClientBilling> getWrappedClass()
{
private static final DebitorReferenceFacade instance = new DebitorReferenceFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static DebitorReferenceFacade getInstance()
{
return instance;
}
/**
* Wrap the actual reference objects inside an <code>AbstractDebitorReferenceWrapper</code>
*
* @return the actual reference objects, wrapped inside an <code>AbstractDebitorReferenceWrapper</code>
*
*/
public AbstractDebitorReferenceWrapper getWrapper(final Modifiable boReference)
{
return new DebitorReferenceWrapper(boReference);
}
/**
* Get the class of the actual reference objects, i.e. the class wrapped by <code>DebitorReferenceWrapper</code>
*
* @return the class of the actual reference objects, i.e. the class wrapped by <code>DebitorReferenceWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace public class<ClientBilling> getWrappedClass()
{
// @replace!
//
// return ClientBilling.class;
return null;
}
} |
Two methods must be implemented in the DirectDebitReferenceFacade class:
An example is given in each case in a comment block; this example must be adapted to the actually used payment reference business object (or its BusinessObject class).
Please also note that the generic "<T>" must be replaced accordingly in lines 39 and 70. |
package org.nuclet.sepa.facade;
import java.util.ArrayList;
import java.util.List;
import org.nuclos.api.businessobject.BusinessObject;
import org.nuclos.api.businessobject.facade.Modifiable;
import org.nuclos.api.businessobject.attribute.ForeignKeyAttribute;
import org.nuclos.api.exception.BusinessException;
import org.nuclet.sepa.facade.AbstractDirectDebitReferenceFacade;
import org.nuclet.sepa.wrapper.AbstractDirectDebitReferenceWrapper;
import org.nuclet.sepa.wrapper.DirectDebitReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
//
// import org.nuclet.businesstemplate.ClientBillingPosition;
/**
* Facade for Business Objects of type "DirectDebitReference"
*
* @note replaces the original class PaymentReferenceFacade
*
* @version 1.0
* @date 30.01.2015
* @nuclet org.nuclet.SEPA
* @nucletversion 2.0.0
* @sincenucletversion 2.0.0
* @since 30.01.2015
*
* @author frank.lehmann@nuclos.de
*
*/
public class DirectDebitReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractDirectDebitReferenceFacade<T> // @replace! AbstractPaymentReferenceFacade<ClientBillingPosition>
{
private static final DirectDebitReferenceFacade instance = new DirectDebitReferenceFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static DirectDebitReferenceFacade getInstance()
{
return instance;
}
/**
* Wrap the actual payment reference objects inside an <code>AbstractDirectDebitReferenceWrapper</code>
*
* @return the actual payment reference objects, wrapped inside an <code>AbstractDirectDebitReferenceWrapper</code>
*
*/
public AbstractDirectDebitReferenceWrapper getWrapper(final Modifiable boDirectDebitReference)
{
return new DirectDebitReferenceWrapper(boDirectDebitReference);
}
/**
* Get the class of the actual payment reference objects, i.e. the class wrapped by <code>DirectDebitReferenceWrapper</code>
*
* @return the class of the actual payment reference objects, i.e. the class wrapped by <code>DirectDebitReferenceWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace! public Class<ClientBillingPosition> getWrappedClass()
{
// @replace!
//
// return ClientBillingPosition.class;
return null;
}
/**
* Get the attribue, that identifies the SEPA transaction
*
* @return the attribue, that identifies the SEPA transaction
*
*/
protected ForeignKeyAttribute<Long> getSEPATransactionIdAttribute()
{
// @replace!
//
// return ClientBillingPosition.SEPAPaymentInformation;
return null;
}
} |