Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Hinweis

Bitte beachten Sie außerdem, dass das generische "<T>" in den Zeilen 33 und 65 entsprechend ersetzt werden muss.

 

 

Codeblock
languagejava
titleorg.nuclet.sepa.facade.ReferenceFacade
linenumberstrue
collapsetrue
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();            
    
    
    /**
     * 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)
    {
        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;
    } 
        
}

...

Ein Beispiel dazu ist jeweils in einem Kommentarblock angegeben, dieses Beispiel ist an das tatsächlich genutzte Zahlungsreferenzbusinessobjekt (bzw. dessen BusinessObject-Klasse) anzupassen.

Hinweis

Bitte beachten Sie außerdem, dass das generische "<T>" in den Zeilen 36 und 67 entsprechend ersetzt werden muss.

Codeblock
languagejava
titleorg.nuclet.sepa.facade.PaymentReferenceFacade
linenumberstrue
collapsetrue
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  * @return the actual payment reference objects, wrapped inside an <code>AbstractPaymentReferenceWrapper</code>
     *
     */
    public AbstractPaymentReferenceWrapper getPaymentReferenceWrapper(final Modifiable 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>Class<T> getWrappedClass() // @replace! public Class<ClientBillingPosition> getWrappedClass()
    {
        // @replace! 
        //
        // return ClientBillingPosition.class;
        
        return null;
    } 
    
    /**
     * Get the attribue, that identifies the SEPA payment information
 *    * 
     * @return the attribue, that identifies the SEPA payment information
     *
     */
    protected ForeignKeyAttribute<Long> getSEPAPaymentInformationAttribute()
    {
        // @replace!
        //
        // return ClientBillingPosition.SEPAPaymentInformation;
        
        return null;
    }
        
}