|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 2 (11.1.2.2.0) E17492-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.dss.rules.discriminator.CompositeDiscriminator
public class CompositeDiscriminator
Discriminator
that combines two Discriminator
objects, for complex rules that are based on more than one kind of information. For example, you might want to italicize values for December 1999 that are greater than 500,000. To do this, you would create a QDRDiscriminator
to specify the "December 1999" condition, and a NumberValueDiscriminator
to specify the "greater than 500,000" condition. Then you would create a CompositeDiscriminator
to combine the two conditions.
This class supports the following conditional operators: AND, OR, and NOT. Note that the NOT operation uses only the left operand.
QDRDiscriminator
, NumberValueDiscriminator
, DiscriminatorRule
, Serialized FormField Summary | |
---|---|
protected static java.lang.String |
a_condOperator |
protected static java.lang.String |
a_leftDisc |
protected static java.lang.String |
a_rightDisc |
protected static java.lang.String |
and |
static int |
AND Conditional AND (&&). |
protected int |
m_condOperator |
protected java.util.Hashtable |
m_context |
protected Discriminator |
m_left |
protected Discriminator |
m_right |
static java.lang.String |
NAME_COMPOS_DISC |
protected static java.lang.String |
not |
static int |
NOT Logical NOT (!). |
protected static java.lang.String |
or |
static int |
OR Conditional OR (||). |
protected static java.lang.String |
s_condOperator |
protected static java.lang.String |
S_NAME_COMPOS_DISC |
protected static java.lang.String |
s_rightDisc |
Constructor Summary | |
---|---|
CompositeDiscriminator() Constructor that does not specify base discriminators or an operator. |
|
CompositeDiscriminator(Discriminator l, Discriminator r, int condOp) Constructor that specifies the base discriminators and the operator. |
Method Summary | |
---|---|
boolean |
applies(RuleContext context) Specifies whether the composite condition is met by the specified RuleContext . |
java.lang.Object |
clone() Clones this CompositeDiscriminator . |
static Discriminator |
createDiscriminator(java.util.List context, oracle.dss.util.xml.ObjectNode discNode, DiscriminatorState baseState) |
boolean |
equals(java.lang.Object o) Determine if the given object is equal to this CompositeDiscriminator. |
int |
getCondOperator() Retrieves the conditional operator of this CompositeDiscriminator . |
Discriminator |
getLeft() Retrieves the left Descriminator . |
Discriminator |
getRight() Retrieves the right Descriminator . |
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 |
setCondOperator(int condOp) Specifies the conditional operator for this CompositeDiscriminator . |
void |
setContext(java.util.Hashtable context) |
void |
setLeft(Discriminator discriminator) Specifies the left Discriminator . |
void |
setRight(Discriminator discriminator) Specifies the right Discriminator . |
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 |
---|
protected Discriminator m_left
protected Discriminator m_right
protected int m_condOperator
public static final int AND
CompositeDiscriminator
will apply only when both base Discriminator
s apply.
public static final int OR
CompositeDiscriminator
will apply when either of the base Discriminator
s apply.
public static final int NOT
CompositeDiscriminator
will apply when the base Discriminator
(the left operand) does not apply. When you use this operator, you only need one Discriminator
.
protected static final java.lang.String S_NAME_COMPOS_DISC
protected static final java.lang.String s_condOperator
protected static final java.lang.String s_rightDisc
protected java.util.Hashtable m_context
public static final java.lang.String NAME_COMPOS_DISC
protected static final java.lang.String a_condOperator
protected static final java.lang.String a_rightDisc
protected static final java.lang.String a_leftDisc
protected static final java.lang.String and
protected static final java.lang.String or
protected static final java.lang.String not
Constructor Detail |
---|
public CompositeDiscriminator()
setLeft
and setRight
methods to set the base discriminators. Call the setCondOperator
to specify the conditional operator.public CompositeDiscriminator(Discriminator l, Discriminator r, int condOp)
l
- The left Discriminator
.r
- The right Discriminator
.int
- A constant that specifies the conditional operator to use for this composite.Method Detail |
---|
public java.lang.Object clone()
CompositeDiscriminator
.clone
in interface Discriminator
clone
in class java.lang.Object
CompositeDiscriminator
.public int getCondOperator()
CompositeDiscriminator
.CompositeDiscriminator
uses to compare the two base discriminators.AND
, OR
, NOT
public void setCondOperator(int condOp)
CompositeDiscriminator
.condOp
- A constant that represents the conditional operator that CompositeDiscriminator
uses to compare the two base discriminators. Valid constants are listed in the See Also section.AND
, OR
, NOT
public Discriminator getLeft()
Descriminator
.Discriminator
that is the left operand in the composite condition.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to test for equalitypublic void setLeft(Discriminator discriminator)
Discriminator
.The
- Discriminator
to use as the left operand in the composite condition.public Discriminator getRight()
Descriminator
.Discriminator
that is the right operand in the composite condition.public void setRight(Discriminator discriminator)
Discriminator
.The
- Discriminator
to use as the right operand in the composite condition.public boolean applies(RuleContext context)
RuleContext
. This method passes the RuleContext
to the applies
method of each base Discriminator
and evaluates the resulting conditional expression.applies
in interface Discriminator
context
- The context of the item to be painted.true
if the RuleContext
meets the complex condition in this CompositeDiscriminator
, false
if not.public void setContext(java.util.Hashtable context)
context
- A hashtable that a user can use to pass XMLContext One can also use this table to pass more information to its objects.public boolean setXML(oracle.dss.util.xml.ObjectNode node, ComponentTypeConverter converter, java.lang.String version, int reset)
Discriminator
.setXML
in interface DiscriminatorXML
node
- ObjectNode
that has the properties and their values.converter
- A converter that converts component strings to integers and integers to strings.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
public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, ComponentTypeConverter converter, boolean emptyElement)
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
.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
public static Discriminator createDiscriminator(java.util.List context, oracle.dss.util.xml.ObjectNode discNode, DiscriminatorState baseState)
|
Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components 11g Release 2 (11.1.2.2.0) E17492-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |