Oracle® Fusion Middleware User's Guide for Oracle Business Rules 11g Release 1 (11.1.1.6.0) Part Number E10228-07 |
|
|
PDF · Mobi · ePub |
In the following sections, there are multiple tables whose each row has a Kind column that is either Cl, Co, M, sM, P, or sP (Class, Constructor, Method, static Method, Property, or static Property (Java static final field) respectively). The first row in each table specifies the class. When the Java Name is the same as the OBR Name (the rule SDK terms it the Alias), a '-' is displayed. The Signature column provides type information for methods, functions, and properties. The signature of a property is actually the type, for example BigDecimal
. The signature of a method or function is of the form return(arg1,arg2,...)
, where return
is the return type and arg1,arg2,...
are the argument types.
This appendix covers the following sections:
This section covers the String-related classes provided by Oracle Business Rules.
Table B-1 lists the String
class.
Table B-1 The String Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
String |
Cl |
- |
java.lang.String |
Java immutable character strings. Beware, Java uses 0-based indexing for characters in strings, and XML uses 1-based indexing |
|
charAt |
S |
char(int) |
- |
Returns the char value at 0-based index arg1. "Oracle".charAt(2)=='a'. |
|
compareTo |
M |
int(String) |
- |
Returns the value 0 if the argument string is equal to this string; a value less than 0 if this string is lexicographically less than the string argument; and a value greater than 0 if this string is lexicographically greater than the string argument. "a".compareTo("b")<0. |
|
contains |
M |
boolean(String) |
- |
Tests whether this string contains arg1. "Oracle".contains("rac")==true. |
|
endsWith |
M |
boolean(String) |
- |
Tests whether this string ends with arg1. "Oracle".endsWith("le")==true. |
|
equalsIgnoreCase |
M |
boolean(String) |
- |
Tests whether this string equals arg1, ignoring case consideration. "Oracle".equalsIgnoreCase("oRaClE")==true. |
|
indexOf |
M |
int(String,int) |
- |
Returns the 0-based index of the start of arg1 within this String, but not before the 0-based index arg2. "banana".indexOf("an",2)==3. |
|
lastIndexOf |
M |
int(String,int) |
- |
Returns the 0-based index within this string of the last occurrence of arg1, searching backward starting at the index arg2. "banana".lastIndexOf("an","banana".length())==3. |
|
length |
M |
int |
- |
Returns the length of this string. "Oracle".length()==6. |
|
matches |
M |
boolean(String) |
- |
Tests if this string matches the given regular expression. "banana".matches("^b.*a$")==true. |
|
replaceAll |
M |
String(String,String) |
- |
Replaces each substring of this string that matches arg1 (a regular expression) with arg2. "banana".replaceAll(".a","xo")=="xoxoxo". |
|
replaceFirst |
M |
String(String,String) |
- |
Replaces first substring of this string that matches arg1 (a regular expression) with arg2. "banana".replaceFirst(".a","xo")=="xonana". |
|
startsWith |
M |
boolean(String) |
- |
Tests whether this string starts with arg1. "Oracle".startsWith("Or")==true. |
|
substring |
M |
String(int,int) |
- |
Returns the substring of this string, starting with the 0-based index arg1, and ending before the 0-based index arg2. "Oracle".substring(1,4)=="rac". |
|
toLowerCase |
M |
String() |
- |
Converts this string to lower case. "Oracle".toLowerCase()=="oracle". |
|
toUpperCase |
M |
String() |
- |
Converts this string to upper case. "Oracle".toUpperCase()=="ORACLE". |
|
trim |
M |
String() |
- |
Removes leading and trailing whitespace. " Oracle ".trim()=="Oracle". |
|
Table B-2 lists the RL class strings methods.
Table B-2 The RL Class String Methods
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
RL |
Cl |
- |
oracle.rules.rl.extensions.RL |
Supplement standard Java classes with W3C RIF functionality. |
|
string.join |
sM |
String(String...) |
stringJoin |
Concatenates first n-1 args using the last arg as a separator. RL.string.join("a","b","c","#")=="a#b#c". |
|
string.substring |
sM |
String(String,int,int) |
substring |
Returns the substring of arg1, beginning at the 1-based index arg2, and continuing for arg3 characters. RL.string.substring("Oracle",2,3)=="rac". |
|
string.suffix |
sM |
String(String,int) |
substring |
Returns the suffix of arg1, beginning at the 1-based index arg2. RL.string.suffix("Oracle",5)=="le". |
|
string.substring before |
sM |
String(String,String) |
substringBefore |
Returns the substring of arg1 that occurs before arg2. RL.string.substring before("Oracle","ac")=="Or". |
|
string.substring after |
sM |
String(String,String) |
substringAfter |
Returns the substring of arg1 that occurs after arg2. RL.string.substring after("Oracle","ac")=="le". |
|
string.iri.encode path |
sM |
String(String) |
encodeForURI |
Encodes characters not permitted in an URI path. RL.string.iri encode path("Oracle Business Rules")=="Oracle%20Business%20Rules". |
|
string.iri.to uri |
sM |
String(String) |
iriToUri |
Encodes some characters not permitted in a URI. RL.string.iri to uri("http://www.example.com/~bébé")=="http://www.example.com/~b%C3%A9b%C3%A9" |
|
string.iri.to ascii |
sM |
String(String) |
escapeHtmlUri |
Encodes non-ascii characters. RL.string.iri to ascii("javascript:if (navigator.browserLanguage == 'fr') window.open('http://www.example.com/~bébé');")=="javascript:if (navigator.browserLanguage == 'fr') window.open('http://www.example.com/~b%C3%A9b%C3%A9');" |
|
string.is normalized |
sM |
boolean(String) |
isNormalizedString |
A normalized string does not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters. RL.string.is normalized(" Business Rules ")==true. |
|
string.is token |
sM |
boolean(String) |
isToken |
A token is a normalized string with no leading or trailing spaces, and no double spaces. RL.string.is token("Business Rules")==true. |
|
string.is language |
sM |
boolean(String) |
isLanguage |
A language identifier. RL.string.is language("en")==true. |
|
string.is Name |
sM |
boolean(String) |
isName |
A name is a token with no spaces (and some other constraints on its characters). RL.string.is Name("xs:Name")==true. |
|
string.is NCName |
sM |
boolean(String) |
isNCName |
A non-colonized name. RL.string.is NCName("xs:NCName")==false. |
|
string.is NMTOKEN |
sM |
boolean(String) |
isNMTOKEN |
An NMTOKEN is a Name with no restriction on the initial character. RL.string.is NMTOKEN("-Oracle")==true. |
|
string.compare |
sM |
int(String,String) |
compare |
Returns -1, 0, or 1 if arg1<arg2, arg1==arg2, or arg1>arg2, respectively. RL.string.compare("foo","bar")==1. |
|
This section covers the List classes provided by Oracle Business Rules.
Table B-3 lists the List
class.
Table B-3 The List Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
List |
Cl |
- |
java.util.List |
Represents mutable and immutable lists. Lists use 0-based indexes. Attempts to modify an immutable list may result in UnsupportedOperationExceptions. |
|
append |
M |
void(Object) |
add |
Appends arg1 to this list. Modifies this list. |
|
add |
M |
void(int,Object) |
- |
Inserts arg2 into this list at position arg1. Modifies this list. |
|
appendAll |
M |
void(java.util.Collection) |
addAll |
Appends the contents of arg1 to this list. Modifies this list. |
|
addAll |
M |
void(int,java.util.Collection) |
- |
Inserts the contents of arg2 into this list at position arg1. Modifies this list. |
|
clear |
M |
void() |
- |
Removes the contents of this list. Modifies this list. |
|
contains |
M |
boolean(Object) |
- |
Tests whether this list contains arg1. RL.list.create(1,2,3).contains(2)==true. |
|
containsAll |
M |
boolean(java.util.Collection) |
- |
Tests whether this list contains every element in arg1. RL.list.create(1,2,3).containsAll(RL.list.create(3,2,1))==true. |
|
get |
M |
Object(int) |
- |
Get the element at position arg1. RL.list.create(1,2,3).get(1)==2. |
|
indexOf |
M |
int(Object) |
- |
Returns first index of arg1 in this list. RL.list.create(1,2,3).indexOf(2)==1. |
|
remove |
M |
boolean(Object) |
- |
Removes first occurrence of arg1 from this list. Returns whether this list was modified. |
|
remove by index |
M |
Object(int) |
remove |
Removes and return the element at position arg1. Modifies this list. |
|
removeAll |
M |
boolean(java.util.Collection) |
- |
Removes all elements from this list that are contained in arg1. Returns whether this list was modified. |
|
retainAll |
M |
boolean(java.util.Collection) |
- |
Removes all elements from this list that are *not* contained in arg1. Returns whether this list was modified. |
|
set |
M |
Object(int,Object) |
- |
Replaces the item in this list at position arg1 with arg2. Returns the replaced item. Modifies this list. |
|
size |
M |
int() |
- |
Returns the size of this list. RL.list.create(1,2,3).size()==3. |
|
subList |
M |
List(int,int) |
- |
Returns a view of the portion of this list between arg1, inclusive, and arg2, exclusive. RL.list.create(1,2,3,4).subList(1,3)==RL.list.create(2,3). |
|
Table B-4 lists the RL
class list methods.
Table B-4 The RL Class List Methods
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
RL |
Cl |
- |
oracle.rules.rl.extensions.RL |
- |
- |
list.append |
sM |
List(List,Object...) |
append |
Returns a new immutable list containing the contents of arg1, followed by arg2, arg3, ... RL.list.append(RL.list.create(1),2,3)==RL.list.create(1,2,3). |
|
list.concatenate |
sM |
List(List...) |
concatenate |
Returns a new immutable list containing the concatenation of arg1, arg2, ... RL.list.concatenate(RL.list.create(1),RL.list.create(2))==RL.list.create(1,2). |
|
list.distinct values |
sM |
List(List) |
distinctValues |
Returns a new immutable list like arg1 but with duplicates removed. RL.list.distinct values(RL.list.create(2,2))==RL.list.create(2). |
|
list.except |
sM |
List(List,List) |
except |
Returns a new immutable list containing elements from arg1 that are not in arg2. RL.list.except(RL.list.create(1,2,3,4),RL.list.create(1,3))==RL.list.create(2,4). |
|
list.get |
sM |
Object(List,int) |
get |
Returns the element at position arg2 in arg1. If arg2<0, return the element at arg1.size()+arg2. RL.list.get(RL.list.create(1,2,3),-1)==3. |
|
list.index of |
sM |
List<Integer>(List,Object) |
indexOf |
Returns a list of indexes where the arg2 occurs in arg1. RL.list.index of(RL.list.create(1,2,3,2),2)==RL.list.create(1,3). |
|
list.insert before |
sM |
List(List,int,Object) |
insertBefore |
Returns a new immutable list containing arg1 with arg3 inserted before the item at position arg2. If arg2<0, arg3 is inserted before the element at arg1.size()+arg2. RL.list.insert before(RL.list.create(1,2,3),-1,99)==RL.list.create(1,2,99,3). |
|
list.intersect |
sM |
List(List,List) |
intersect |
Returns a new immutable list containing the intersection of arg1 and arg2. RL.list.intersect(RL.list.create(1,2,3),RL.list.create(3,1))==RL.list.create(1,3). |
|
list.create |
sM |
List(Object...) |
list |
Returns a new immutable list containing the arguments. |
|
list.remove |
sM |
List(List,int) |
remove |
Returns a new immutable list containing the elements of arg1, with the element at position arg2 removed. If arg2<0, the element at arg1.size()+arg2 is removed. RL.list.remove(RL.list.create(1,2,3),0)==RL.list.create(2,3). |
|
list.reverse |
sM |
List(List) |
reverse |
Returns a new immutable list containing the elements of arg1 in reverse order. RL.list.reverse(RL.list.create(1,2,3))==RL.list.create(3,2,1). |
|
list.union |
sM |
List(List..) |
union |
Returns a new immutable list containing the concatenation of the arguments with duplicates removed. RL.list.union(RL.list.create(1,2),RL.list.create(2,3))==RL.list.create(1,2,3). |
Oracle Business Rules support the primitive Java numeric types byte
, short
, int
, long
, float
, and double
. OBR also supports the "boxed" versions: Short
, Int
, Long
, Float
, and Double
. Unlimited precision integers and decimals are supported, using the Java classes BigInteger
and BigDecimal
. OBR supports arithmetic expressions (+
, -
, *
, /
, **
) on all numeric types. For example, if *bd
is BigDecimal
, then you can add one to it by simply writing bd + 1
. You do not have to write bd.add(BigDecimal.ONE)
.
Table B-5 lists the Integer
class.
Table B-5 The Integer Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Integer |
Cl |
- |
java.lang.Integer |
An integer object. Unlike the primitive "int", an Integer can be null and can be in Lists. |
|
Integer |
Co |
Integer(int|String) |
- |
Creates an Integer from an int or from its lexical representation as a String. new Integer(1)==new Integer("1"). |
|
MIN_VALUE |
sP |
int |
- |
Smallest primitive int value. Integer.MIN_VALUE<0. |
|
MAX_VALUE |
sP |
int |
- |
Largest primitive int value. Integer.MAX_VALUE>0. |
|
intValue |
M |
int() |
- |
Converts this Integer to an int. new Integer(1).intValue()==1. |
|
toString |
M |
String() |
- |
Converts this Integer to its lexical representation. new Integer(1).toString()=="1". |
|
Table B-6 lists the Long
class.
Table B-6 The Long Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Long |
Cl |
- |
java.lang.Long |
A long integer object. Unlike the primitive "long", a Long can be null and can be in Lists. |
|
Long |
Co |
Long(long|String) |
- |
Creates a Long from a long or from its lexical representation as a String. new Long(1)==new Long("1"). |
|
MIN_VALUE |
sP |
long |
- |
Smallest primitive long value. Long.MIN_VALUE<0. |
|
MAX_VALUE |
sP |
long |
- |
Largest primitive long value. Long.MAX_VALUE>0. |
|
longValue |
M |
long() |
- |
Converts this Long to a long. new Long(1).longValue()==1. |
|
toString |
M |
String() |
- |
Converts this Long to its lexical representation. new Long(1).toString()=="1". |
|
Table B-7 lists the Short
class.
Table B-7 The Short Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Short |
Cl |
- |
java.lang.Short |
A short integer object. Unlike the primitive "short", a Short can be null and can be in Lists. |
|
Short |
Co |
Short(short|String) |
- |
Creates a Short from a short or from its lexical representation as a String. new Short(1)==new Short("1"). |
|
MIN_VALUE |
sP |
short |
- |
Smallest primitive short value. Short.MIN_VALUE<0. |
|
MAX_VALUE |
sP |
short |
- |
Largest primitive short value. Short.MAX_VALUE>0. |
|
shortValue |
M |
short() |
- |
Converts this Short to a short. new Short(-1).shortValue()==-1. |
|
toString |
M |
String() |
- |
Converts this Short to its lexical representation. new Short(-1).toString()=="-1". |
|
Table B-8 lists the Float
class.
Table B-8 The Float Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Float |
Cl |
- |
java.lang.Float |
A Float object. Unlike the primitive "float", a Float can be null and can be in Lists. |
|
Float |
Co |
Float(float|double|String) |
- |
Creates a Float from a float, a double, or from its lexical representation as a String. new Float(1.1)==new Float("1.1"). |
|
infinite |
P |
boolean |
- |
The value of this Float is infinity. new Float(Float.NEGATIVE_INFINITY).infinite==true. |
|
naN |
P |
boolean |
- |
The value of this Float is not a number. new Float(Float.NaN).naN==true. |
|
NaN |
sP |
float |
- |
Value representing "not a number". |
|
NEGATIVE_INFINITY |
sP |
float |
- |
Value representing negative infinity. |
|
POSITIVE_INFINITY |
sP |
float |
- |
Value representing positive infinity. |
|
floatValue |
M |
float() |
- |
Converts this Float to a float. new Float(1.1f).floatValue()==1.1f. |
|
toString |
M |
String() |
- |
Converts this Float to its lexical representation. new Float(1.1f).toString()=="1.1". |
|
Table B-9 lists the Double
class.
Table B-9 The Double Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Double |
Cl |
- |
java.lang.Double |
A Double object. Unlike the primitive "double", a Double can be null and can be in Lists. |
|
Double |
Co |
Double(double|String) |
- |
Creates a Double from a double or from its lexical representation as a String. new Double(1.1)==new Double("1.1"). |
|
infinite |
P |
boolean |
- |
The value of this Double is infinity. new Float(Float.POSITIVE_INFINITY).infinite==true. |
|
naN |
P |
boolean |
- |
The value of this Double is not a number. new Double(double.NaN).naN==true. |
|
NaN |
sP |
double |
- |
Value representing "not a number". |
|
NEGATIVE_INFINITY |
sP |
double |
- |
Value representing negative infinity. |
|
POSITIVE_INFINITY |
sP |
double |
- |
Value representing positive infinity. |
|
doubleValue |
M |
double() |
- |
Converts this Double to a double. new Double(1.1).doubleValue()==1.1. |
|
toString |
M |
String() |
- |
Converts this Double to its lexical representation. new Double(1.1).toString()=="1.1". |
|
Table B-10 lists the BigInteger
class.
Table B-10 The BigInteger Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
BigInteger |
Cl |
- |
java.math.BigInteger |
Immutable arbitrary-precision integers. |
|
BigInteger |
Co |
BigInteger(String) |
- |
Creates a BigInteger from its lexical representation as a String. new BigInteger("1")==1. |
|
doubleValue |
M |
double() |
- |
Converts this BigInteger to a double. May lose precision. new BigInteger("1").doubleValue()==1.0. |
|
longValue |
M |
long() |
- |
Converts this BigInteger to a long. May lose precision. new BigInteger("1").longValue()==1L. |
|
max |
M |
BigInteger(BigInteger) |
- |
Returns the greater of this or arg1. new BigInteger("1").max(2)==2. |
|
min |
M |
BigInteger(BigInteger) |
- |
Returns the lesser of this or arg1. new BigInteger("1").min(2)==1. |
|
toString |
M |
String() |
- |
Returns the lexical representation of this BigInteger. new BigInteger("123").toString()=="123". |
|
valueOf |
sM |
BigInteger(long) |
- |
Converts arg1 (a long) to a BigInteger. BigInteger.valueOf(123).toString()=="123". |
|
Table B-11 lists the BigDecimal
class.
Table B-11 The BigDecimal Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
BigDecimal |
Cl |
- |
java.math.BigDecimal |
Immutable, arbitrary-precision signed decimal numbers. |
|
BigDecimal |
Co |
BigDecimal(long|double|String) |
- |
Creates a BigDecimal from a long, a double, or from its lexical representation as a String. new BigDecimal(1.1)==new BigDecimal("1.1"). |
|
BigDecimal |
Co |
BigDecimal(BigInteger,int) |
- |
Creates a BigDecimal from BigInteger arg1 and scale arg2. new BigDecimal(new BigInteger("123"),2)==1.23. |
|
doubleValue |
M |
double() |
- |
Converts this BigDecimal to a double. May lose precision. new BigDecimal("0.1").doubleValue()==0.1. |
|
longValue |
M |
long() |
- |
Converts this BigDecimal to a long. May lose precision. new BigDecimal("0.1").longValue()==0L. |
|
max |
M |
BigDecimal(BigDecimal) |
- |
Returns the greater of this BigDecimal or arg1. new BigDecimal("0.1").max(0.2)==0.2. |
|
min |
M |
BigDecimal(BigDecimal) |
- |
Returns the lesser of this BigDecimal or arg1. new BigDecimal("0.1").min(0.2)==0.1. |
|
scale |
M |
int() |
- |
Returns the scale--the number of digits to the right of the decimal point. new BigDecimal("1.00").scale()==2. |
|
setScale |
M |
BigDecimal(int) |
- |
Sets the scale, but don't change the value. new BigDecimal("1").setScale(2).toString()=="1.00". |
|
toEngineeringString |
M |
String() |
- |
Returns the literal representation of this BigDecimal using engineering notation if an exponent is needed. new BigDecimal("123E2").toEngineeringString()=="12.3E+3". |
|
toPlainString |
M |
String |
- |
Returns the literal representation of this BigDecimal without exponents. new BigDecimal("123E2").toPlainString()=="12300". |
|
valueOf |
sM |
BigDecimal(long|double) |
- |
Converts arg1 (a long or double) to a BigDecimal. new BigDecimal(1.3)==BigDecimal.valueOf(1.3). |
|
ROUND_UP |
sP |
int |
- |
Used with divide. new BigDecimal("11").divide(2,BigDecimal.ROUND_UP)==6. |
|
ROUND_DOWN |
sP |
int |
- |
Used with divide. new BigDecimal("11").divide(2,BigDecimal.ROUND_DOWN)==5. |
|
divide |
M |
BigDecimal(BigDecimal,int) |
- |
Returns this/arg1 with scale the same as this BigDecimal. If rounding must be performed to stay within the result scale, use the rounding mode given by arg2 (ROUND_UP or ROUND_DOWN). new BigDecimal("11").divide(2,BigDecimal.ROUND_UP)==6. |
|
Table B-12 lists the Number
class.
Table B-12 The Number Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Number |
Cl |
- |
- |
Base class of all numerics (except primitives). |
|
doubleValue |
M |
double() |
- |
Converts this number to a double. |
|
floatValue |
M |
float() |
- |
Converts this number to a float. |
|
intValue |
M |
int() |
- |
Converts this number to a int. |
|
longValue |
M |
long() |
- |
Converts this number to a long. |
|
shortValue |
M |
short() |
- |
Converts this number to a short. |
|
Table B-13 lists the RL
class number methods.
Table B-13 The RL Class Number Methods
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
RL |
Cl |
- |
oracle.rules.rl.extensions.RL |
- |
- |
number.is byte |
sM |
boolean(Number) |
isByte |
arg1 is integral and -128<=arg1<=127. RL.numeric.is byte(200)==false. |
|
number.is short |
sM |
boolean(Number) |
isShort |
arg1 is integral and -32768<=arg1<=32767. RL.numeric.is short(0.1)==false. |
|
number.is int |
sM |
boolean(Number) |
isInt |
arg1 is integral and -2147483648<=arg1<=2147483647. RL.numeric.is int(-1000)==true. |
|
number.is long |
sM |
boolean(Number) |
isLong |
arg1 is integral and -9223372036854775808<=arg1<=9223372036854775807. RL.numeric.is integer(new BigInteger("100")**100)==false. |
|
number.is integer |
sM |
boolean(Number) |
isInteger |
arg1 is integral. RL.numeric.is integer(new BigInteger("100")**100)==true. |
|
number.is decimal |
sM |
boolean(Number) |
isDecimal |
arg1 is neither Double nor Float. RL.numeric.is decimal(1.1)==false. |
|
number.is non-negative integer |
sM |
boolean(Number) |
isNonNegativeInteger |
arg1 is integral and arg1>=0. RL.numeric.is non-negative integer(-1)==false. |
|
number.is negative integer |
sM |
boolean(Number) |
isNegativeInteger |
arg1 is integral and arg1<0. RL.numeric.is negative integer(-1)==true. |
|
number.is non-positive integer |
sM |
boolean(Number) |
isNonPositiveInteger |
arg1 is integral and arg1<=0. RL.numeric.is non-positive integer(-1)==true. |
|
number.is positive integer |
sM |
boolean(Number) |
isPositiveInteger |
arg1 is integral and arg1>0. RL.numeric.is positive integer(-1)==false. |
|
number.is unsigned byte |
sM |
boolean(Number) |
isUnsignedByte |
arg1 is integral and 0<=arg1<=255. RL.numeric.is unsigned byte(200)==true. |
|
number.is unsigned short |
sM |
boolean(Number) |
isUnsignedShort |
arg1 is integral and 0<=arg1<=65535. RL.numeric.is unsigned short(0.1)==false. |
|
number.is unsigned int |
sM |
boolean(Number) |
isUnsignedInt |
arg1 is integral and 0<=arg1<=4294967295. RL.numeric.is unsigned int(-1000)==false. |
|
number.is unsigned long |
sM |
boolean(Number) |
isUnsignedLong |
arg1 is integral and 0<=arg1<=18446744073709551615. |
|
This section lists the time and duration classes provided by Oracle Business Rules.
Table B-14 lists the Calendar
class.
Table B-14 The Calendar Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Calendar |
Cl |
- |
java.util.Calendar |
A Calendar represents a datetime and timezone. A calendar instance has a number of mutable int fields. The first argument to add, get, isSet, roll, and set is a field number. This class provides a number of static properties that should be used for the field numbers. |
|
ERA |
sP |
int |
- |
Field number for the Calendar era. 1 is for A.D. and 0 is for B.C. ((Calendar)"2010-02-01").get(Calendar.ERA)==1. |
|
YEAR |
sP |
int |
- |
Field number for the Calendar year. ((Calendar)"2010-02-01").get(Calendar.YEAR)==2010. |
|
MONTH |
sP |
int |
- |
Field number for the Calendar month. Months are 0-based. ((Calendar)"2010-02-01").get(Calendar.MONTH)==1. |
|
WEEK_OF_YEAR |
sP |
int |
- |
Field number for the Calendar week. ((Calendar)"2010-02-01").get(Calendar.WEEK_OF_YEAR)==6. |
|
DAY_OF_YEAR |
sP |
int |
- |
Field number for the Calendar day of year. ((Calendar)"2010-02-01").get(Calendar.DAY_OF_YEAR)==32. |
|
DAY_OF_MONTH |
sP |
int |
- |
Field number for the Calendar day of month. ((Calendar)"2010-02-01").get(Calendar.DAY_OF_MONTH)==1. |
|
DAY_OF_WEEK |
sP |
int |
- |
Field number for the Calendar day of the week. ((Calendar)"2010-02-01").get(Calendar.DAY_OF_WEEK)==2. |
|
HOUR |
sP |
int |
- |
Field number for the Calendar hour, 12 hour format. ((Calendar)"2010-02-01T20:15:10").get(Calendar.HOUR)==8. |
|
AM_PM |
sP |
int |
- |
Field number for the Calendar AM_PM flag. 0 is for AM and 1 is for PM. ((Calendar)"2010-02-01T20:15:10").get(Calendar.AM_PM)==1. |
|
HOUR_OF_DAY |
sP |
int |
- |
Field number for the Calendar hour, 24 hour format. ((Calendar)"20:15:10").get(Calendar.HOUR)==20. |
|
MINUTE |
sP |
int |
- |
Field number for the Calendar minutes. JavaDate.from time string("20:15:10").get(Calendar.MINUTE)==15. |
|
SECOND |
sP |
int |
- |
Field number for Calendar seconds. ((Calendar)"20:15:10").get(Calendar.SECOND)==10. |
|
ZONE_OFFSET |
sP |
int |
- |
Field number for timezone. Value is millsecond offset from GMT. ((Calendar)"20:15:10-05:30").get(Calendar.ZONE_OFFSET)==-(5*3600+30*60)*1000. |
|
add |
M |
void(int,int) |
add |
Adds the amount of time specified by arg2 to the calendar field specified by arg1. Modifies this Calendar. |
|
clear |
M |
void() |
clear |
Clears (unset all fields in) this Calendar. Modifies this Calendar. |
|
get |
M |
int(int) |
get |
Gets the value of the field specified by field number arg1. ((Calendar)"20:15:10").get(Calendar.SECOND)==10. |
|
getInstance |
sM |
Calendar() |
getInstance |
Gets a calendar initialized to the current time in the default time zone and locale. |
|
roll |
M |
void(int,int) |
roll |
Adds the amount of time specified by arg2 to the calendar field specified by arg1. Does not affect any other calendar field. Modifies this Calendar. |
|
set |
M |
void(int,int) |
set |
Sets the calendar field specified by arg1 to the value specified by arg2. Modifies this Calendar. |
|
time |
P |
java.util.Date |
time |
Returns a Date object representing this Calendar's time value. ((Calendar)"2010-02-01").time<((Calendar)"2010-02-02").time. |
|
timeInMillis |
P |
long |
timeInMillis |
Returns this Calendar's time value in milliseconds. ((Calendar)"2010-02-01").timeInMillis<((Calendar)"2010-02-02").timeInMillis. |
|
Table B-15 lists the JavaDate
class.
Table B-15 The JavaDate Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
JavaDate |
Cl |
- |
oracle.rules. rl. extensions.JavaDate |
Helper class for working with Calendars as immutable objects. Treating Calendars as immutable objects can help prevent errors. |
|
add years to |
sM |
Calendar(Calendar, int) |
addYearsTo |
Returns a new Calendar that is arg2 years later than arg1. JavaDate.add years to("2009-01-01",1)=="2010-01-01". |
|
add months to |
sM |
Calendar(Calendar, int) |
addMonthsTo |
Returns a new Calendar that is arg2 months later than arg1. JavaDate.add months to("2009-01-01",1)=="2009-02-01". |
|
add weeks to |
sM |
Calendar(Calendar,int) |
addWeeksTo |
Returns a new Calendar that is 7*arg2 days later than arg1. JavaDate.add weeks to("2009-01-01",1)=="2009-01-08". |
|
add days to |
sM |
Calendar(Calendar,int) |
addDaysTo |
Returns a new Calendar that is arg2 days later than arg1. JavaDate.add days to("2009-01-01",1)=="2009-01-02". |
|
add hours to |
sM |
Calendar(Calendar,int) |
addHoursTo |
Returns a new Calendar that is arg2 hours later than arg1. JavaDate.add hours to("01:01:01",1)=="02:01:01". |
|
add minutes to |
sM |
Calendar(Calendar,int) |
addMinutesTo |
Returns a new Calendar that is arg2 minutes later than arg1. JavaDate.add minutes to("01:01:01",1)=="01:02:01". |
|
add seconds to |
sM |
Calendar(Calendar,int) |
addSecondsTo |
Returns a new Calendar that is arg2 seconds later than arg1. JavaDate.add seconds to("01:01:01",61)=="01:02:02". |
|
add milliseconds to |
sM |
Calendar(Calendar,int) |
addMillisecondsTo |
Returns a new Calendar that is arg2 milliseconds later than arg1. JavaDate.add milliseconds to("01:01:01",61)=="01:01:01.061". |
|
add duration to |
sM |
Calendar(Calendar,XMLDuration) |
addDurationTo |
Returns a new Calendar that is later than arg1 by the duration arg2. JavaDate.add duration to("2009-12-30T23:59:00",Duration.from string("P1DT1M"))=="2010-01-01". |
|
from date string |
sM |
Calendar(String) |
fromDateString |
Creates a Calendar for the extended ISO 8601 date literal arg1. Extended to allow YYYY-MM-DD@TimeZoneId. JavaDate.from date string("2010-02-06@PST")=="2010-02-06-08:00". |
|
from datetime string |
sM |
Calendar(String) |
fromDateTimeString |
Creates a Calendar for the extended ISO 8601 datetime literal arg1. Extended to allow YYYY-MM-DDTHH:MM:SS@TimeZoneId. JavaDate.from datetime string("2010-02-06T14:15:00@PST")=="2010-02-06T14:15:00-08:00". |
|
from time string |
sM |
Calendar(String) |
fromTimeString |
Creates a Calendar for the extended ISO 8601 time literal arg1. Extended to allow HH:MM:SS@TimeZoneId. Warning: the date portion of the Calendar will be initialized to the current date. JavaDate.from time string("14:15:00@PST")=="14:15:00-08:00". |
|
subtract years from |
sM |
Calendar(Calendar,int) |
subtractYearsFrom |
Returns a new Calendar that is arg2 years earlier than arg1. JavaDate.subtract years from("2009-01-01",1)=="2008-01-01". |
|
subtract months from |
sM |
Calendar(Calendar,int) |
subtractMonthsFrom |
Returns a new Calendar that is arg2 months earlier than arg1. JavaDate.subtract months from("2009-01-01",1)=="2008-12-01". |
|
subtract weeks from |
sM |
Calendar(Calendar,int) |
subtractWeeksFrom |
Returns a new Calendar that is 7*arg2 days earlier than arg1. JavaDate.subtract weeks from("2009-01-01",1)=="2008-12-25". |
|
subtract days from |
sM |
Calendar(Calendar,int) |
subtractDaysFrom |
Returns a new Calendar that is arg2 days earlier than arg1. JavaDate.subtract days from("2009-01-01",1)=="2008-12-31". |
|
subtract hours from |
sM |
Calendar(Calendar,int) |
subtractHoursFrom |
Returns a new Calendar that is arg2 hours earlier than arg1. JavaDate.subtract hours from("01:01:01",1)=="00:01:01". |
|
subtract minutes from |
sM |
Calendar(Calendar,int) |
subtractMinutesFrom |
Returns a new Calendar that is arg2 minutes earlier than arg1. JavaDate.subtract minutes from("01:01:01",1)=="01:00:01". |
|
subtract seconds from |
sM |
Calendar(Calendar,int) |
subtractSecondsFrom |
Returns a new Calendar that is arg2 seconds earlier than arg1. JavaDate.subtract seconds from("01:01:01",61)=="01:00:00". |
|
subtract milliseconds from |
sM |
Calendar(Calendar,int) |
subtractMillisecondsFrom |
Returns a new Calendar that is arg2 milliseconds earlier than arg1. JavaDate.subtract milliseconds from("01:01:01",61)=="01:01:00.939". |
|
subtract duration from |
sM |
Calendar(Calendar,XMLDuration) |
subtractDurationFrom |
Returns a new Calendar that is earlier than arg1 by the duration arg2. JavaDate.subtract duration from("2009-12-30T23:59:00",Duration.from string("P1DT1M"))=="20009-12-29T23:58:00". |
|
to date string |
sM |
String(Calendar) |
toDateString |
Returns the ISO 8601 lexical representation of arg1, ignoring time components. JavaDate.to date string("2010-07-04T12:30:00Z")=="2010-07-04Z" |
|
to datetime string |
sM |
String(Calendar) |
toDateTimeString |
Returns the ISO 8601 lexical representation of arg1. JavaDate.to datetime string("2010-07-04T12:30:00Z")=="2010-07-04T12:30:00.000Z" |
|
to time string |
sM |
String(Calendar) |
toTimeString |
Returns the ISO 8601 lexical representation of arg1, ignoring date components. JavaDate.to time string("2010-07-04T12:30:00Z")=="12:30:00.000Z" |
Table B-16 lists the XMLGregorianCalendar
class.
Table B-16 The XMLGregorianCalendar Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
XMLGregorianCalendar |
Cl |
- |
javax.xml.datatype.XMLGregorianCalendar |
Representation for W3C XML Schema 1.0 date/time datatypes. |
|
normalize |
M |
XMLGregorianCalendar() |
- |
Normalizes this instance to UTC. XMLDate.from string("2000-03-04T23:00:00+03:00").normalize()==XMLDate.from string("2000-03-04T20:00:00Z") |
|
toGregorianCalendar |
M |
java.util.GregorianCalendar() |
- |
Converts this XMLGregorianCalendar to a (superclass of) Calendar. XMLDate.from string("2010-02-03").toGregorianCalendar()==(Calendar)"2010-02-03". |
|
year |
P |
int |
- |
The year of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("2011-12-31").year==2011. |
|
month |
P |
int |
- |
The month of this calendar, or Integer.MIN_VALUE if undefined. Months are 1-based, e.g. Jan is month 1. XMLDate.from string("2011-12-31").month==12. |
|
day |
P |
int |
- |
The day of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("2011-12-31").day==31. |
|
hour |
P |
int |
- |
The hour of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("2011-12-31").hour==Integer.MIN_VALUE. |
|
minute |
P |
int |
- |
The minute of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("2011-12-31T09:30:00").minute==30. |
|
second |
P |
int |
- |
The second of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("09:30:05Z").second==5. |
|
timezone |
P |
int |
- |
The timezone offset in minutes of this calendar, or Integer.MIN_VALUE if undefined. XMLDate.from string("09:30:00-09:00").timezone==-540. |
|
Table B-17 lists the XMLDate
class.
Table B-17 The XMLDate Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
XMLDate |
Cl |
- |
oracle.rules.rl.extensions.XMLDate |
Helper class for working with XMLGregorianCalendars as immutable objects. Treating calendars as immutable objects can help prevent errors. |
|
add years to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addYearsTo |
Returns a new XMLGregorianCalendar that is arg2 years later than arg1. XMLDate.add years to("2009-01-01",1)=="2010-01-01". |
|
add months to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addMonthsTo |
Returns a new XMLGregorianCalendar that is arg2 months later than arg1. XMLDate.add months to("2009-01-01",1)=="2009-02-01". |
|
add weeks to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addWeeksTo |
Returns a new XMLGregorianCalendar that is 7*arg2 days later than arg1. XMLDate.add weeks to("2009-01-01",1)=="2009-01-08". |
|
add days to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addDaysTo |
Returns a new XMLGregorianCalendar that is arg2 days later than arg1. XMLDate.add days to("2009-01-01",1)=="2009-01-02". |
|
add hours to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addHoursTo |
Returns a new XMLGregorianCalendar that is arg2 hours later than arg1. XMLDate.add hours to("01:01:01",1)=="02:01:01". |
|
add minutes to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addMinutesTo |
Returns a new XMLGregorianCalendar that is arg2 minutes later than arg1. XMLDate.add minutes to("01:01:01",1)=="01:02:01". |
|
add seconds to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addSecondsTo |
Returns a new XMLGregorianCalendar that is arg2 seconds later than arg1. XMLDate.add seconds to("01:01:01",61)=="01:02:02". |
|
add milliseconds to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
addMillisecondsTo |
Returns a new XMLGregorianCalendar that is arg2 milliseconds later than arg1. XMLDate.add milliseconds to("01:01:01",61)=="01:01:01.061". |
|
add duration to |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,XMLDuration) |
addDurationTo |
Returns a new XMLGregorianCalendar that is later than arg1 by the duration arg2. XMLDate.add duration to("2009-12-30T23:59:00",Duration.from string("P1DT1M"))=="2010-01-01". |
|
from string |
sM |
XMLGregorianCalendar(String) |
fromString |
Creates an XMLGregorianCalendar for the ISO 8601 date literal arg1. XMLDate.from string("2010-02-06-08:00")=="2010-02-06-08:00". |
|
subtract years from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractYearsFrom |
Returns a new XMLGregorianCalendar that is arg2 years earlier than arg1. XMLDate.subtract years from("2009-01-01",1)=="2008-01-01". |
|
subtract months from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractMonthsFrom |
Returns a new XMLGregorianCalendar that is arg2 months earlier than arg1. XMLDate.subtract months from("2009-01-01",1)=="2008-12-01". |
|
subtract weeks from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractWeeksFrom |
Returns a new XMLGregorianCalendar that is 7*arg2 days earlier than arg1. XMLDate.subtract weeks from("2009-01-01",1)=="2008-12-25". |
|
subtract days from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractDaysFrom |
Returns a new XMLGregorianCalendar that is arg2 days earlier than arg1. XMLDate.subtract days from("2009-01-01",1)=="2008-12-31". |
|
subtract hours from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractHoursFrom |
Returns a new XMLGregorianCalendar that is arg2 hours earlier than arg1. XMLDate.subtract hours from("01:01:01",1)=="00:01:01". |
|
subtract minutes from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractMinutesFrom |
Returns a new XMLGregorianCalendar that is arg2 minutes earlier than arg1. XMLDate.subtract minutes from("01:01:01",1)=="01:00:01". |
|
subtract seconds from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractSecondsFrom |
Returns a new XMLGregorianCalendar that is arg2 seconds earlier than arg1. XMLDate.subtract seconds from("01:01:01",61)=="01:00:00". |
|
subtract milliseconds from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,int) |
subtractMillisecondsFrom |
Returns a new XMLGregorianCalendar that is arg2 milliseconds earlier than arg1. XMLDate.subtract milliseconds from("01:01:01",61)=="01:01:00.939". |
|
subtract duration from |
sM |
XMLGregorianCalendar(XMLGregorianCalendar,XMLDuration) |
subtractDurationFrom |
Returns a new XMLGregorianCalendar that is earlier than arg1 by the duration arg2. XMLDate.subtract duration from("2009-12-30T23:59:00",Duration.from string("P1DT1M"))=="20009-12-29T23:58:00". |
|
to string |
sM |
String(XMLGregorianCalendar) |
toString |
Returns the ISO 8601 lexical representation of arg1. XMLDate.to string("2010-04-15T11:00:00-09:00")=="2010-04-15T11:00:00-09:00". |
|
is datetime |
sM |
boolean(XMLGregorianCalendar) |
isDateTime |
Checks if this calendar have both date and time fields. XMLDate.is datetime("2009-12-30T23:59:00")==true. |
|
is datetime stamp |
sM |
boolean(XMLGregorianCalendar) |
isDateTimeStamp |
Checks if this calendar have date, time, and timezone fields. XMLDate.is datetime stamp("2009-12-30T23:59:00")==false. |
|
is date |
sM |
boolean(XMLGregorianCalendar) |
isDate |
Checks if this calendar have date fields and no time fields. XMLDate.is date("2009-12-30")==true. |
|
is time |
sM |
boolean(XMLGregorianCalendar) |
isTime |
Checks if this calendar have time fields and no date fields. XMLDate.is time("2009-12-30T23:59:00")==false. |
|
get timezone |
sM |
XMLDuration(XMLGregorianCalendar) |
getTimezone |
Gets the timezone from the calendar as a duration. XMLDate.get timezone("11:00:00+05:30")==Duration.from string("PT5H30M"). |
|
get seconds |
sM |
BigDecimal(XMLGregorianCalendar) |
getSeconds |
Gets the seconds, including fractional part, from the calendar as a BigDecimal. XMLDate.get seconds("00:00:12.345")==12.345. |
|
Table B-18 lists the OracleDate
class.
Table B-18 The OracleDate Class
OBR Name | Kind | Signature | Java Name | Description |
---|---|---|---|---|
OracleDate |
Cl |
- |
oracle.rules.sdk2.extensions.OracleDate |
Helper class for working with oracle.jbo.domain.Timestamp. For examples of method use, see like-named XMLDate methods. |
add years to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addYearsTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 years later than arg1. |
add months to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addMonthsTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 months later than arg1. |
add weeks to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addWeeksTo |
Returns a new oracle.jbo.domain.Timestamp that is 7*arg2 days later than arg1. |
add days to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addDaysTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 days later than arg1. |
add hours to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addHoursTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 hours later than arg1. |
add minutes to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addMinutesTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 minutes later than arg1. |
add seconds to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addSecondsTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 seconds later than arg1. |
add milliseconds to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
addMillisecondsTo |
Returns a new oracle.jbo.domain.Timestamp that is arg2 milliseconds later than arg1. |
add duration to |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,XMLDuration) |
addDurationTo |
Returns a new oracle.jbo.domain.Timestamp that is later than arg1 by the duration arg2. |
from string |
sM |
oracle.jbo.domain.Timestamp(String) |
fromString |
Creates an oracle.jbo.domain.Timestamp for the ISO 8601 date literal arg1. |
subtract years from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractYearsFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 years earlier than arg1. |
subtract months from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractMonthsFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 months earlier than arg1. |
subtract weeks from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractWeeksFrom |
Returns a new oracle.jbo.domain.Timestamp that is 7*arg2 days earlier than arg1. |
subtract days from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractDaysFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 days earlier than arg1. |
subtract hours from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractHoursFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 hours earlier than arg1. |
subtract minutes from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractMinutesFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 minutes earlier than arg1. |
subtract seconds from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractSecondsFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 seconds earlier than arg1. |
subtract milliseconds from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,int) |
subtractMillisecondsFrom |
Returns a new oracle.jbo.domain.Timestamp that is arg2 milliseconds earlier than arg1. |
subtract duration from |
sM |
oracle.jbo.domain.Timestamp(oracle.jbo.domain.Timestamp,XMLDuration) |
subtractDurationFrom |
Returns a new oracle.jbo.domain.Timestamp that is earlier than arg1 by the duration arg2. |
to string |
sM |
String(oracle.jbo.domain.Timestamp) |
toString |
Returns the ISO 8601 lexical representation of arg1. |
Table B-19 lists the Duration
class.
Table B-19 The Duration Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
Duration |
Cl |
- |
oracle.rules.sdk2.extensions.OracleDuration |
Helper class for comparing and subtracting dates. Can convert the difference of 2 dates into an XMLDuration. Can also create an XMLDuration from its literal (String) representation. Only day time and year month XMLDurations are supported. |
- |
compare |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
- |
Returns -1, 0, or 1 according to whether arg1<arg2, arg1==arg2, or arg1>arg2, respectively. Duration.compare("2010-01-01","2010-02-02")==-1 |
|
years between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
yearsBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.years between("2008-01-01", "2009-02-02")==1. |
- |
months between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
monthsBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.months between("2009-01-01","2008-02-02")==-10. |
- |
weeks between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
weeksBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.weeks between("2000-01-01","2000-02-04")==4. |
- |
days between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
daysBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.days between("2000-01-01","2000-02-04")==34. |
- |
hours between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
hoursBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.hours between("2000-01-04T03:30:00","2000-01-01T00:00:00")==-75 |
- |
minutes between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
minutesBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.minutes between("03:30:00","04:45:00")==75. |
- |
seconds between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
secondsBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.seconds between("03:30:00","03:31:15")==75. |
- |
milliseconds between |
sM |
int(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
millisecondsBetween |
Subtracts arg1 from arg2, where the args are some kind of date/time. Duration.milliseconds between("03:30:00","03:31:15")==75000. |
|
between |
sM |
XMLDuration(Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp, Calendar|XMLGregorianCalendar|oracle.jbo.domain.Timestamp) |
between |
Subtracts arg1 from arg2, where the args are some kind of date/time. Returns day-time Duration. Duration.between("2009-01-01T01:15:00","2009-02-02T11:30:00")==Duration.from string("P32DT10H15M"). |
|
from string |
sM |
XMLDuration(String) |
fromString |
Parses a duration from an ISO 8601 duration literal. "P1DT2H3M" is the duration of 1 day, 2 hours, and 3 minutes. |
|
compare durations |
sM |
int(XMLDuration,XMLDuration) |
compareDurations |
Compares two durations. Both must be either day-time or year-month durations. Returns -1, 0, or 1 according to whether arg1<arg2, arg1==arg2, or arg1>arg2, respectively. Duration.compare(Duration.from string("P1Y"),Duration.from string("P13M"))==-1. |
|
is day-time duration |
sM |
boolean(XMLDuration) |
isDayTimeDuration |
Checks if arg1 a day-time duration. Only day-time and year-month durations are supported. Duration.is day-time duration(Duration.from string("P2DT1S"))==true. |
|
is year-month duration |
sM |
boolean(XMLDuration) |
isYearMonthDuration |
Checks if arg1 a year-month duration. Only day-time and year-month durations are supported. Duration.is year-month duration(Duration.from string("P13M"))==true. |
|
get seconds |
sM |
BigDecimal(XMLDuration) |
getSeconds |
Gets the seconds field from the duration as a BigDecimal, including fractional seconds. Duration.get seconds(Duraton.from string("PT12.345S"))==12.345. |
|
divide |
sM |
XMLDuration(XMLDuration,int|double) |
- |
Divides a duration by an integral or double divisor. Duration.divide(Duration.from string("P1Y"),4)==Duration.from string("P3M"). |
|
ratio |
sM |
BigDecimal(XMLDuration,XMLDuration) |
- |
Computes the ratio of 2 durations as a BigDecimal. Duration.ratio(Duration.from string("P1Y"),Duration.from string("P3M"))==4 |
Table B-20 lists the XMLDuration
class.
Table B-20 The XMLDuration Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
XMLDuration |
Cl |
- |
javax.xml.datatype.Duration |
Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. Only day-time and year-month XMLDurations are supported. |
|
years |
P |
int |
- |
Years field of the duration. Duration.from string("P2Y3M").years==2. |
|
months |
P |
int |
- |
Months field of the duration. Duration.from string("P2Y3M").months==2. |
|
days |
P |
int |
- |
Days field of the duration. Duration.from string("P1DT2H3M4S").days==1. |
|
hours |
P |
int |
- |
Hours field of the duration. Duration.from string("P1DT2H3M4S").hours==2. |
|
minutes |
P |
int |
- |
Minutes field of the duration. Duration.from string("P1DT2H3M4S").minutes==3. |
|
seconds |
P |
int |
- |
Seconds field of the duration. Duration.from string("P1DT2H3M4S").seconds==4. |
|
sign |
P |
int |
- |
Returns the sign of this duration in -1,0, or 1. Duration.from string("-P1Y").sign==-1. |
- |
add |
M |
XMLDuration(XMLDuration) |
- |
Adds two durations. Duration.from string("P6M").add(Duration.from string("P6M"))==Duration.from string("P1Y"). |
|
subtract |
M |
XMLDuration(XMLDuration) |
- |
Subtracts two durations. Duration.from string("P6M").subtract(Duration.from string("P6M"))==Duration.from string("P0Y"). |
|
multiply |
M |
XMLDuration(BigDecimal|int) |
- |
Multiplies arg1 duration by arg2 factor. Duration.from string("P6M").multiply(2)==Duration.from string("P1Y"). |
|
negate |
M |
XMLDuration() |
- |
Durations can be negative, e.g. if you reverse the arguments to Duration.between(arg1,arg2). Duration.from string("P6M").negate()==Duration.from string("-P6M"). |
|
to string |
M |
String() |
toString |
Gets the ISO8601 literal representation for this duration. Duration.from string("P6M").to string()=="P6M". |
Table B-21 lists the CurrentDate
class.
This section covers the miscellaneous classes provided by Oracle Business Rules.
Table B-22 lists the JAXBElement
class.
Table B-22 The JAXBElement Class
OBR Name | Kind | Signature | Java Name | Description | Reference |
---|---|---|---|---|---|
JAXBElement |
Cl |
- |
javax.xml.bind.JAXBElement |
Represents XML element information in XML Fact Types. |
|
nil |
P |
boolean |
- |
A nil element is not the same thing (in XML) as an absent element. |
|
value |
P |
Object |
- |
This is a reference to an XML Fact Type |
|
Table B-23 lists the Object
class.
Table B-24 lists the different functions provided by Oracle Business Rules..
Table B-24 The Oracle Business Rules Functions
OBR Name | Signature | RL Name | Description | Reference |
---|---|---|---|---|
|
void(Object) |
println |
Prints the string value of arg1. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.assert a tree of facts |
Object(Object) |
assertTree |
Asserts (insert into working memory) the tree of visible fact types with arg1 as the root. Returns arg1. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.assert |
Object(Object) |
assert |
Asserts arg1 (insert arg1 into working memory). Returns arg1. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.retract |
void(Object) |
retract |
Removes the fact associated with the object arg1 from working memory. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.get fact ID |
int(Object) |
id |
Returns the fact id associated with the object arg1. If arg1 is not associated with a fact, return -1. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.get fact by ID |
Object(int) |
object |
Returns the object associated with the given fact id. If there is no such fact id, returns null. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.contains |
boolean(List,Object) |
contains |
The contains() function is similar to the contains() method on Java Collection but includes the ability to handle the presence of JAXBElement in the collection. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.ruleset stack.push |
void(String) |
pushRuleset |
Pushes arg1, the name of a ruleset, onto the ruleset stack. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.ruleset stack.pop |
String() |
popRuleset |
Pops and returns the top of the ruleset stack, the name of a ruleset. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.ruleset stack.get |
String[]() |
getRulesetStack |
Returns the ruleset stack as a String array. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.ruleset stack.set |
void(String[]) |
setRulesetStack |
Sets the ruleset stack to arg1, a String array. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.ruleset stack.clear |
void() |
clearRulesetStack |
Pops all ruleset names off the ruleset stack. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.date.get current |
Calendar() |
getCurrentDate |
Returns the date associated with the CurrentDate fact. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.date.set current |
void(Calendar) |
setCurrentDate |
Sets the date for reasoning on an engine managed fact representing the "current" date (with the CurrentDate fact). |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.date.get effective |
Calendar() |
getEffectiveDate |
Returns the current value of the effective date. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.date.set effective |
void(Calendar) |
setEffectiveDate |
Updates the effective date in the rules engine. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.rules |
void() |
watchRules |
Prints information about rule firings (execution of activations). |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.activations |
void() |
watchActivations |
Prints information about addition or removal of activations from the agenda. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.facts |
void() |
watchFacts |
Prints information about assertion, retraction, or modification of facts in working memory. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.focus |
void() |
watchFocus |
Prints information about pushing and popping of the ruleset stack. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.compilations |
void() |
watchCompilations |
Prints information about how the condition parts of a rule are shared with existing rules. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.watch.all |
void() |
watchAll |
Prints information about rules, facts, activations, focus, and compilations. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.rules |
void() |
clearWatchRules |
Stops printing information about rule firings. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.activations |
void() |
clearWatchActivations |
Stops printing information about addition or removal of activations from the agenda. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.facts |
void() |
clearWatchFacts |
Stops printing information about assertion, retraction, or modification of facts in working memory. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.focus |
void() |
clearWatchFocus |
Stops printing information about pushing and popping of the ruleset stack. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.compilations |
void() |
clearWatchCompilations |
Stops printing information about how the condition parts of a rule are shared with existing rules. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.stop watching.all |
void() |
clearWatchAll |
Stops printing information about rules, facts, activations, focus, and compilations. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.show.facts |
void() |
showFacts |
Prints all facts in working memory. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |
RL.show.activations |
void() |
showActivations |
Prints all activations on the agenda. |
Oracle Fusion Middleware Language Reference Guide for Oracle Business Rules |