Seitenhistorie
...
Codeblock | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.wrapper.AbstractDebitorWrapper; import org.nuclet.sepa.wrapper.DebitorWrapper; // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // import org.nuclet.businesstemplate.Client; import de.bffs.Person; /** * Facade for Business Objects of type "Debitor" * * @version 1.0 * @date 21.03.2014 * @nuclet org.nuclet.SEPA * @nucletversion 1.0.0 * @sincenucletversion 1.0.0 * @since 21.03.2014 * * @author frank.lehmann@nuclos.de * */ public class DebitorFacade<T extends BusinessObject & Modifiable> extends AbstractDebitorFacade<Person> AbstractDebitorFacade<T> // replace! AbstractDebitorFacade<Client> { private static final DebitorFacade instance = new DebitorFacade(); /** * Liefert die Singleton-Instanz dieser Klasse * */ public static 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 getDebitorWrapper(final UpdateContext context) { // @replace! { // // return new DebitorWrapper(context.getBusinessObject(getWrappedClass())); return new DebitorWrapper(context.getBusinessObject(getWrappedClass())); } /** * Wrap the actual reference object inside an <code>AbstractReferenceWrapper</code> * } * @param boDebitor The actual reference object /** * @returnWrap the actual reference object, wrapped inside an <code>AbstractReferenceWrapper</code> * */ public AbstractDebitorWrapper getDebitorWrapper(final* Modifiable@param boDebitor) { The //actual @replace!reference object // // return new DebitorWrapper(boDebitor); * return new DebitorWrapper(boDebitor); } /** * Get@return the class of the actual reference objectsobject, i.e. the class wrapped by <code>DebitorWrapper<wrapped inside an <code>AbstractReferenceWrapper</code> * * @return the* class of the actual reference*/ objects, i.e. the classpublic wrappedAbstractDebitorWrapper by <code>DebitorWrapper</code> * */ public Class<Person> getWrappedClass() getDebitorWrapper(final Modifiable boDebitor) { // @replace! // // return Client.classnew DebitorWrapper(boDebitor); } return Person.class; } /** } |
4.7.2.2 ReferenceFacade
In der Klasse ReferenceFacade müssen drei Methoden implementiert werden:
- getReferenceWrapper(Modifiable) wandelt ein Referenz-Businessobjekt in ein Objekt vom Typ AbstractReferenceWrapper
- getWrappedClass() sollte die Java-Klasse des verwendeten Referenzobjektes zurückgeben
Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Referenzbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.
* 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;
}
} |
4.7.2.2 ReferenceFacade
In der Klasse ReferenceFacade müssen drei Methoden implementiert werden:
- getReferenceWrapper(Modifiable) wandelt ein Referenz-Businessobjekt in ein Objekt vom Typ AbstractReferenceWrapper
- getWrappedClass() sollte die Java-Klasse des verwendeten Referenzobjektes zurückgeben
Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Referenzbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.
Codeblock | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.AbstractReferenceWrapper;
import org.nuclet.sepa.wrapper.ReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// import org.nuclet.businesstemplate.ClientBilling;
/**
* Facade for Business Objects of type "Reference"
*
* @version 1.0
* @date 21.03.2014
* @nuclet org.nuclet.SEPA
* @nucletversion 1.0.0
* @sincenucletversion 1.0.0
* @since 21.03.2014
*
* @author frank.lehmann@nuclos.de
*
*/
public class ReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractReferenceFacade<T> // @replace public class<ClientBilling> getWrappedClass()
{
private static final ReferenceFacade instance = new ReferenceFacade(); | ||||||||
Codeblock | ||||||||
| ||||||||
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.AbstractReferenceWrapper; import org.nuclet.sepa.wrapper.ReferenceWrapper; // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // import org.nuclet.businesstemplate.ClientBilling; import de.bffs.Rechnung; /** * Facade for Business Objects of type "Reference" * * @version 1.0 * @date 21.03.2014 * @nuclet org.nuclet.SEPA * @nucletversion 1.0.0 * @sincenucletversion 1.0.0 * @since 21.03.2014 * * @author frank.lehmann@nuclos.de * */ public class ReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractReferenceFacade<Rechnung> { private static final ReferenceFacade instance = new ReferenceFacade(); /** * Liefert die Singleton-Instanz dieser Klasse * */ public static ReferenceFacade getInstance() { return instance; } /** * Wrap the actual reference objects inside an <code>AbstractReferenceWrapper</code> * * @return the actual reference objects, wrapped inside an <code>AbstractReferenceWrapper</code> * */ public AbstractReferenceWrapper getReferenceWrapper(final Modifiable boReference) { // @replace! // // return new ReferenceWrapper(boReference); return new ReferenceWrapper(boReference); } /** * Liefert Getdie theSingleton-Instanz classdieser ofKlasse the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code> * */ public static *ReferenceFacade getInstance() { * @return the class of the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code> return instance; } * */ public Class<Rechnung> getWrappedClass() { /** // @replace!* Wrap the actual reference objects inside an <code>AbstractReferenceWrapper<//code> * // return ClientBilling.class; * @return the actual reference objects, wrapped inside an <code>AbstractReferenceWrapper</code> return Rechnung.class;* } */ public AbstractReferenceWrapper } |
4.7.2.3 PaymentReferenceFacade
In der Klasse PaymentReferenceFacade müssen drei Methoden implementiert werden:
- getPaymentReferenceWrapper(Modifiable) wandelt ein Zahlungsreferenz-Businessobjekt in ein Objekt vom Typ AbstractPaymentReferenceWrapper
- getWrappedClass() sollte die Java-Klasse des verwendeten Zahlungsreferenzobjektes zurückgeben
Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Zahlungsreferenzbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.
getReferenceWrapper(final Modifiable boReference)
{
return new ReferenceWrapper(boReference);
}
/**
* Get the class of the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code>
*
* @return the class of the actual reference objects, i.e. the class wrapped by <code>ReferenceWrapper</code>
*
*/
public Class<T> getWrappedClass() // @replace public class<ClientBilling> getWrappedClass()
{
// @replace!
//
// return ClientBilling.class;
return null;
}
} |
4.7.2.3 PaymentReferenceFacade
In der Klasse PaymentReferenceFacade müssen drei Methoden implementiert werden:
- getPaymentReferenceWrapper(Modifiable) wandelt ein Zahlungsreferenz-Businessobjekt in ein Objekt vom Typ AbstractPaymentReferenceWrapper
- getWrappedClass() sollte die Java-Klasse des verwendeten Zahlungsreferenzobjektes zurückgeben
Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Zahlungsreferenzbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.
Codeblock | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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.wrapper.AbstractPaymentReferenceWrapper;
import org.nuclet.sepa.wrapper.PaymentReferenceWrapper;
// @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen!
//
// Beispiel:
//
// import org.nuclet.businesstemplate.ClientBillingPosition;
/**
* Facade for Business Objects of type "PaymentReference"
*
* @version 1.0
* @date 21.03.2014
* @nuclet org.nuclet.SEPA
* @nucletversion 1.0.0
* @sincenucletversion 1.0.0
* @since 21.03.2014
*
* @author frank.lehmann@nuclos.de
*
*/
public class PaymentReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractPaymentReferenceFacade<T> // @replace! AbstractPaymentReferenceFacade<ClientBillingPosition>
{
private static final PaymentReferenceFacade instance = new PaymentReferenceFacade();
/**
* Liefert die Singleton-Instanz dieser Klasse
*
*/
public static PaymentReferenceFacade getInstance()
{
return instance;
}
/**
* Wrap the actual payment reference objects inside an <code>AbstractPaymentReferenceWrapper</code>
*
* @return the actual payment reference objects, wrapped inside an <code>AbstractPaymentReferenceWrapper</code>
*
*/
public AbstractPaymentReferenceWrapper getPaymentReferenceWrapper(final Modifiable boPaymentReference)
{
| ||||||||
Codeblock | ||||||||
| ||||||||
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.Query; import org.nuclos.api.businessobject.QueryOperation; import org.nuclos.api.businessobject.SearchExpression; import org.nuclos.api.businessobject.attribute.ForeignKeyAttribute; import org.nuclos.api.businessobject.facade.Stateful; import org.nuclos.api.context.JobContext; import org.nuclos.api.context.RuleContext; import org.nuclos.api.exception.BusinessException; import org.nuclos.api.provider.QueryProvider; import org.nuclos.api.provider.BusinessObjectProvider; import org.nuclet.sepa.wrapper.AbstractPaymentReferenceWrapper; import org.nuclet.sepa.wrapper.PaymentReferenceWrapper; // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // import org.nuclet.businesstemplate.ClientBillingPosition; import de.bffs.Forderung; /** * Facade for Business Objects of type "PaymentReference" * * @version 1.0 * @date 21.03.2014 * @nuclet org.nuclet.SEPA * @nucletversion 1.0.0 * @sincenucletversion 1.0.0 * @since 21.03.2014 * * @author frank.lehmann@nuclos.de * */ public class PaymentReferenceFacade<T extends BusinessObject & Modifiable> extends AbstractPaymentReferenceFacade<Forderung> { private static final PaymentReferenceFacade instance = new PaymentReferenceFacade(); /** * Liefert die Singleton-Instanz dieser Klasse * */ public static PaymentReferenceFacade getInstance() { return instance; } /** * Wrap the actual payment reference objects inside an <code>AbstractPaymentReferenceWrapper</code> * * @return the actual payment reference objects, wrapped inside an <code>AbstractPaymentReferenceWrapper</code> * */ public AbstractPaymentReferenceWrapper getPaymentReferenceWrapper(final Modifiable boPaymentReference) { // @replace! // // return new PaymentReferenceWrapper(boPaymentReference); return new PaymentReferenceWrapper(boPaymentReference); } /** * Get the class of the actual payment reference objects, i.e. the class wrapped by <code>PaymentReferenceWrapper</code> * * @return the class of the actual payment reference objects, i.e. the class wrapped by <code>PaymentReferenceWrapper</code> * */ public Class<Forderung> getWrappedClass() { // @replace! public Class<ClientBillingPosition> getWrappedClass() { // @replace! // // return ClientBillingPosition.class; return null; } /** * Get the attribue, that identifies the SEPA payment return Forderung.class; } information * * @return the attribue, that identifies the SEPA payment information * */ protected ForeignKeyAttribute<Long> getSEPAPaymentInformationAttribute() { // @replace! // // return ClientBillingPosition.SEPAPaymentInformation; return Forderung.SepaZahlungsinfonull; } } |
...