|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.5.0) E10663-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.dictionary.DictionaryObject
oracle.rules.sdk2.dictionary.DictionaryComponent
oracle.rules.sdk2.datamodel.ModelComponent
oracle.rules.sdk2.datamodel.TypedComponent
oracle.rules.sdk2.decisiontable.BucketSet
public class BucketSet
A BucketSet is the set of values in a Dimension of a decision table. BucketSets have a type that must be the same as that of values that are contained in the buckets. The type must be a primitive, String, or Calendar. Note that these types are all Comparable. There are three forms of BucketSet:
BucketSet.isRange()
A BucketSet is always associated with every Dimension in a decision table. Each DimensionNode in the Dimension takes its values from this BucketSet. To facilitate reuse of BucketSets, a BucketSet can be named and stored in the RuleDictionary data model. In addition, class Properties, class Methods, and Functions can be associated with a named BucketSet (if their types are equal). In this way, a dimension in a decision table whose dimension expression is a property, method call, or function call can automatically be assigned a BucketSet, and thus the choice lists for the DimensionNodes will be populated with the predefined buckets.
If there is no predefined BucketSet, then a local BucketSet will be built up dynamically as new buckets are entered into the DimensionNodes. If new buckets are added to a Dimension that has a predefined BucketSet, a dialog should ask the user whether the intent is to update the named BucketSet in the data model or to make a private updated copy associated with the Dimension.
A BucketSet contains Buckets in a BucketTable. A LOV BucketSet has Buckets with a single String value (if the BucketSet type is not String, the toString method (or Dates.toISO8601{Date,Time,DateTime} methods) is used to convert to String). By default, an initial Bucket with special value "otherwise" is created that is distinct from all other bucket values. This bucket matches all values that have no other bucket. The otherwise bucket may not be deleted but may be excluded. If this bucket is excluded then the semantics of "don't care" change to "match any bucket" but DON'T match a value that is not represented by a Bucket.
A RANGE BucketSet has Buckets that store the String value of the lesser-valued endpoint of the subrange (as per Comparable) . The Bucket also contains a boolean indicating whether the endpoint is included in the range (and thus excluded from the previous range). The first Bucket stores the empty string instead of the String value representing the minimum value (the minimum is never needed for comparison), its included flag is always true, and it may not be deleted. Similarly, the last Bucket stores its minimum endpoint but its maximum endpoint is not stored and is never needed.
In user choice lists and for quickly adding a new bucket to a range, a syntax that specifies one endpoint and an inequality may be used for the first and last bucket (e.g. <0, >=100). A syntax that specifies both endpoints and whether or not the endpoint is included may be used for the other buckets (e.g. [0..100) ).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
DictionaryComponent.Diff, DictionaryComponent.DiffType |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.util.List<Bucket> |
ALL_VALUES_LIST |
static java.lang.String |
CALENDAR_FORM_DATE Calendar Forms - to distinguish date, time, or datetime calendar format String values are part of oracle.rules.rl.extensions.JavaDate.from***String methods |
static java.lang.String |
CALENDAR_FORM_DATETIME |
static java.lang.String |
CALENDAR_FORM_TIME |
static java.lang.String |
FORM_DEFAULT |
static java.lang.String |
FORM_ENUM |
static java.lang.String |
FORM_LOV Forms - to distinguish LOV bucket set from Range bucket set |
static java.lang.String |
FORM_RANGE |
static java.util.List<Bucket> |
UNKNOWN_VALUE_LIST |
Method Summary | |
---|---|
Bucket |
add(java.lang.String name) Add Bucket(s) by name. |
Bucket |
add(java.lang.String value, boolean included) Add Bucket to Range BucketSet in correct order in BucketTable |
static BucketSet |
getBooleanBucketSet() |
java.util.List<Bucket> |
getBuckets() Get Buckets |
BucketTable |
getBucketTable() Get BucketTable |
TableProperty<Bucket> |
getBucketTableProperty() Get BucketTable Property. |
java.lang.String |
getCalendarForm() Get Calendar Form value (Date, Time, or DateTime). |
java.lang.String[] |
getCalendarFormOptions() |
SettableProperty<java.lang.String> |
getCalendarFormProperty() Get CalendarForm Property. |
int |
getCalendarFormSelected() |
java.lang.String |
getForm() Get value of Form property |
java.lang.String[] |
getFormOptions() |
SettableProperty<java.lang.String> |
getFormProperty() Get Form Property. |
int |
getFormSelected() |
static java.lang.String[] |
getOptions(DictionaryComponent dc, DOID typeID) |
Bucket |
getOtherwise() |
SettableProperty<java.lang.Boolean> |
getTestExcludedBucketsProperty() Get TestExcludedBuckets Property. |
java.lang.String[] |
getValues() Get the bucket set as an array of bucket names Excluded buckets are not shown. |
boolean |
hasExclusions() does the bucketset have excluded buckets? |
boolean |
hasOtherwise() Does the bucketset contain an otherwise bucket? |
boolean |
isCalendarType() Is the type of the bucketset Calendar? |
boolean |
isExcluded(DictionaryObject context, java.lang.String constant, boolean test) |
boolean |
isRange() is the bucketset a range bucketset? |
boolean |
isTestExcludedBuckets() should excluded bucket values be allowed in tests or DT condition cells? |
void |
remove(java.lang.String name) Remove buckets by name. |
void |
setCalendarForm(java.lang.String form) |
void |
setForm(java.lang.String form) set the FORM to RANGE, LOV, or default based on data type. |
void |
setTestExcludedBuckets(boolean flag) should excluded bucket values be allowed in tests or DT condition cells? |
void |
validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings) Validate and append errors and warnings. |
Methods inherited from class oracle.rules.sdk2.datamodel.TypedComponent |
---|
getFullyQualifiedTypeName, getListContentType, getListContentTypeFullName, getListContentTypeID, getListContentTypeName, getListContentTypeOptions, getListContentTypeProperty, getType, getTypeID, getTypeName, getTypeOptions, getTypeProperty, getTypeSelected, isCollection, isPrimitiveType, setListContentType, setListContentTypeID, setListContentTypeName, setType, setTypeID, setTypeName |
Methods inherited from class oracle.rules.sdk2.datamodel.ModelComponent |
---|
getParent, getParentTable, getVisibleProperty, isVisible, setVisible |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
clear, containsKey, containsValue, entrySet, get, getAlias, getAlias, getAliasProperty, getAllReferences, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getIndex, getIndex, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, init, isAliasDistinct, isEmpty, isFullyQualifiedName, isNameDistinct, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, values |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject |
---|
equals, exists, getAEReferences, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validate |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final java.util.List<Bucket> ALL_VALUES_LIST
public static final java.util.List<Bucket> UNKNOWN_VALUE_LIST
public static final java.lang.String CALENDAR_FORM_DATE
String values are part of oracle.rules.rl.extensions.JavaDate.from***String methods
public static final java.lang.String CALENDAR_FORM_TIME
public static final java.lang.String CALENDAR_FORM_DATETIME
public static final java.lang.String FORM_LOV
public static final java.lang.String FORM_RANGE
public static final java.lang.String FORM_ENUM
public static final java.lang.String FORM_DEFAULT
Method Detail |
---|
public SettableProperty<java.lang.String> getFormProperty()
public java.lang.String getForm()
public void setForm(java.lang.String form)
form
-public java.lang.String[] getFormOptions()
public int getFormSelected()
public SettableProperty<java.lang.String> getCalendarFormProperty()
public java.lang.String getCalendarForm()
public void setCalendarForm(java.lang.String form)
public java.lang.String[] getCalendarFormOptions()
public int getCalendarFormSelected()
public SettableProperty<java.lang.Boolean> getTestExcludedBucketsProperty()
public boolean isTestExcludedBuckets()
public void setTestExcludedBuckets(boolean flag)
public TableProperty<Bucket> getBucketTableProperty()
public BucketTable getBucketTable()
public java.util.List<Bucket> getBuckets()
public Bucket add(java.lang.String name) throws SDKException
<v adds (v, true) <=v adds (v, false) >v adds (v, false) >=v adds (v, true) (v1..v2) adds (v1, false) and (v2, true) if v1 < v2 [v1..v2) adds (v1, true) and (v2, true) if v1 < v2 (v1..v2] adds (v1, false) and (v2, false) if v1 < v2 [v1..v3] adds (v1, true) and (v3, false) if v1 <= v3 =v adds (v, true) and (v, false) ==v adds (v, true) and (v, false)
name
- name of new bucket (value or range)SDKException
- if v1 >= v2, v1 < v3, or v* cannot be parsedpublic Bucket add(java.lang.String value, boolean included)
value
- minEndpoint of rangeincluded
- endpoint in range?public void remove(java.lang.String name) throws SDKException
BucketSet.add(String)
and delete buckets between two endpoints, or less than or greater than one endpoint, including the endpoints or not according to name notation.name
- of bucket or bucket rangeSDKException
- as per BucketSet.add(String)
public java.lang.String[] getValues()
public void validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings)
DictionaryComponent
validate
in class TypedComponent
errors
- a List of error exceptions to append to.warnings
- a List of warning exceptions to append to.DictionaryObject.validate(List,List,int,int)
public boolean isRange()
public boolean hasOtherwise()
public boolean hasExclusions()
public boolean isCalendarType()
public static BucketSet getBooleanBucketSet()
public static java.lang.String[] getOptions(DictionaryComponent dc, DOID typeID)
public boolean isExcluded(DictionaryObject context, java.lang.String constant, boolean test)
public Bucket getOtherwise()
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.5.0) E10663-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |