com.edustructures.sifworks.food
Class FoodserviceTransaction

java.lang.Object
  extended by com.edustructures.sifworks.Element
      extended by com.edustructures.sifworks.SIFElement
          extended by com.edustructures.sifworks.SIFDataObject
              extended by com.edustructures.sifworks.food.FoodserviceTransaction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FoodserviceTransaction
extends SIFDataObject

This object communicates food service transaction information. This is the key object that will be present for every food service transaction. SIF_Events are reported.

Since:
1.5r1
Version:
2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.edustructures.sifworks.Element
CURRENT_SERIALIZE_VERSION
 
Constructor Summary
FoodserviceTransaction()
          Constructor
FoodserviceTransaction(java.lang.String refId, java.lang.String schoolInfoRefId, Program program, java.util.Calendar transactionDate, java.util.Calendar transactionTime, Customer customer, FSAmount fsAmount, YesNo voided)
          Constructor that accepts values for all mandatory fields
 
Method Summary
 FSAmount getAmount()
          Gets the value of the <Amount> element.
 Customer getCustomer()
          Gets the value of the <Customer> element.
 java.lang.String getDescription()
          Gets the value of the <Description> element.
 FSAmount getFSAmount()
          Gets the value of the <FSAmount> element.
 java.lang.String getKey()
          Gets the key of this object
 ElementDef[] getKeyFields()
          Gets the metadata fields that make up the key of this object
 Program getProgram()
          Gets the value of the <Program> element.
 java.lang.String getRefId()
          Gets the value of the RefId attribute.
 java.lang.String getSchoolInfoRefId()
          Gets the value of the <SchoolInfoRefId> element.
 java.math.BigDecimal getTax()
          Gets the value of the <Tax> element.
 java.util.Calendar getTransactionDate()
          Gets the value of the <TransactionDate> element.
 java.util.Calendar getTransactionTime()
          Gets the value of the <TransactionTime> element.
 TransactionTypes getTransactionTypes()
          Gets the value of the <TransactionTypes> element.
 java.lang.String getVoided()
          Gets the value of the <Voided> element.
 void removeAmount()
          Removes the Amount child element previously created by calling setAmount
 void removeCustomer()
          Removes the Customer child element previously created by calling setCustomer
 void removeFSAmount()
          Removes the FSAmount child element previously created by calling setFSAmount
 void removeProgram()
          Removes the Program child element previously created by calling setProgram
 void removeTransactionTypes()
          Removes the TransactionTypes child element previously created by calling setTransactionTypes
 void setAmount(FSAmount value)
          Sets the value of the <Amount> element.
 void setAmount(FSAmountType type, java.math.BigDecimal credits, java.lang.String value)
          Sets the value of the <Amount> child element.
 void setCustomer(Customer value)
          Sets the value of the <Customer> element.
 void setCustomer(java.lang.String sifRefId, CustomerObjectName sifRefObject)
          Sets the value of the <Customer> child element.
 void setDescription(java.lang.String value)
          Sets the value of the <Description> element.
 void setFSAmount(FSAmount value)
          Sets the value of the <FSAmount> element.
 void setFSAmount(FSAmountType type, java.math.BigDecimal credits, java.lang.String value)
          Sets the value of the <FSAmount> child element.
 void setProgram(FinancialProgram type, java.lang.String value)
          Sets the value of the <Program> child element.
 void setProgram(Program value)
          Sets the value of the <Program> element.
 void setRefId(java.lang.String value)
          Sets the value of the RefId attribute.
 void setSchoolInfoRefId(java.lang.String value)
          Sets the value of the <SchoolInfoRefId> element.
 void setTax(java.math.BigDecimal value)
          Sets the value of the <Tax> element.
 void setTransactionDate(java.util.Calendar value)
          Sets the value of the <TransactionDate> element.
 void setTransactionTime(java.util.Calendar value)
          Sets the value of the <TransactionTime> element.
 void setTransactionTypes(TransactionTypes value)
          Sets the value of the <TransactionTypes> element.
 void setVoided(java.lang.String value)
          Sets the value of the <Voided> element as a String.
 void setVoided(YesNo value)
          Sets the value of the <Voided> element.
 
