Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

oracle.dss.rules.discriminator
Class TotalsDiscriminator

java.lang.Object
  extended by oracle.dss.rules.discriminator.TotalsDiscriminator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Discriminator, DiscriminatorState, DiscriminatorXML

public class TotalsDiscriminator
extends java.lang.Object
implements DiscriminatorXML, DiscriminatorState

Discriminator for a rule that applies to databody cells that do not represent calculated totals. This discriminator allows you to exclude calculated totals when you apply formatting. For example, if you want to apply a background color to values above 8000, but you do not want that background color applied to calculated totals, then you create a 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);
 

See Also:
DataDirector.insertMemberCalc(int, int, int, int, java.lang.Object), DataDirector.deleteMemberCalc(int, int, int), DataMap.DATA_ISTOTAL, Serialized Form

Field Summary
static java.lang.String NAME_TOTALS_DISC
           
protected static java.lang.String S_NAME_TOTALS_DISC
           
 
Constructor Summary
TotalsDiscriminator()
          Constructor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_NAME_TOTALS_DISC

protected static final java.lang.String S_NAME_TOTALS_DISC
See Also:
Constant Field Values

NAME_TOTALS_DISC

public static final java.lang.String NAME_TOTALS_DISC
See Also:
Constant Field Values
Constructor Detail

TotalsDiscriminator

public TotalsDiscriminator()
Constructor.

Method Detail

getXML

public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
                                             ComponentTypeConverter converter,
                                             boolean emptyElement)
Description copied from interface: DiscriminatorXML
Retrieves XML that represents properties and their values in the form of and ObjectNode.

Specified by:
getXML in interface DiscriminatorXML
Parameters:
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.
Returns:
XML for the properties and values.

setXML

public boolean setXML(oracle.dss.util.xml.ObjectNode node,
                      ComponentTypeConverter converter,
                      java.lang.String version,
                      int reset)
Description copied from interface: DiscriminatorXML
Specifies XML that represents properties and values. This method applies the values of the properties in the XML to the DiscriminatorXML.

Specified by:
setXML in interface DiscriminatorXML
Parameters:
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.
Returns:
true if XML is properly applied, false if the XML cannot be applied.
See Also:
Rule.RESET_NONE, Rule.RESET_XML_PROPERTIES, Rule.RESET_EVERYTHING

applies

public boolean applies(RuleContext context)
Specifies whether this Discriminator applies. Compares the information in the specified RuleContext with its internal information. If they match, this Discriminator applies.

Specified by:
applies in interface Discriminator
Parameters:
context - The context of the item to be painted.
Returns:
true if the information from the context meets the condition specified in this Discriminator, false if not.

clone

public java.lang.Object clone()
Clones this Discriminator.

Specified by:
clone in interface Discriminator
Overrides:
clone in class java.lang.Object
Returns:
The clone of this Discriminator.

equals

public boolean equals(java.lang.Object o)
Indicates whether the specified object is equivalent to this TotalsDiscriminator.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to compare with this TotalsDiscriminator.
Returns:
true if the specified object is a TotalsDiscriminator, false if it is not a TotalsDiscriminator.

setStateAsObjectNode

public void setStateAsObjectNode(java.util.List context,
                                 oracle.dss.util.xml.ObjectNode node,
                                 DiscriminatorState baseState)
Specified by:
setStateAsObjectNode in interface DiscriminatorState

getStateAsObjectNode

public oracle.dss.util.xml.ObjectNode getStateAsObjectNode(java.util.List memberContext,
                                                           DiscriminatorState baseState)
Specified by:
getStateAsObjectNode in interface DiscriminatorState

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

Copyright © 1997, 2013, Oracle. All rights reserved.