Seitenhistorie
...
Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Debitorenbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.
Hinweis |
---|
Bitte beachten Sie außerdem, dass das generische "<T>" in den Zeilen 36 und 84 entsprechend ersetzt werden muss. |
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; /** * 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<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 getDebitorWrapper(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 getDebitorWrapper(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; } } |
...
Überblick
Inhalte