Methods inherited from class com.edustructures.sifworks.SIFDataObject
addSIFExtendedElement, clone, getElementOrAttribute, getObjectTag, getObjectType, getSIFExtendedElement, getSIFExtendedElements, getSIFExtendedElementsContainer, getSIFMetadata, getSIFVersion, setElementOrAttribute, setElementOrAttribute, setElementOrAttribute, setSIFExtendedElements, setSIFExtendedElementsContainer, setSIFMetadata, setSIFVersion, toXML
 
Methods inherited from class com.edustructures.sifworks.SIFElement
addChild, addChild, compareGraphTo, create, effectiveSIFVersion, getChild, getChild, getChild, getChild, getChild, getChildCount, getChildList, getChildList, getChildList, getChildren, getChildren, getContent, getContent, getField, getField, getFieldCount, getFields, getFieldValue, getSIFValue, getTextValue, getXmlId, hasTextValue, removeChild, removeChild, removeChild, removeChild, restoreImplementationDef, setChanged, setChildren, setEmpty, setField, setField, setField, setField, setSIFValue, setTextValue, setXmlId, tag
 
Methods inherited from class com.edustructures.sifworks.Element
compareTo, getElementDef, getParent, getRoot, isChanged, isDoNotEncode, isEmpty, setChanged, setDoNotEncode, setElementDef, setEmpty, setParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FoodserviceTransaction

public FoodserviceTransaction()
Constructor


FoodserviceTransaction

public FoodserviceTransaction(java.lang.String refId,
                              java.lang.String schoolInfoRefId,
                              Program program,
                              java.util.Calendar transactionDate,
                              java.util.Calendar transactionTime,
                              Customer customer,
                              FSAmount fsAmount,
                              YesNo voided)
Constructor that accepts values for all mandatory fields

Parameters:
refId - GUID that identifies food service transaction
schoolInfoRefId - GUID that identifies the school/site of account transaction
program - Program. For a description of this element, see 5.1.23 Program.
transactionDate - Date of transaction
transactionTime - Time of transaction.
customer - The customer doing the transaction. The customer can be student, staff or any other person.
fsAmount - Amount.
voided - This flag tells us if the transaction is voided.
Method Detail

getKey

public java.lang.String getKey()
Gets the key of this object

Overrides:
getKey in class SIFElement
Returns:
The value of the object's Mandatory or Required attribute. If an object has more than one such attribute, the key is a period- delimited concatenation of the attribute values in sequential order

getKeyFields

public ElementDef[] getKeyFields()
Gets the metadata fields that make up the key of this object

Returns:
an array of metadata fields that make up the object's key

getRefId

public java.lang.String getRefId()
Gets the value of the RefId attribute.

The SIF specification defines the meaning of this attribute as: "GUID that identifies food service transaction"

Overrides:
getRefId in class SIFDataObject
Returns:
The RefId attribute of this object.
Since:
1.5r1

setRefId

public void setRefId(java.lang.String value)
Sets the value of the RefId attribute.

The SIF specification defines the meaning of this attribute as: "GUID that identifies food service transaction"

Parameters:
value - A String object
Since:
1.5r1

getSchoolInfoRefId

public java.lang.String getSchoolInfoRefId()
Gets the value of the <SchoolInfoRefId> element.

The SIF specification defines the meaning of this element as: "GUID that identifies the school/site of account transaction"

Returns:
The SchoolInfoRefId element of this object.
Since:
1.5r1

setSchoolInfoRefId

public void setSchoolInfoRefId(java.lang.String value)
Sets the value of the <SchoolInfoRefId> element.

The SIF specification defines the meaning of this element as: "GUID that identifies the school/site of account transaction"

Parameters:
value - A String object
Since:
1.5r1

