public class TotalsDiscriminator extends java.lang.Object implements DiscriminatorXML, DiscriminatorState
CompositeDiscriminator
that combines
the NumberValueDiscriminator
with this TotalsDiscriminator
,
as shown in the following example:
NumberValueDiscriminator nvDisc = new NumberValueDiscriminator(8000, NumberValueDiscriminator.GT); CompositeDiscriminator compDisc = new CompositeDiscriminator(new TotalsDiscriminator(), nvDisc, CompositeDiscriminator.AND);
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME_TOTALS_DISC |
protected static java.lang.String |
S_NAME_TOTALS_DISC |
Constructor and Description |
---|
TotalsDiscriminator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
applies(RuleContext context)
Specifies whether this
Discriminator applies. |
java.lang.Object |
clone()
Clones this
Discriminator . |
boolean |
equals(java.lang.Object o)
Indicates whether the specified object is equivalent to this
TotalsDiscriminator . |
oracle.dss.util.xml.ObjectNode |
getStateAsObjectNode(java.util.List memberContext,
DiscriminatorState baseState) |
oracle.dss.util.xml.ObjectNode |
getXML(boolean allProperties,
ComponentTypeConverter converter,
boolean emptyElement)
Retrieves XML that represents properties and their values in the form
of and
ObjectNode . |
void |
setStateAsObjectNode(java.util.List context,
oracle.dss.util.xml.ObjectNode node,
DiscriminatorState baseState) |
boolean |
setXML(oracle.dss.util.xml.ObjectNode node,
ComponentTypeConverter converter,
java.lang.String version,
int reset)
Specifies XML that represents properties and values.
|
protected static final java.lang.String S_NAME_TOTALS_DISC
public static final java.lang.String NAME_TOTALS_DISC
public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, ComponentTypeConverter converter, boolean emptyElement)
DiscriminatorXML
ObjectNode
.getXML
in interface DiscriminatorXML
allProperties
- true
to store all property values in XML,
false
to store only values that are different
from default values.converter
- A converter that converts component strings to integers
and integers to strings.emptyElement
- true
if an empty element needs to be returned
when none of the property values have changed from default.
false
if null should should be returned when
none of the property values have changed from default.
This argument is considered only if
allProperties
is false
.ObjectNode
.public boolean setXML(oracle.dss.util.xml.ObjectNode node, ComponentTypeConverter converter, java.lang.String version, int reset)
DiscriminatorXML
DiscriminatorXML
.setXML
in interface DiscriminatorXML
node
- ObjectNode
that has the properties and their values.converter
- A converter that converts component strings to integers
and vice versa.version
- The XML version.reset
- A constant that indicates how much to reset when XML
is applied. Valid values are listed in the See Also section.true
if XML is properly applied,
false
if the XML cannot be applied.Rule.RESET_NONE
,
Rule.RESET_XML_PROPERTIES
,
Rule.RESET_EVERYTHING
DiscriminatorXML
.public boolean applies(RuleContext context)
Discriminator
applies.
Compares the information in the specified RuleContext
with its internal information.
If they match, this Discriminator
applies.applies
in interface Discriminator
context
- The context of the item to be painted.true
if the information from the context meets
the condition specified in this Discriminator
,
false
if not.public java.lang.Object clone()
Discriminator
.clone
in interface Discriminator
clone
in class java.lang.Object
Discriminator
.public boolean equals(java.lang.Object o)
TotalsDiscriminator
.equals
in class java.lang.Object
o
- The object to compare with this TotalsDiscriminator
.true
if the specified object is a
TotalsDiscriminator
,
false
if it is not a TotalsDiscriminator
.public void setStateAsObjectNode(java.util.List context, oracle.dss.util.xml.ObjectNode node, DiscriminatorState baseState)
setStateAsObjectNode
in interface DiscriminatorState
public oracle.dss.util.xml.ObjectNode getStateAsObjectNode(java.util.List memberContext, DiscriminatorState baseState)
getStateAsObjectNode
in interface DiscriminatorState