Skip navigation links
com.bea.p13n.rules.model
Class DateTimeModel
java.lang.Object
com.bea.p13n.model.Model
com.bea.p13n.model.XmlObjectModel
com.bea.p13n.rules.model.ClauseModel
com.bea.p13n.rules.model.DateTimeModel
- All Implemented Interfaces
- Serializable, Cloneable
-
public class DateTimeModel
- extends ClauseModel
A clause model to represent one of three date time related clauses. This supports the following clause types:
- See Also
- Serialized Form
Methods inherited from class com.bea.p13n.rules.model.ClauseModel |
addBranch, addLiteral, addMethod, addMethodOrOperator, addOperator, addVariable, addVariableBinding, copy, getClauseType, getContainingRuleModel, getCopyXmlObject, initializeNew, isInActions, isInConditions, isValidTypeAlias, isValidVariableName, makeSafeCopy, toString |
Methods inherited from class com.bea.p13n.model.XmlObjectModel |
checkElement, childAdded, childRemoved, fixQName, getApplicationInstanceUri, getChild, getDocument, getLocalName, getParent, getQName, getRootXmlObject, isComplete, isNil, preRemove, propertyChanged, removeAllChildren, removeChild, setApplicationInstanceUri, setIsComplete, setIsComplete, setParent, setRootXmlObject |
Methods inherited from class com.bea.p13n.model.Model |
addChangeListener, addChild, addChild, clone, doubleEquals, equals, getChildren, getDebug, getDebug, getDocument, getParent, longEquals, removeChangeListener, removeChild, removeChild, removeEmpties, setDocument |
DATE_IS_CLAUSE_TYPE
public static final String DATE_IS_CLAUSE_TYPE
-
- See Also
- Constants Summary
DATE_IS_AFTER_CLAUSE_TYPE
public static final String DATE_IS_AFTER_CLAUSE_TYPE
-
- See Also
- Constants Summary
DATETIME_IS_AFTER_CLAUSE_TYPE
public static final String DATETIME_IS_AFTER_CLAUSE_TYPE
-
- See Also
- Constants Summary
DateTimeModel
public DateTimeModel()
setXmlObject
public void setXmlObject(String clauseType,
org.apache.xmlbeans.XmlObject clause)
throws IllegalArgumentException
- Description copied from class:
ClauseModel
- Initialize this clause model with a type and a root object.
This will fire ChangeEvents
for clauseType and rootXmlObject.
Subclasses should override to call super.setXmlObject() and do any type checking and verification.
It is not expected that ClauseModels are valid after a call to this method which throws an exception, although the caller could recall this method with valid data.
-
- Overrides:
setXmlObject
in class ClauseModel
-
- Parameters
clauseType
- the clause type of the clause.
clause
- the root xml object of the clause.
- Throws
IllegalArgumentException
- thrown if the clause is not valid for the ClauseModel or clauseType.
createNewXmlObject
public org.apache.xmlbeans.XmlObject createNewXmlObject(String clauseType)
throws IllegalArgumentException
- Description copied from class:
ClauseModel
- Create a new, empty root object for the specified clauseType.
Subclasses need to implement this to create an appropriately typed and filled root XmlObject which represents the ClauseModel. The return value from this needs to be accepted from ClauseModel.setXmlObject(java.lang.String, org.apache.xmlbeans.XmlObject)
for the specified clauseType.
-
- Specified by:
createNewXmlObject
in class ClauseModel
-
- Parameters
clauseType
- the clause type of the clause.
- Returns
- a new, empty initialize root object.
- Throws
IllegalArgumentException
- thrown on an unsupproted clauseType.
clearCachedData
public void clearCachedData()
- Description copied from class:
XmlObjectModel
- Subclasses need to override this to clear out any cached data. This will be automatically called when the root XmlObject or clauseType
changes
.
-
- Specified by:
clearCachedData
in class XmlObjectModel
getCalendar
public Calendar getCalendar()
- Get the date or time-instant object being checked.
-
- Returns
- the calendar of the date or time-instant, or null if not set.
getCalendarNoCache
protected Calendar getCalendarNoCache()
setCalendar
public void setCalendar(Calendar cal)
determineIsComplete
protected boolean determineIsComplete()
- This is complete if the calendar is set.
-
- Overrides:
determineIsComplete
in class XmlObjectModel
Skip navigation links
Copyright © 2010, Oracle. All rights reserved.