setProgram

public void setProgram(Program value)
Sets the value of the <Program> element.

The SIF specification defines the meaning of this element as: "Program. For a description of this element, see 5.1.23 Program."

Parameters:
value - A Program object
Since:
1.5r1

setProgram

public void setProgram(FinancialProgram type,
                       java.lang.String value)
Sets the value of the <Program> child element. This form of setProgram is provided as a convenience method that is functionally equivalent to the version of setProgram that accepts a single Program object.

Parameters:
type - The type of the program. Type identifies the list of values.
value - Gets or sets the content value of the <Program> element
Since:
1.5r1

getProgram

public Program getProgram()
Gets the value of the <Program> element.

The SIF specification defines the meaning of this element as: "Program. For a description of this element, see 5.1.23 Program."

Returns:
A Program object
Since:
1.5r1

removeProgram

public void removeProgram()
Removes the Program child element previously created by calling setProgram

Since:
1.5r1

getTransactionDate

public java.util.Calendar getTransactionDate()
Gets the value of the <TransactionDate> element.

The SIF specification defines the meaning of this element as: "Date of transaction"

Returns:
The TransactionDate element of this object.
Since:
1.5r1

setTransactionDate

public void setTransactionDate(java.util.Calendar value)
Sets the value of the <TransactionDate> element.

The SIF specification defines the meaning of this element as: "Date of transaction"

Parameters:
value - A Calendar object
Since:
1.5r1

getTransactionTime

public java.util.Calendar getTransactionTime()
Gets the value of the <TransactionTime> element.

The SIF specification defines the meaning of this element as: "Time of transaction."

Returns:
The TransactionTime element of this object.
Since:
1.5r1

setTransactionTime

public void setTransactionTime(java.util.Calendar value)
Sets the value of the <TransactionTime> element.

The SIF specification defines the meaning of this element as: "Time of transaction."

Parameters:
value - A Calendar object
Since:
1.5r1

setTransactionTypes

public void setTransactionTypes(TransactionTypes value)
Sets the value of the <TransactionTypes> element.

Parameters:
value - A TransactionTypes object
Since:
1.5r1

getTransactionTypes

public TransactionTypes getTransactionTypes()
Gets the value of the <TransactionTypes> element.

Returns:
A TransactionTypes object
Since:
1.5r1

removeTransactionTypes

public void removeTransactionTypes()
Removes the TransactionTypes child element previously created by calling setTransactionTypes

Since:
1.5r1

setCustomer

public void setCustomer(Customer value)
Sets the value of the <Customer> element.

The SIF specification defines the meaning of this element as: "The customer doing the transaction. The customer can be student, staff or any other person."

This element is known by more than one tag name depending on the version of SIF in use. The ADK will use the tag names shown below when parsing and rendering elements of this kind.

VersionTag
1.5r1"FSCustomerId"
SIF2.0"Customer"

Parameters:
value - A Customer object
Since:
1.5r1

setCustomer

public void setCustomer(java.lang.String sifRefId,
                        CustomerObjectName sifRefObject)
Sets the value of the <Customer> child element. This form of setCustomer is provided as a convenience method that is functionally equivalent to the version of setCustomer that accepts a single Customer object.

Parameters:
sifRefId - GUID of the SIF customer type.
sifRefObject - SIF customer type. If the type is StaffPersonalRefId then EarnedStatus is included. If the type is StudentPersonalRefId, then MealStatus in included.
Since:
1.5r1

getCustomer

public Customer getCustomer()
Gets the value of the <Customer> element.

The SIF specification defines the meaning of this element as: "The customer doing the transaction. The customer can be student, staff or any other person."

This element is known by more than one tag name depending on the version of SIF in use. The ADK will use the tag names shown below when parsing and rendering elements of this kind.

VersionTag
1.5r1"FSCustomerId"
SIF2.0"Customer"

Returns:
A Customer object
Since:
1.5r1

removeCustomer

public void removeCustomer()
Removes the Customer child element previously created by calling setCustomer

