Seitenhistorie
...
Codeblock | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
package org.nuclet.mt940sepa.facade; import java.util.ArrayList; import java.util.List; import org.nuclos.api.businessobject.BusinessObject; import org.nuclos.api.businessobject.Query; import org.nuclos.api.businessobject.QueryOperation; import org.nuclos.api.businessobject.SearchExpression; import org.nuclos.api.businessobject.attribute.PrimaryKeyAttribute; import org.nuclos.api.businessobject.facade.Stateful; import org.nuclos.api.context.JobContext; import org.nuclos.api.context.RuleContextfacade.Modifiable; import org.nuclos.api.exception.BusinessException; import org.nuclos.api.provider.QueryProvider; import org.nuclos.api.provider.BusinessObjectProvider; import org.nuclos.api.statemodel.State; import org.nuclet.common.facade.AbstractFacade; import org.nuclet.mt940.statemodel.ReferenceStatemodel; import org.nuclet.mt940.sepa.wrapper.AbstractReferenceWrapper; import org.nuclet.mt940sepa.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.10 * @date 2021.0203.2014 * @nuclet org.nuclet.MT940SEPA * @nucletversion 1.40.0 * @sincenucletversion 1.20.0 * @since 2021.09.201303.2014 * * @author frank.lehmann@nuclos.de * */ public class ReferenceFacade<T extends BusinessObject & Stateful>Modifiable> extends AbstractReferenceFacade<T>AbstractReferenceFacade<Rechnung> { private static final ReferenceFacade instance = new ReferenceFacade(); /** * Liefert die Singleton-Instanz dieser Klasse * */ public static ReferenceFacade getInstance() { return instance; } /** * Liefert eine Liste von Quellzuständen zum gegebenen Statuswechsel. * * @param stateChange Der Statuswechsel, repräsentiert durch ein Objekt vom Typ <code>StateChange</code>. * * @return eine Liste von Quellzuständen zum gegebenen Statuswechsel * */ public List<State> getSourceStates(final ReferenceStatemodel.StateChange stateChange) { final List<State> lstSourceStates = new ArrayList<State>(); switch (stateChange) { case PaymentReceived: // @replace Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // lstSourceStateIds.add(ProcessClientBillingSM.State_AB); // lstSourceStateIds.add(ProcessClientBillingSM.State_XY); break; default: break; } return lstSourceStates; } /** * Liefert den Zielzustand zum gegebenen Statuswechsel. * * @param stateChange Der Statuswechsel, repräsentiert durch ein Objekt vom Typ <code>StateChange</code>. * * @return der Zielzustand von Quellzuständen zum gegebenen Statuswechsel * */ public State getDestinationState(final ReferenceStatemodel.StateChange stateChange) { switch (stateChange) { case PaymentReceived: // @replace Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // return ProcessClientBillingSM.State_ZZ; // return null; default: return null; } } /** * 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 BusinessObjectModifiable boReference) { // @replace! // // return new ReferenceWrapper(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>Class<Rechnung> getWrappedClass() { // @replace! // // return ClientBilling.class; return nullRechnung.class; } /** * Get the attribute <code>NuclosState</code> of the actual reference objects * * @return the attribute <code>NuclosState</code> of the actual reference objects * */ public PrimaryKeyAttribute<State> getNuclosStateAttribute() { // @replace! Bitte bei Nuclet-Integration mit eigenem Code ersetzen! // // Beispiel: // // ClientBilling.NuclosState; return null; } } |
Überblick
Inhalte