Oracle® Fusion Middleware User's Guide for Oracle Business Rules 11g Release 1 (11.1.1) Part Number E10228-02 |
|
|
View PDF |
This appendix lists the extension methods. This appendix includes the following sections:
Section B.1, "Duration Extension Methods (oracle.rules.rl.extensions.Duration)"
Section B.2, "JavaDate Extension Methods (oracle.rules.rl.extensions.JavaDate)"
Section B.3, "XMLDate Extension Methods (oracle.rules.rl.extensions.XMLDate)"
Section B.4, "OracleDate Methods (oracle.rules.sdk2.extensions.OracleDate)"
Section B.5, "OracleDuration Methods (oracle.rules.sdk2.extensions.OracleDuration)"
Table B-1 lists the Duration methods.
Use the Duration methods to calculate a duration between two dates. The Duration methods all take two date arguments. The Duration methods are overloaded so that the first argument is one of, java.util.Calendar
or javax.xml.datatype.XMLGregorianCalendar
, and the second argument is one of java.util.Calendar
or javax.xml.datatype.XMLGregorianCalendar
.
Rules Designer lists the arguments and valid types for each method in the list.
Table B-1 Oracle Business Rules Duration Methods
Method | Returns | Description |
---|---|---|
|
Compares two dates and returns an |
|
|
Returns the difference between the two dates in days. |
|
|
Returns the difference between the two dates in hours. |
|
|
Returns the difference between the two dates in milliseconds. |
|
|
Returns the difference between the two dates in minutes. |
|
|
Returns the difference between the two dates in months. |
|
|
Returns the difference between the two dates in seconds. |
|
|
Returns the difference between the two dates in weeks. |
|
|
Returns the difference between the two dates in years. |
Table B-2 lists the JavaDate add and subtract methods. Table B-3 lists the JavaDate to and from string methods. For details see the ISO 8601 numeric representation of dates and times, at
Use the JavaDate add and subtract methods to return an updated calendar. Each method in Table B-2 returns a java.util.Calendar
. Each method takes a first argument of java.util.Calendar
, and a second argument that is either an int
or a long
, depending on the method.
Table B-2 JavaDate Add To and Subtract From Calendar Methods
Method | Arguments | Description |
---|---|---|
|
Returns a new Calendar that is the result of adding the specified number of days to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of hours to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of milliseconds to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of minutes to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of months to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of seconds to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of weeks to the specified date. |
|
|
Returns a new Calendar that is the result of adding the specified number of years to the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of days from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of hours from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of milliseconds from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of minutes from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of months from the date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of seconds from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of weeks from the specified date. |
|
|
Returns a new Calendar that is the result of subtracting the specified number of years from the specified date. |
Table B-3 JavaDate Date and Time String Methods
Method | Returns | Description |
---|---|---|
|
Creates a Calendar instance for the specified ISO 8601 date. The argument is a String. |
|
|
Creates a Calendar instance for the specified ISO 8601 date and time. The argument is a String. |
|
|
Creates a Calendar instance for the specified ISO 8601 time. The argument is a String. |
|
|
Return the ISO 8601 representation of the specified date. The argument is a |
|
|
Return the ISO 8601 representation of the specified date and time. The argument is a |
|
|
Return the ISO 8601 representation of the specified time. The argument is a |
Table B-4 lists the XMLDate add and subtract methods. Table B-5 lists the XMLDate to and from string methods. For details see the ISO 8601 numeric representation of dates and times, at
Use the XMLDate add and subtract methods to return an updated XMLGregorianCalendar. Each method in Table B-4 returns a javax.xml.datatype.XMLGregorianCalendar
. Each method takes a first argument of javax.xml.datatype.XMLGregorianCalendar
, and a second argument that is either an int
or a long
, depending on the method.
Table B-4 XMLDate Add To and Subtract From Methods
Method | Arguments | Description |
---|---|---|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of days to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of hours to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of milliseconds to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of minutes to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of months to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of seconds to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of weeks to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of adding the specified number of years to the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of days from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of hours from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of milliseconds from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of minutes from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of months from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of seconds from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of weeks from the specified XMLGregorianCalendar. |
|
|
Returns a new XMLGregorianCalendar that is the result of subtracting the specified number of years from the specified XMLGregorianCalendar. |
Table B-5 XMLDate To and From String Methods
Method | Returns | Description |
---|---|---|
|
Creates an XMLGregorianCalendar instance from specified ISO 8601 date, datetime or time. Takes a single |
|
|
|
Return the ISO 8601 representation of the specified XMLGregorianCalendar.Takes a single |
Table B-6 lists the OracleDate add and subtract methods. Table B-7 lists the OracleDate to and from string methods. For details see the ISO 8601 numeric representation of dates and times, at http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/date_and_time_format.htm
.
Use the OracleDate add and subtract methods to return an updated Timestamp. Each method in Table B-6 returns an oracle.jbo.domain.Timestamp
. Each method takes a first argument of oracle.jbo.domain.Timestamp
, and a second argument that is either an int
or a long
, depending on the method.
Table B-6 OracleDate Add To and Subtract From Methods
Method/Arguments | Description |
---|---|
|
Returns a new Timestamp instance that is the result of adding the specified number of days to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of hours to the specified Timestamp instance. |
|
Returns a Timestamp instance that is the result of adding the specified number of milliseconds to the Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of minutes to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of months to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of seconds to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of weeks to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of adding the specified number of years to the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of days from the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of hours from the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of milliseconds from the Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of minutes from the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of months from the date. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of seconds from the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of weeks from the specified Timestamp instance. |
|
Returns a new Timestamp instance that is the result of subtracting the specified number of years from the specified Timestamp instance. |
Table B-7 OracleDate To String and From String Methods
Method | Returns | Description |
---|---|---|
|
|
Creates a Timestamp instance for the specified ISO 8601 date and time string. Takes a single |
|
|
Return a GregorianCalendar representing the specified Timestamp. Takes a single oracle.jbo.domain.Timestamp argument. |
|
|
Return the ISO 8601 representation of the specified Timestamp instance. Takes a single oracle.jbo.domain.Timestamp argument. |
Use the Duration methods to calculate a duration between two dates. The Duration methods all take two date arguments. The Duration methods are overloaded so that the first argument is one of, java.util.Calendar
, oracle.jbo.domain.Timestamp
, javax.xml.datatype.XMLGregorianCalendar
, and the second argument is one of java.util.Calendar, oracle.jbo.domain.Timestamp, or javax.xml.datatype.XMLGregorianCalendar
. Note that one argument for the methods must be a Timestamp (oracle.jbo.domain.Timestamp
).
Rules Designer lists the arguments and valid types for each method in the list.
Table B-8 lists the OracleDuration methods.
Table B-8 OracleDuration Methods
Method | Returns | Description |
---|---|---|
|
Compares two dates and returns an |
|
|
Returns the difference between the two dates in days. |
|
|
Returns the difference between the two dates in hours. |
|
|
Returns the difference between the two dates in milliseconds. |
|
|
Returns the difference between the two dates in minutes |
|
|
Returns the difference between the two dates in months. |
|
|
Returns the difference between the two dates in seconds. |
|
|
Returns the difference between the two dates in weeks. |
|
|
Returns the difference between the two dates in years. |