Package com.highdeal.pnr.hci
Class OutPropertyUpdateComponentModel
java.lang.Object
com.highdeal.pnr.hci.RateComponentModel
com.highdeal.pnr.hci.OutPropertyUpdateComponentModel
- All Implemented Interfaces:
XMLMarshallable,ContextualNode
This class represents a rate component that updates a Macro ouput property.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty OutPropertyUpdateComponentModel.OutPropertyUpdateComponentModel(String propertyName, String outPropertyName, int outPropertyType, BigDecimal outDefaultNumber, Date outDefaultDate, String outDefaultString, boolean updateBeforeChild) Builds an OutPropertyUpdateComponentModel. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.booleanReturns true if the component is valid.Gets the date value.intGets the maximum child count (1).Gets the number value.Gets the out property name.intGets the out property type.Gets the property name.List<com.highdeal.pnr.hci.PropertyReference>Returns the list of the properties that are used in this component.Gets the string value.booleanvoidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetDateValue(Date d) Sets the date value.voidsetNumberValue(BigDecimal number) Sets the number value.voidsetOutPropertyName(String name) Sets the out property name.voidsetOutPropertyType(int type) Sets the out property type.voidsetPropertyName(String name) Sets the property name.voidSets the string value.voidsetUpdateBeforeChild(boolean updateBeforeChild) Methods inherited from class com.highdeal.pnr.hci.RateComponentModel
addCharacterData, findRootRateModel, getChildAt, getChildCount, getChildren, getContext, getDescription, getName, getParent, getPropertyNames, inheritedContext, isRemoveChildAllowed, isSetChildAllowed, remove, removeChild, setAttributes, setChild, setChildren, setDescription, setName, setParent
-
Field Details
-
PROPERTY_NAME
- See Also:
-
OUT_PROPERTY_NAME
- See Also:
-
-
Constructor Details
-
OutPropertyUpdateComponentModel
public OutPropertyUpdateComponentModel()Builds an empty OutPropertyUpdateComponentModel. -
OutPropertyUpdateComponentModel
public OutPropertyUpdateComponentModel(String propertyName, String outPropertyName, int outPropertyType, BigDecimal outDefaultNumber, Date outDefaultDate, String outDefaultString, boolean updateBeforeChild) Builds an OutPropertyUpdateComponentModel. SeesetOutPropertyType- Parameters:
propertyName- the source property name.outPropertyName- the output property name.outPropertyType- the output property type.outDefaultNumber- the output default Number value.outDefaultDate- the output default Date value.outDefaultString- the output default String value.updateBeforeChild- true if the update is performed before to execute the child.
-
-
Method Details
-
setPropertyName
Sets the property name.- Parameters:
name- the property name.
-
getPropertyName
Gets the property name.- Returns:
- the property name.
-
setOutPropertyName
Sets the out property name.- Parameters:
name- the out property name.
-
getOutPropertyName
Gets the out property name.- Returns:
- the out property name.
-
setOutPropertyType
public void setOutPropertyType(int type) - Parameters:
type- the out property.
-
getOutPropertyType
public int getOutPropertyType()- Returns:
- the out property.
-
getNumberValue
Gets the number value.- Returns:
- the number value.
-
setNumberValue
Sets the number value.- Parameters:
number- the number value.
-
getStringValue
Gets the string value.- Returns:
- the string value.
-
setStringValue
Sets the string value.- Parameters:
s- the string value.
-
getDateValue
Gets the date value.- Returns:
- the date value.
-
setDateValue
Sets the date value.- Parameters:
d- the date value.
-
isUpdateBeforeChild
public boolean isUpdateBeforeChild() -
setUpdateBeforeChild
public void setUpdateBeforeChild(boolean updateBeforeChild) -
getMaxChildCount
public int getMaxChildCount()Gets the maximum child count (1). Only one child is allowed for this component.- Specified by:
getMaxChildCountin classRateComponentModel- Returns:
- the maximum child count.
-
checkValidity
public boolean checkValidity()Returns true if the component is valid. Component is valid if all the following conditions are met:- The out property is not null and is valid in the context with the specified type,
- The source property is not null and is valid in the context with the specified type,
- The default value for the specified type is not null.
- Specified by:
checkValidityin classRateComponentModel- Returns:
- true if the component is valid, false otherwise.
-
getPropertyReferences
Description copied from class:RateComponentModelReturns the list of the properties that are used in this component.- Specified by:
getPropertyReferencesin classRateComponentModel- Returns:
- the list of the properties that are used in this component
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Overrides:
addChildin classRateComponentModel- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Overrides:
marshalin classRateComponentModel- Parameters:
output- TheXML outputto marshal the object into
-