public class TierTableRowModel extends java.lang.Object implements XMLMarshallable
While the rating, if the searched group name is not present, the default group
is used. The name of this group is a null string.
Otherwise the row could match only value with the same group name.
A lower or upper ranges can be inclusive or not (default is exclusive). For each input range, at least one or many output value(s) can be defined. Output values can be of type string or decimal.
If the lower range is not set, that means there is no lower limit. If the upper range is not set, that means there is no upper limit. If the upper and lower ranges are not set, that means there is no lower and upper limit.
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="tierTableRow">
<xs:complexType>
<xs:attribute name="gn" type="xs:string" use="optional"/>
<xs:attribute name="lowerRange" type="xs:decimal" use="optional"/>
<xs:attribute name="lowerRangeInclusive" type="xs:boolean" use="optional"/>
<xs:attribute name="upperRange" type="xs:decimal" use="optional"/>
<xs:attribute name="upperRangeInclusive" type="xs:boolean" use="optional"/>
<xs:attribute name="s0" type="xs:string" use="optional"/>
<xs:attribute name="n0" type="xs:decimal" use="optional"/>
<xs:attribute name="s1" type="xs:string" use="optional"/>
<xs:attribute name="n1" type="xs:decimal" use="optional"/>
<xs:attribute name="s2" type="xs:string" use="optional"/>
<xs:attribute name="n2" type="xs:decimal" use="optional"/>
<xs:attribute name="s3" type="xs:string" use="optional"/>
<xs:attribute name="n3" type="xs:decimal" use="optional"/>
<xs:attribute name="s4" type="xs:string" use="optional"/>
<xs:attribute name="n4" type="xs:decimal" use="optional"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
TierTableRowModel()
Builds an empty TierTableRowModel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
java.lang.String |
getGroupName()
Returns the group name for this row.
|
java.math.BigDecimal |
getLowerRange()
Returns the lower range for this row.
|
java.lang.Object |
getOutValue(int outIndex)
Returns the output value from an index.
|
java.math.BigDecimal |
getUpperRange()
Returns the upper range for this row.
|
boolean |
isLowerRangeInclusive()
Indicates if the lower range is inclusive or not.
|
boolean |
isUpperRangeInclusive()
Indicates if the upper range is inclusive or not.
|
boolean |
isValid(java.util.Vector<TierTableOutAttributeModel> outAttributes)
Returns true if the tier table range is valid.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
boolean |
sameGroupAs(TierTableRowModel otherRow)
Returns true if both rows belong to the same group.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setGroupName(java.lang.String groupName)
Sets the group name for this row.
|
void |
setLowerRange(java.math.BigDecimal lowerRange)
Sets the lower range for this row.
|
void |
setLowerRangeInclusive(boolean inclusive)
Sets if the lower range is inclusive or not.
|
void |
setOutValue(int outIndex,
java.lang.Object value)
Sets the output value at an index.
|
void |
setUpperRange(java.math.BigDecimal upperRange)
Sets the the upper range for this row.
|
void |
setUpperRangeInclusive(boolean inclusive)
Sets if the upper range is inclusive or not.
|
java.lang.String |
toString() |
public java.lang.String getGroupName()
public void setGroupName(java.lang.String groupName)
groupName - the group name for this rowpublic java.math.BigDecimal getLowerRange()
public void setLowerRange(java.math.BigDecimal lowerRange)
lowerRange - the lower range for this row.public boolean isLowerRangeInclusive()
public void setLowerRangeInclusive(boolean inclusive)
inclusive - the lower range is inclusive or not.public java.math.BigDecimal getUpperRange()
public void setUpperRange(java.math.BigDecimal upperRange)
upperRange - the upper range for this row.public boolean isUpperRangeInclusive()
public void setUpperRangeInclusive(boolean inclusive)
inclusive - the upper range is inclusive or not.public java.lang.Object getOutValue(int outIndex)
outIndex - the index.public void setOutValue(int outIndex,
java.lang.Object value)
outIndex - the index.value - the output value.public boolean sameGroupAs(TierTableRowModel otherRow)
otherRow - the other row of comparison.public boolean isValid(java.util.Vector<TierTableOutAttributeModel> outAttributes)
outAttributes - a Vector of TierTableOutAttributeModel representing out attribute format.public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic java.lang.String toString()
toString in class java.lang.Object