Package DataFieldTest

Source Code of DataFieldTest.DataFactory

package DataFieldTest;

import DataFieldTest.DataFieldsObject;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import Framework.DateTimeData;
import Framework.IntervalData;
import Framework.RuntimeProperties;
import Framework.TextData;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.String;

/**
* DataFactory<p>
* <p>
* @author Generated from Forte
* @since  19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@SuppressWarnings("serial")
public class DataFactory
        implements Serializable, Observable
{

    // ---------
    // Constants
    // ---------
    public static final int SET_ONE = 1;
    public static final int SET_TWO = 2;

    // ----------
    // Attributes
    // ----------
    public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);

    // ------------
    // Constructors
    // ------------
    public DataFactory() {
        // Explicitly call the superclass constructor to prevent the implicit call
        super();

    }

    // -------
    // Methods
    // -------
    public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(property, listener);
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(property, listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(listener);
    }

    /**
     * _CreateData1<p>
     * <p>
     * @return DataFieldsObject
     */
    private DataFieldsObject _CreateData1() {
        DataFieldsObject res = new DataFieldsObject();

        String aDate = "01-JAN-2000 12:34:56";
        String aDate2 = "02-Feb-2001 13:45:30";
        DateTimeData aDTD = new DateTimeData(new TextData(aDate), DateTimeData.qq_Resolver.cVALUE);
        DateTimeData aDTD2 = new DateTimeData(new TextData(aDate2), DateTimeData.qq_Resolver.cVALUE);
        IntervalData aInterval = new IntervalData();
        aInterval = aInterval.subtract(aDTD2, aDTD);

        res.getMDateTimeData1().setValue(aDate);
        res.getMDateTimeData2().setValue(aDate);
        res.getMDateTimeData3().setValue(aDate);

        res.getMDateTimeNullable1().setValue(aDate);
        res.getMDateTimeNullable2().setValue(aDate);
        res.getMDateTimeNullable3().setValue(aDate);

        res.getMDecimalData1().setValue(1234.567);
        res.getMDecimalData2().setValue(1234.567);
        res.getMDecimalData3().setValue(1234.567);
        res.getMDecimalData4().setValue(1234);
        res.getMDecimalData5().setValue(1234.567);

        res.getMDecimalNullable1().setValue(1234.567);
        res.getMDecimalNullable2().setValue(1234.567);
        res.getMDecimalNullable3().setValue(1234.567);
        res.getMDecimalNullable4().setValue(1234);
        res.getMDecimalNullable5().setValue(1234.567);

        res.setMDouble1(1234.567);
        res.setMDouble2(1234.567);
        res.setMDouble3(1234.567);
        res.setMDouble4(1234);
        res.setMDouble5(1234.567);

        res.getMDoubleData1().setValue(1234.567);
        res.getMDoubleData2().setValue(1234.567);
        res.getMDoubleData3().setValue(1234.567);
        res.getMDoubleData4().setValue(1234);
        res.getMDoubleData5().setValue(1234.567);

        res.getMDoubleNullable1().setValue(1234.567);
        res.getMDoubleNullable2().setValue(1234.567);
        res.getMDoubleNullable3().setValue(1234.567);
        res.getMDoubleNullable4().setValue(1234);
        res.getMDoubleNullable5().setValue(1234.567);

        res.setMFloat1(1234.567f);
        res.setMFloat2(1234.567f);
        res.setMFloat3(1234.567f);
        res.setMFloat4(1234f);
        res.setMFloat5(1234.567f);

        res.setMInteger1(123456789);
        res.setMInteger2(123456789);
        res.setMInteger3(123456789);
        res.setMInteger4(123456789);
        res.setMInteger5(123456789);

        res.getMIntegerData1().setValue(123456789);
        res.getMIntegerData2().setValue(123456789);
        res.getMIntegerData3().setValue(123456789);
        res.getMIntegerData4().setValue(123456789);
        res.getMIntegerData5().setValue(123456789);

        res.getMIntegerNullable1().setValue(123456789);
        res.getMIntegerNullable2().setValue(123456789);
        res.getMIntegerNullable3().setValue(123456789);
        res.getMIntegerNullable4().setValue(123456789);
        res.getMIntegerNullable5().setValue(123456789);

        res.getMIntervalData1().setValue(aInterval.getValue());
        res.getMIntervalData2().setValue(aInterval.getValue());
        res.getMIntervalData3().setValue(aInterval.getValue());
        res.getMIntervalData4().setValue(aInterval.getValue());
        res.getMIntervalData5().setValue(aInterval.getValue());

        res.getMIntervalNullable1().setValue(aInterval.getValue());
        res.getMIntervalNullable2().setValue(aInterval.getValue());
        res.getMIntervalNullable3().setValue(aInterval.getValue());
        res.getMIntervalNullable4().setValue(aInterval.getValue());
        res.getMIntervalNullable5().setValue(aInterval.getValue());

        res.setMLong1(123456789);
        res.setMLong2(123456789);
        res.setMLong3(123456789);
        res.setMLong4(123456789);
        res.setMLong5(123456789);

        res.setMString1("UP low 1234 !@#$%^&*()");
        res.setMString2("UPPER 1234 !@#$%^&*()");
        res.setMString3("lower 1234 !@#$%^&*()");
        res.setMString4("UPPER lower");
        res.setMString5("UPPER");
        res.setMString6("lower");
        res.setMString7("UPPER lower 1234");
        res.setMString8("UPPER 1234");
        res.setMString9("lower 1234");

        res.getMTextData1().setValue( "UP low 1234 !@#$%^&*()" );
        res.getMTextData2().setValue( "UPPER 1234 !@#$%^&*()" );
        res.getMTextData3().setValue( "lower 1234 !@#$%^&*()" );
        res.getMTextData4().setValue( "UPPER lower" );
        res.getMTextData5().setValue( "UPPER" );
        res.getMTextData6().setValue( "lower" );
        res.getMTextData7().setValue( "UPPER lower 1234" );
        res.getMTextData8().setValue( "UPPER 1234" );
        res.getMTextData9().setValue( "lower 1234" );

        res.getMTextNullable1().setValue( "UP low 1234 !@#$%^&*()" );
        res.getMTextNullable2().setValue( "UPPER 1234 !@#$%^&*()" );
        res.getMTextNullable3().setValue( "lower 1234 !@#$%^&*()" );
        res.getMTextNullable4().setValue( "UPPER lower" );
        res.getMTextNullable5().setValue( "UPPER" );
        res.getMTextNullable6().setValue( "lower" );
        res.getMTextNullable7().setValue( "UPPER lower 1234" );
        res.getMTextNullable8().setValue( "UPPER 1234" );
        res.getMTextNullable9().setValue( "lower 1234" );

        return res;
    }

    /**
     * _CreateData2<p>
     * <p>
     * @return DataFieldsObject
     */
    private DataFieldsObject _CreateData2() {
        DataFieldsObject res = null;


        return res;
    }

    /**
     * create<p>
     * <p>
     * @param pSetNum Type: int
     * @return DataFieldsObject
     */
    public DataFieldsObject create(int pSetNum) {
        DataFieldsObject res = null;


        switch (pSetNum) {
            case DataFactory.SET_ONE: {
                res = this._CreateData1();

                break;
            }
            case DataFactory.SET_TWO: {
                res = this._CreateData2();

                break;
            }
        }

        return res;
    }
// end class DataFactory
// c Pass 2 Conversion Time: 983 milliseconds
TOP

Related Classes of DataFieldTest.DataFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.