Since:
1.5r1

setFSAmount

public void setFSAmount(FSAmount value)
Sets the value of the <FSAmount> element.

The SIF specification defines the meaning of this element as: "Amount."

Parameters:
value - A FSAmount object
Since:
1.5r1

setFSAmount

public void setFSAmount(FSAmountType type,
                        java.math.BigDecimal credits,
                        java.lang.String value)
Sets the value of the <FSAmount> child element. This form of setFSAmount is provided as a convenience method that is functionally equivalent to the version of setFSAmount that accepts a single FSAmount object.

Parameters:
type - Type of amount. The currency unit is implied; namely USD. Note that when this common element is used not all of the following values apply. There are notes to indicate values that are applicable.
credits - Number of credits. This attribute does not apply to Cash or Value and hence has a value 0. It only applies to types BreakfastCredit and LunchCredit.
value - Gets or sets the content value of the <FSAmount> element
Since:
1.5r1

getFSAmount

public FSAmount getFSAmount()
Gets the value of the <FSAmount> element.

The SIF specification defines the meaning of this element as: "Amount."

Returns:
A FSAmount object
Since:
1.5r1

removeFSAmount

public void removeFSAmount()
Removes the FSAmount child element previously created by calling setFSAmount

Since:
1.5r1

setAmount

public void setAmount(FSAmount value)
Sets the value of the <Amount> element.

Parameters:
value - A FSAmount object
Since:
2.0

setAmount

public void setAmount(FSAmountType type,
                      java.math.BigDecimal credits,
                      java.lang.String value)
Sets the value of the <Amount> child element. This form of setAmount is provided as a convenience method that is functionally equivalent to the version of setAmount that accepts a single FSAmount object.

Parameters:
type - Type of amount. The currency unit is implied; namely USD. Note that when this common element is used not all of the following values apply. There are notes to indicate values that are applicable.
credits - Number of credits. This attribute does not apply to Cash or Value and hence has a value 0. It only applies to types BreakfastCredit and LunchCredit.
value - Gets or sets the content value of the <FSAmount> element
Since:
2.0

getAmount

public FSAmount getAmount()
Gets the value of the <Amount> element.

Returns:
A FSAmount object
Since:
2.0

removeAmount

public void removeAmount()
Removes the Amount child element previously created by calling setAmount

Since:
2.0

getTax

public java.math.BigDecimal getTax()
Gets the value of the <Tax> element.

The SIF specification defines the meaning of this element as: "Amount of tax."

Returns:
The Tax element of this object.
Since:
1.5r1

setTax

public void setTax(java.math.BigDecimal value)
Sets the value of the <Tax> element.

The SIF specification defines the meaning of this element as: "Amount of tax."

Parameters:
value - A BigDecimal object
Since:
1.5r1

getDescription

public java.lang.String getDescription()
Gets the value of the <Description> element.

The SIF specification defines the meaning of this element as: "Description of the Transaction"

Returns:
The Description element of this object.
Since:
1.5r1

setDescription

public void setDescription(java.lang.String value)
Sets the value of the <Description> element.

The SIF specification defines the meaning of this element as: "Description of the Transaction"

Parameters:
value - A String object
Since:
1.5r1

getVoided

public java.lang.String getVoided()
Gets the value of the <Voided> element.

The SIF specification defines the meaning of this element as: "This flag tells us if the transaction is voided."

Returns:
The Voided element of this object.
Since:
1.5r1

setVoided

public void setVoided(YesNo value)
Sets the value of the <Voided> element.

The SIF specification defines the meaning of this element as: "This flag tells us if the transaction is voided."

Parameters:
value - A constant defined by the YesNo class
Since:
1.5r1

setVoided

public void setVoided(java.lang.String value)
Sets the value of the <Voided> element as a String.

The SIF specification defines the meaning of this element as: "This flag tells us if the transaction is voided."

Parameters:
value - The value as a String
Since:
1.5r1


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.