edu.sampleu.travel.approval.dataobject
Class PerDiemExpense

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by edu.sampleu.travel.approval.dataobject.PerDiemExpense
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject

@Entity
public class PerDiemExpense
extends PersistableBusinessObjectBase

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
PerDiemExpense()
           
 
Method Summary
static KualiDecimal calculateMealsAndIncidentalsProrated(KualiDecimal total, Integer perDiemPercent)
           
 String getAccommodationAddress()
          This method returns the accommodation's address
 String getAccommodationName()
          This method returns the name of the accommodation for this day
 String getAccommodationPhoneNum()
          This method returns the accommodation's phone
 String getAccommodationTypeCode()
          This method gets the accommodation type code associated with this day
 Boolean getBreakfast()
           
 KualiDecimal getBreakfastValue()
          Gets the breakfastValue attribute.
 KualiDecimal getBreakfastValue(boolean defaultZero)
           
 String getCountryState()
           
 String getCounty()
           
 KualiDecimal getDailyTotal()
           
 Boolean getDinner()
           
 KualiDecimal getDinnerValue()
          Gets the dinnerValue attribute.
 KualiDecimal getDinnerValue(boolean defaultZero)
           
 String getDocumentNumber()
           
 Integer getId()
           
 KualiDecimal getIncidentalsValue()
          This method returns incidentalsValue affected by INCIDENTALS_WITH_MEALS_ONLY_IND parameter
 KualiDecimal getIncidentalsValue(boolean defaultZero)
           
 KualiDecimal getLodging()
          This method gets the lodging cost for this day.
 KualiDecimal getLodging(boolean defaultZero)
           
 KualiDecimal getLodgingTotal()
          This method gets the Lodging Total if it is not a personal expense.
 Boolean getLunch()
           
 KualiDecimal getLunchValue()
          Gets the lunchValue attribute.
 KualiDecimal getLunchValue(boolean defaultZero)
           
 KualiDecimal getMealsAndIncidentals()
           
 KualiDecimal getMealsTotal()
          This method gets the mealsTotal with
 Timestamp getMileageDate()
          Retrieve the Mileage date of per diem CLEANUP: mileage date should be the per diem expense date
 Integer getMileageRateId()
           
 KualiDecimal getMileageTotal()
           
 Integer getMiles()
           
 Integer getMiles(boolean defaultZero)
           
 Integer getPerDiemId()
          Gets the perDiemId attribute.
 Boolean getPersonal()
          This method returns whether or not this is a personal expense or not (true for personal expense, false otherwise)
 String getPrimaryDestination()
           
 boolean isProrated()
           
 void setAccommodationAddress(String accommodationAddress)
          This method sets the accommodation's address
 void setAccommodationName(String accommodationName)
          This method sets the accommodation name for this day
 void setAccommodationPhoneNum(String accommodationPhoneNum)
          This method sets the accommodation phone number
 void setAccommodationTypeCode(String accommodationTypeCode)
          This method sets the accommodation type code for this day
 void setBreakfast(Boolean breakfast)
           
 void setBreakfastValue(KualiDecimal breakfastValue)
          Sets the breakfastValue attribute value.
 void setCountryState(String countryState)
           
 void setCounty(String county)
           
 void setDinner(Boolean dinner)
           
 void setDinnerValue(KualiDecimal dinnerValue)
          Sets the dinnerValue attribute value.
 void setDocumentNumber(String documentNumber)
           
 void setId(Integer id)
           
 void setIncidentalsValue(KualiDecimal incidentalsValue)
           
 void setIncidentalsWithMealsOnly(Boolean incidentalsWithMealsOnly)
          public Boolean getIncludeIncidentals() { return !(!breakfast && !lunch && !dinner && getIncidentalsWithMealsOnly()); } /* /** public Boolean getIncidentalsWithMealsOnly() { if (incidentalsWithMealsOnly == null) { String incidentalsWithMealsOnlyParam = SpringContext.getBean(ParameterService.class).getParameterValue(PARAM_NAMESPACE, DOCUMENT_DTL_TYPE, TravelParameters.INCIDENTALS_WITH_MEALS_ONLY_IND); //incidentalsWithMealsOnly = incidentalsWithMealsOnlyParam != null && incidentalsWithMealsOnlyParam.equals(KFSConstants.DocumentTypeAttributes.INDICATOR_ATTRIBUTE_TRUE_VALUE); incidentalsWithMealsOnly = incidentalsWithMealsOnlyParam != null && incidentalsWithMealsOnlyParam.equals(KFSConstants.ParameterValues.YES); } return incidentalsWithMealsOnly; }
 void setLodging(KualiDecimal lodging)
          This method sets the lodging cost for this day
 void setLunch(Boolean lunch)
           
 void setLunchValue(KualiDecimal lunchValue)
          Sets the lunchValue attribute value.
 void setMealsAndIncidentals(KualiDecimal mealsAndIncidentals)
          This method split mealsAndIncidentals into breakfast, lunch, dinner and incidentals (overriding the existing breakfast, lunch, dinner and incidentals values).
 void setMileageDate(Timestamp mileageDate)
          Assign the Mileage date of per diem
 void setMileageRateId(Integer mileageRateId)
           
 void setMiles(Integer miles)
           
 void setPerDiemId(Integer perDiemId)
          Sets the perDiemId attribute value.
 void setPersonal(Boolean personal)
          This method sets true if this is a personal expense
 void setPrimaryDestination(String primaryDestination)
           
 void setProrated(boolean prorated)
           
protected  LinkedHashMap toStringMapper()
           
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Constructor Detail

PerDiemExpense

public PerDiemExpense()
Method Detail

getId

public Integer getId()

setId

public void setId(Integer id)

getDocumentNumber

public String getDocumentNumber()

setDocumentNumber

public void setDocumentNumber(String documentNumber)

getCountryState

public String getCountryState()

setCountryState

public void setCountryState(String countryState)

getCounty

public String getCounty()

setCounty

public void setCounty(String county)

getPrimaryDestination

public String getPrimaryDestination()

setPrimaryDestination

public void setPrimaryDestination(String primaryDestination)

getBreakfast

public Boolean getBreakfast()

setBreakfast

public void setBreakfast(Boolean breakfast)

getLunch

public Boolean getLunch()

setLunch

public void setLunch(Boolean lunch)

getDinner

public Boolean getDinner()

setDinner

public void setDinner(Boolean dinner)

getPerDiemId

public Integer getPerDiemId()
Gets the perDiemId attribute.

Returns:
Returns the perDiemId.

setPerDiemId

public void setPerDiemId(Integer perDiemId)
Sets the perDiemId attribute value.

Parameters:
perDiemId - The perDiemId to set.

getAccommodationTypeCode

public String getAccommodationTypeCode()
This method gets the accommodation type code associated with this day

Returns:
accoomodation type code

setAccommodationTypeCode

public void setAccommodationTypeCode(String accommodationTypeCode)
This method sets the accommodation type code for this day

Parameters:
accommodationTypeCode -

getAccommodationName

public String getAccommodationName()
This method returns the name of the accommodation for this day

Returns:
accommodation name

setAccommodationName

public void setAccommodationName(String accommodationName)
This method sets the accommodation name for this day

Parameters:
accommodationName -

getAccommodationPhoneNum

public String getAccommodationPhoneNum()
This method returns the accommodation's phone

Returns:
the phone number for the accommodation

setAccommodationPhoneNum

public void setAccommodationPhoneNum(String accommodationPhoneNum)
This method sets the accommodation phone number

Parameters:
accommodationPhoneNum -

getAccommodationAddress

public String getAccommodationAddress()
This method returns the accommodation's address

Returns:
accommodation's address

setAccommodationAddress

public void setAccommodationAddress(String accommodationAddress)
This method sets the accommodation's address

Parameters:
accommodationAddress -

getLodging

public KualiDecimal getLodging()
This method gets the lodging cost for this day. This method does not take into account personal expenses. Use getLodgingTotal() for that.

Returns:
lodging cost

getLodging

public KualiDecimal getLodging(boolean defaultZero)

setLodging

public void setLodging(KualiDecimal lodging)
This method sets the lodging cost for this day

Parameters:
lodging -

getMiles

public Integer getMiles()

getMiles

public Integer getMiles(boolean defaultZero)

setMiles

public void setMiles(Integer miles)

getBreakfastValue

public KualiDecimal getBreakfastValue()
Gets the breakfastValue attribute.

Returns:
Returns the breakfastValue.

getBreakfastValue

public KualiDecimal getBreakfastValue(boolean defaultZero)

setBreakfastValue

public void setBreakfastValue(KualiDecimal breakfastValue)
Sets the breakfastValue attribute value.

Parameters:
breakfastValue - The breakfastValue to set.

getLunchValue

public KualiDecimal getLunchValue()
Gets the lunchValue attribute.

Returns:
Returns the lunchValue.

getLunchValue

public KualiDecimal getLunchValue(boolean defaultZero)

setLunchValue

public void setLunchValue(KualiDecimal lunchValue)
Sets the lunchValue attribute value.

Parameters:
lunchValue - The lunchValue to set.

getDinnerValue

public KualiDecimal getDinnerValue()
Gets the dinnerValue attribute.

Returns:
Returns the dinnerValue.

getDinnerValue

public KualiDecimal getDinnerValue(boolean defaultZero)

setDinnerValue

public void setDinnerValue(KualiDecimal dinnerValue)
Sets the dinnerValue attribute value.

Parameters:
dinnerValue - The dinnerValue to set.

getMileageRateId

public Integer getMileageRateId()

setMileageRateId

public void setMileageRateId(Integer mileageRateId)

getMileageTotal

public KualiDecimal getMileageTotal()

getDailyTotal

public KualiDecimal getDailyTotal()

getMealsTotal

public KualiDecimal getMealsTotal()
This method gets the mealsTotal with

Returns:

getLodgingTotal

public KualiDecimal getLodgingTotal()
This method gets the Lodging Total if it is not a personal expense.

Returns:

getMileageDate

public Timestamp getMileageDate()
Retrieve the Mileage date of per diem CLEANUP: mileage date should be the per diem expense date

Returns:
mileage date

getMealsAndIncidentals

public KualiDecimal getMealsAndIncidentals()

calculateMealsAndIncidentalsProrated

public static KualiDecimal calculateMealsAndIncidentalsProrated(KualiDecimal total,
                                                                Integer perDiemPercent)

setMealsAndIncidentals

public void setMealsAndIncidentals(KualiDecimal mealsAndIncidentals)
This method split mealsAndIncidentals into breakfast, lunch, dinner and incidentals (overriding the existing breakfast, lunch, dinner and incidentals values).

Parameters:
mealsAndIncidentals -

getPersonal

public Boolean getPersonal()
This method returns whether or not this is a personal expense or not (true for personal expense, false otherwise)

Returns:
true for personal expense, false otherwise

setPersonal

public void setPersonal(Boolean personal)
This method sets true if this is a personal expense

Parameters:
true - for personal expense

setMileageDate

public void setMileageDate(Timestamp mileageDate)
Assign the Mileage date of per diem

Parameters:
mileageDate - as Date

toStringMapper

protected LinkedHashMap toStringMapper()

setIncidentalsWithMealsOnly

public void setIncidentalsWithMealsOnly(Boolean incidentalsWithMealsOnly)
public Boolean getIncludeIncidentals() { return !(!breakfast && !lunch && !dinner && getIncidentalsWithMealsOnly()); } /* /** public Boolean getIncidentalsWithMealsOnly() { if (incidentalsWithMealsOnly == null) { String incidentalsWithMealsOnlyParam = SpringContext.getBean(ParameterService.class).getParameterValue(PARAM_NAMESPACE, DOCUMENT_DTL_TYPE, TravelParameters.INCIDENTALS_WITH_MEALS_ONLY_IND); //incidentalsWithMealsOnly = incidentalsWithMealsOnlyParam != null && incidentalsWithMealsOnlyParam.equals(KFSConstants.DocumentTypeAttributes.INDICATOR_ATTRIBUTE_TRUE_VALUE); incidentalsWithMealsOnly = incidentalsWithMealsOnlyParam != null && incidentalsWithMealsOnlyParam.equals(KFSConstants.ParameterValues.YES); } return incidentalsWithMealsOnly; }


getIncidentalsValue

public KualiDecimal getIncidentalsValue()
This method returns incidentalsValue affected by INCIDENTALS_WITH_MEALS_ONLY_IND parameter

Returns:

getIncidentalsValue

public KualiDecimal getIncidentalsValue(boolean defaultZero)

setIncidentalsValue

public void setIncidentalsValue(KualiDecimal incidentalsValue)

isProrated

public boolean isProrated()

setProrated

public void setProrated(boolean prorated)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.