Example usage for org.apache.commons.lang3.mutable MutableDouble doubleValue

List of usage examples for org.apache.commons.lang3.mutable MutableDouble doubleValue

Introduction

In this page you can find the example usage for org.apache.commons.lang3.mutable MutableDouble doubleValue.

Prototype

@Override
public double doubleValue() 

Source Link

Document

Returns the value of this MutableDouble as a double.

Usage

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTermBalance(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {/*from w w w.j av a 2s  . c o m*/
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    //:DECIMAL dBalance
    double dBalance = 0.0;
    //:DECIMAL dTotalCharges
    double dTotalCharges = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
    //:dBalance = mSAProf.StudentAccountProfile.dBalance 
    {
        MutableDouble md_dBalance = new MutableDouble(dBalance);
        GetDecimalFromAttribute(md_dBalance, mSAProf, "StudentAccountProfile", "dBalance");
        dBalance = md_dBalance.doubleValue();
    }
        //:// This derived attribute will only work when all the transactions under
        //:// billing period exist.  When doing Finincial Registration, we first get all
        //:// PeriodTransApplied but then we delete ones that are not charges.  We must
        //:// get dTermBalance before deleting any PeriodTransApplied.
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:dTotalCharges = 0
        dTotalCharges = 0;
        //:FOR EACH mSAProf2.PeriodTransApplied  
        RESULT = mSAProf2.cursor("PeriodTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            //:dTotalCharges = dTotalCharges + mSAProf2.PeriodTransApplied.Amount 
            {
                MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "PeriodTransApplied", "Amount");
                dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
            }
            dTotalCharges = dTotalCharges + dTempDecimal_0;
            RESULT = mSAProf2.cursor("PeriodTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 

        //:// The amount for the term is the total of the student's transactions minus
        //:// any charges/credits for the current term.
        //:dAmount = dBalance - dTotalCharges
        dAmount = dBalance - dTotalCharges;
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */

    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:   /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    //    
    // END
}

From source file:com.quinsoft.zencas.mDegTrk_Object.java

public int omDegTrk_dGraduationCredits(View mDegTrk, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mStudenC = new zVIEW();
    int RESULT = 0;
    //:DECIMAL GraduationCredits
    double GraduationCredits = 0.0;
    double dTempDecimal_0 = 0.0;
    double dTempDecimal_1 = 0.0;
    double dTempDecimal_2 = 0.0;
    double dTempDecimal_3 = 0.0;
    double dTempDecimal_4 = 0.0;
    double dTempDecimal_5 = 0.0;
    double dTempDecimal_6 = 0.0;
    double dTempDecimal_7 = 0.0;

    RESULT = GetViewByName(mStudenC, "mStudenC", mDegTrk, zLEVEL_TASK);

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF  zDERIVED_GET:
    case zDERIVED_GET:

        //:// Subtract Developmental Credits from wDegreeAuditTotalCreditsTaken.
        //:IF mDegTrk.DegreeMajorCollege.Type = "G"
        if (CompareAttributeToString(mDegTrk, "DegreeMajorCollege", "Type", "G") == 0) {
            //:GraduationCredits = mDegTrk.DegreeTrack.AuditTotalCreditsEarned +
            //:                 mDegTrk.DegreeTrack.AuditEnrolledCredits -
            //:                 mDegTrk.DegreeTrack.dDevelopmentalCredits -
            //:                 mStudenC.Student.dEnrolledCreditsRepeatedGrad
            {//w ww. j a  v  a2 s . com
                MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                GetDecimalFromAttribute(md_dTempDecimal_0, mDegTrk, "DegreeTrack", "AuditTotalCreditsEarned");
                dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_1 = new MutableDouble(dTempDecimal_1);
                GetDecimalFromAttribute(md_dTempDecimal_1, mDegTrk, "DegreeTrack", "AuditEnrolledCredits");
                dTempDecimal_1 = md_dTempDecimal_1.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_2 = new MutableDouble(dTempDecimal_2);
                GetDecimalFromAttribute(md_dTempDecimal_2, mDegTrk, "DegreeTrack", "dDevelopmentalCredits");
                dTempDecimal_2 = md_dTempDecimal_2.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_3 = new MutableDouble(dTempDecimal_3);
                GetDecimalFromAttribute(md_dTempDecimal_3, mStudenC, "Student", "dEnrolledCreditsRepeatedGrad");
                dTempDecimal_3 = md_dTempDecimal_3.doubleValue();
            }
            GraduationCredits = dTempDecimal_0 + dTempDecimal_1 - dTempDecimal_2 - dTempDecimal_3;
            //:ELSE
        } else {
            //:GraduationCredits = mDegTrk.DegreeTrack.AuditTotalCreditsEarned +
            //:                 mDegTrk.DegreeTrack.AuditEnrolledCredits -
            //:                 mDegTrk.DegreeTrack.dDevelopmentalCredits -
            //:                 mStudenC.Student.dEnrolledCreditsRepeated
            {
                MutableDouble md_dTempDecimal_4 = new MutableDouble(dTempDecimal_4);
                GetDecimalFromAttribute(md_dTempDecimal_4, mDegTrk, "DegreeTrack", "AuditTotalCreditsEarned");
                dTempDecimal_4 = md_dTempDecimal_4.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_5 = new MutableDouble(dTempDecimal_5);
                GetDecimalFromAttribute(md_dTempDecimal_5, mDegTrk, "DegreeTrack", "AuditEnrolledCredits");
                dTempDecimal_5 = md_dTempDecimal_5.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_6 = new MutableDouble(dTempDecimal_6);
                GetDecimalFromAttribute(md_dTempDecimal_6, mDegTrk, "DegreeTrack", "dDevelopmentalCredits");
                dTempDecimal_6 = md_dTempDecimal_6.doubleValue();
            }
            {
                MutableDouble md_dTempDecimal_7 = new MutableDouble(dTempDecimal_7);
                GetDecimalFromAttribute(md_dTempDecimal_7, mStudenC, "Student", "dEnrolledCreditsRepeated");
                dTempDecimal_7 = md_dTempDecimal_7.doubleValue();
            }
            GraduationCredits = dTempDecimal_4 + dTempDecimal_5 - dTempDecimal_6 - dTempDecimal_7;
        }

        //:END

        //:StoreValueInRecord ( mDegTrk,
        //:                  InternalEntityStructure, InternalAttribStructure, GraduationCredits, 0 )
        StoreValueInRecord(mDegTrk, InternalEntityStructure, InternalAttribStructure, GraduationCredits, 0);
        break;
    //:                     
    //:  /* end zDERIVED_GET */
    //:OF   zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:     /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dSubAccountBalance(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSASubAL = new zVIEW();
    //:DECIMAL dAmount
    double dAmount = 0.0;
    int lTempInteger_0 = 0;
    zVIEW vTempViewVar_0 = new zVIEW();
    int RESULT = 0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:dAmount = 0
        dAmount = 0;// www .  j a va 2s  .co m
        //:IF mSAProf.SASubAccount.ClosedDate = "" 
        if (CompareAttributeToString(mSAProf, "SASubAccount", "ClosedDate", "") == 0) {
            //:ACTIVATE mSASubAL WHERE mSASubAL.SASubAccount.ID = mSAProf.SASubAccount.ID 
            {
                MutableInt mi_lTempInteger_0 = new MutableInt(lTempInteger_0);
                GetIntegerFromAttribute(mi_lTempInteger_0, mSAProf, "SASubAccount", "ID");
                lTempInteger_0 = mi_lTempInteger_0.intValue();
            }
            omSAProf_fnLocalBuildQual_20(mSAProf, vTempViewVar_0, lTempInteger_0);
            RESULT = ActivateObjectInstance(mSASubAL, "mSASubAL", mSAProf, vTempViewVar_0, zSINGLE);
            DropView(vTempViewVar_0);
            //:IF RESULT >= 0
            if (RESULT >= 0) {
                //:dAmount = mSASubAL.SASubAccount.dCurrentBalance 
                {
                    MutableDouble md_dAmount = new MutableDouble(dAmount);
                    GetDecimalFromAttribute(md_dAmount, mSASubAL, "SASubAccount", "dCurrentBalance");
                    dAmount = md_dAmount.doubleValue();
                }
            }

            //:END
            //:DropView( mSASubAL )
            DropView(mSASubAL);
        }

        //:END

        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;

    //:/* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:   /* end zDERIVED_SET */
    //:END  /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dBalance(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {/*from  ww  w .j  a va2 s. c  om*/
    zVIEW mSAProfB = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:dAmount = 0
        dAmount = 0;
        //:IF mSAProf.StudentAccountProfile.ID != ""
        if (CompareAttributeToString(mSAProf, "StudentAccountProfile", "ID", "") != 0) {
            //:// On 3/17/2011, DonC changed the code below to use mSAProf instead of mSAProfB for computing the
            //:// balance, because the balance wasn't being updated correctly.
            //:dAmount = mSAProf.StudentAccountProfile.BalanceForward 
            {
                MutableDouble md_dAmount = new MutableDouble(dAmount);
                GetDecimalFromAttribute(md_dAmount, mSAProf, "StudentAccountProfile", "BalanceForward");
                dAmount = md_dAmount.doubleValue();
            }
            //:FOR EACH mSAProf.StudentAccountTransApplied  
            RESULT = mSAProf.cursor("StudentAccountTransApplied").setFirst().toInt();
            while (RESULT > zCURSOR_UNCHANGED) {
                //:dAmount = dAmount + mSAProf.StudentAccountTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf, "StudentAccountTransApplied", "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
                RESULT = mSAProf.cursor("StudentAccountTransApplied").setNextContinue().toInt();
                ;
            }

            //:END
        }

        //:   /*ACTIVATE mSAProfB
        //:      WHERE mSAProfB.StudentAccountProfile.ID = mSAProf.StudentAccountProfile.ID 
        //:   IF RESULT >= 0  
        //:      dAmount = mSAProfB.StudentAccountProfile.BalanceForward 
        //:      FOR EACH mSAProfB.StudentAccountTransApplied  
        //:         dAmount = dAmount + mSAProfB.StudentAccountTransApplied.Amount 
        //:      END 
        //:      DropView( mSAProfB ) 
        //:   END*/
        //:END
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                     InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTotalSACharges(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:IF mSAProf2.StudentAccountProfile.BalanceForward > 0 
        if (CompareAttributeToInteger(mSAProf2, "StudentAccountProfile", "BalanceForward", 0) > 0) {
            //:dAmount = mSAProf2.StudentAccountProfile.BalanceForward 
            {// w  w  w .  j a  va  2 s. c o  m
                MutableDouble md_dAmount = new MutableDouble(dAmount);
                GetDecimalFromAttribute(md_dAmount, mSAProf2, "StudentAccountProfile", "BalanceForward");
                dAmount = md_dAmount.doubleValue();
            }
            //:ELSE 
        } else {
            //:dAmount = 0
            dAmount = 0;
        }

        //:END
        //:FOR EACH mSAProf2.StudentAccountTransApplied  
        //:      WHERE mSAProf2.StudentAccountTransApplied.Amount >= 0
        RESULT = mSAProf2.cursor("StudentAccountTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            if (CompareAttributeToInteger(mSAProf2, "StudentAccountTransApplied", "Amount", 0) >= 0) {
                //:dAmount = dAmount + mSAProf2.StudentAccountTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "StudentAccountTransApplied",
                            "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = mSAProf2.cursor("StudentAccountTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTotalSACredits(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:IF mSAProf2.StudentAccountProfile.BalanceForward < 0 
        if (CompareAttributeToInteger(mSAProf2, "StudentAccountProfile", "BalanceForward", 0) < 0) {
            //:dAmount = mSAProf2.StudentAccountProfile.BalanceForward 
            {/*from w w  w  . j a  v  a  2s  .  c  o  m*/
                MutableDouble md_dAmount = new MutableDouble(dAmount);
                GetDecimalFromAttribute(md_dAmount, mSAProf2, "StudentAccountProfile", "BalanceForward");
                dAmount = md_dAmount.doubleValue();
            }
            //:ELSE 
        } else {
            //:dAmount = 0
            dAmount = 0;
        }

        //:END
        //:FOR EACH mSAProf2.StudentAccountTransApplied  
        //:      WHERE mSAProf2.StudentAccountTransApplied.Amount < 0
        RESULT = mSAProf2.cursor("StudentAccountTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            if (CompareAttributeToInteger(mSAProf2, "StudentAccountTransApplied", "Amount", 0) < 0) {
                //:dAmount = dAmount + mSAProf2.StudentAccountTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "StudentAccountTransApplied",
                            "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = mSAProf2.cursor("StudentAccountTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dClassCharges(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {//from  ww w.jav  a 2s.c om
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:dAmount = 0
        dAmount = 0;
        //:FOR EACH mSAProf2.StudentAccountTransApplied  
        RESULT = mSAProf2.cursor("StudentAccountTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            //:dAmount = dAmount + mSAProf2.StudentAccountTransApplied.Amount 
            {
                MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "StudentAccountTransApplied", "Amount");
                dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
            }
            dAmount = dAmount + dTempDecimal_0;
            RESULT = mSAProf2.cursor("StudentAccountTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTotalCredits(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {//w  ww .  j av a2 s.  com
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:dAmount = 0
        dAmount = 0;
        //:FOR EACH mSAProf2.TermEnrolled 
        RESULT = mSAProf2.cursor("TermEnrolled").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            //:IF mSAProf2.TermEnrolled.Status ="T"
            if (CompareAttributeToString(mSAProf2, "TermEnrolled", "Status", "T") == 0) {
                //:dAmount = dAmount + mSAProf2.TermEnrolled.CreditHours 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "TermEnrolled", "CreditHours");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = mSAProf2.cursor("TermEnrolled").setNextContinue().toInt();
            ;
            //:END
        }

        //:END
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTotalChargesPerPeriod(View mSAProf, String InternalEntityStructure,
        String InternalAttribStructure, Integer GetOrSetFlag) {
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);
        //:dAmount = 0
        dAmount = 0;/*from   w  ww  .  j ava  2 s .  c o  m*/
        //:FOR EACH mSAProf2.PeriodTransApplied 
        //:      WHERE mSAProf2.PeriodSATransactionCode.BillType != ""
        RESULT = mSAProf2.cursor("PeriodTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            if (CompareAttributeToString(mSAProf2, "PeriodSATransactionCode", "BillType", "") != 0) {
                //:dAmount = dAmount + mSAProf2.PeriodTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "PeriodTransApplied", "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = mSAProf2.cursor("PeriodTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */

    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:   /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}

From source file:com.quinsoft.zencas.mSAProf_Object.java

public int omSAProf_dTermCharges(View mSAProf, String InternalEntityStructure, String InternalAttribStructure,
        Integer GetOrSetFlag) {/*from  www . j a va2s .  c  o m*/
    zVIEW mSAProf2 = new zVIEW();
    //:DECIMAL dAmount 
    double dAmount = 0.0;
    int RESULT = 0;
    double dTempDecimal_0 = 0.0;

    //:CASE GetOrSetFlag
    switch (GetOrSetFlag) {
    //:OF zDERIVED_GET:
    case zDERIVED_GET:
        //:CreateViewFromView ( mSAProf2, mSAProf )
        CreateViewFromView(mSAProf2, mSAProf);

        //:dAmount = 0
        dAmount = 0;
        //:// Sum PeriodTransApplied where they are not credits, only charges.
        //:FOR EACH mSAProf2.PeriodTransApplied WHERE mSAProf2.PeriodSATransactionCode.Type = "C" 
        RESULT = mSAProf2.cursor("PeriodTransApplied").setFirst().toInt();
        while (RESULT > zCURSOR_UNCHANGED) {
            if (CompareAttributeToString(mSAProf2, "PeriodSATransactionCode", "Type", "C") == 0) {
                //://WHERE mSAProf2.StudentAccountTransApplied.Amount > 0
                //:dAmount = dAmount + mSAProf2.PeriodTransApplied.Amount 
                {
                    MutableDouble md_dTempDecimal_0 = new MutableDouble(dTempDecimal_0);
                    GetDecimalFromAttribute(md_dTempDecimal_0, mSAProf2, "PeriodTransApplied", "Amount");
                    dTempDecimal_0 = md_dTempDecimal_0.doubleValue();
                }
                dAmount = dAmount + dTempDecimal_0;
            }

            RESULT = mSAProf2.cursor("PeriodTransApplied").setNextContinue().toInt();
            ;
        }

        //:END 
        //:DropView( mSAProf2 ) 
        DropView(mSAProf2);
        //:StoreValueInRecord( mSAProf, InternalEntityStructure, 
        //:                    InternalAttribStructure, dAmount, 0 )
        StoreValueInRecord(mSAProf, InternalEntityStructure, InternalAttribStructure, dAmount, 0);
        break;
    //:   /* end zDERIVED_GET */
    //:OF zDERIVED_SET:
    case zDERIVED_SET:
        break;
    }

    //:      /* end zDERIVED_SET */
    //:END   /* case */
    return (0);
    // END
}