|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dss.rules.discriminator.ValueDiscriminator
oracle.dss.rules.discriminator.DateValueDiscriminator
public class DateValueDiscriminator
Discriminator
for a rule that applies based on
a comparison of two date values.
For example, you could use this Discriminator
to specify
that a DiscriminatorRule
should apply to date values after
11/20/98.
This Discriminator
compares an internal
Date
value to a value that
is in the RuleContext
that describes the item to be displayed.
In the comparison, the left operand comes from the RuleContext
,
and the right operand is the value stored in this Discriminator
.
Field Summary | |
---|---|
protected static java.lang.String |
a_date
|
static java.lang.String |
NAME_DATE_VAL_DISC
|
protected static java.lang.String |
s_date
|
protected static java.lang.String |
S_NAME_DATE_VAL_DISC
|
Fields inherited from class oracle.dss.rules.discriminator.ValueDiscriminator |
---|
a_relOperator, eq, EQ, ge, GE, gt, GT, le, LE, lt, LT, m_relOperator, ne, NE, s_relOperator |
Constructor Summary | |
---|---|
DateValueDiscriminator()
Constructor that does not specify a date or a relational operator. |
|
DateValueDiscriminator(java.sql.Date date,
int relationalOperator)
Constructor that specifies the date and relational operator. |
Method Summary | |
---|---|
boolean |
applies(RuleContext context)
Specifies whether the value from the DataView item meets
the conditions specified in this Discriminator . |
java.lang.Object |
clone()
Clones this DateValueDiscriminator . |
boolean |
equals(java.lang.Object o)
Indicates whether the specified object is equivalent to this DateValueDiscriminator . |
java.sql.Date |
getDate()
Retrieves the date for this DateValueDiscriminator . |
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 |
setDate(java.sql.Date date)
Specifies the date value for this DateValueDiscriminator . |
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 oracle.dss.rules.discriminator.ValueDiscriminator |
---|
convertRelOperatorToInt, convertRelOperatorToString, getRelOperator, setRelOperator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String S_NAME_DATE_VAL_DISC
protected static final java.lang.String s_date
protected static final java.lang.String a_date
public static final java.lang.String NAME_DATE_VAL_DISC
Constructor Detail |
---|
public DateValueDiscriminator()
setDate
method to
specify a date to compare with.
Call setRelOperator
to specify the way the dates
should compare, remembering that the left operand comes from the
RuleContext
and the right operand is the date that you
set for this Discriminator
.
public DateValueDiscriminator(java.sql.Date date, int relationalOperator)
date
- The value for this Discriminator
. This date
becomes the right operand in the comparison.relationalOperator
- The relationship that the value from the
RuleContext
should have with date
, in
order for this Discriminator
to apply. Valid constants
are listed in the See Also section.ValueDiscriminator.EQ
,
ValueDiscriminator.GE
,
ValueDiscriminator.GT
,
ValueDiscriminator.LE
,
ValueDiscriminator.LT
,
ValueDiscriminator.NE
Method Detail |
---|
public java.lang.Object clone()
DateValueDiscriminator
.
clone
in interface Discriminator
clone
in class ValueDiscriminator
DateValueDiscriminator
.public void setDate(java.sql.Date date)
DateValueDiscriminator
.
d
- The date that the date from the DataView
item
must compare to in order to apply. The relationship that the
two dates must have is specified by the
RelOperator
property of the superclass.public java.sql.Date getDate()
DateValueDiscriminator
.
DataView
item
will be compared. The relationship that the two dates must
have is specified by the RelOperator
property of
the superclass.public boolean applies(RuleContext context)
DataView
item meets
the conditions specified in this Discriminator
.
For example, if the date for this DateValueDiscriminator
is 11/20/98 and the RelOperator
is GT
(>), then
this method returns true
if the value in the specified
RuleContext
is after 11/20/98.
applies
in interface Discriminator
context
- The context of the item to be displayed.
true
if the Date
value from
context
has the specified relationship with the
number in this Discriminator
,
false
if not.public boolean equals(java.lang.Object o)
DateValueDiscriminator
.
They are equivalent if the dates are equal and if the
RelOperator
values are equal.
equals
in class java.lang.Object
o
- The object to compare with this
DateValueDiscriminator
.
true
if both objects have the same date and
RelOperator
false
if not or if o
is not a
DateValueDiscriminator
.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
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
.
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
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Data Visualization Components 11g Release 1 (11.1.1.1.0) E12063-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |