Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-03


oracle.rules.sdk2.decisiontable
Class BucketSet

java.lang.Object
  extended by oracle.rules.sdk2.dictionary.DictionaryObject
      extended by oracle.rules.sdk2.dictionary.DictionaryComponent
          extended by oracle.rules.sdk2.datamodel.ModelComponent
              extended by oracle.rules.sdk2.datamodel.TypedComponent
                  extended by oracle.rules.sdk2.decisiontable.BucketSet

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class BucketSet
extends TypedComponent

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:

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) ).

See Also:
Serialized Form

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
           

 

Fields inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent
PROP_ACCESS, PROP_ACTION_SELECTED, PROP_ACTION_TABLE, PROP_ACTIVE, PROP_ADVANCED_MODE, PROP_AGGREGATE, PROP_AGGREGATE_TABLE, PROP_ALIAS, PROP_ALLOW_GAPS, PROP_ALWAYS_SELECTED, PROP_ARRAY, PROP_ARRAY_COMPONENT_TYPE, PROP_ARRAY_COMPONENT_TYPE_ID, PROP_ARRAY_FACT_TYPE_TABLE, PROP_AUTO_CONFLICT_RESOLUTION, PROP_AUTO_PATTERN_PROPERTY, PROP_BODY, PROP_BUCKET_ID_TABLE, PROP_BUCKET_SET, PROP_BUCKET_SET_ID, PROP_BUCKET_SET_TABLE, PROP_BUCKET_TABLE, PROP_CALENDAR_FORM, PROP_CHECK_RULE_FLOW, PROP_CHILD_DIMENSION_NODES, PROP_CONFLICT, PROP_CONFLICT_POLICY, PROP_CONNECTIVE, PROP_CONSTANT, PROP_CONSTRUCTOR, PROP_CONSTRUCTOR_TABLE, PROP_CREATION_UPDATE_NUMBER, PROP_CURSOR_POSITION, PROP_CUSTOM_BINDING, PROP_CUSTOMIZABLE, PROP_CUSTOMIZABLE_TEMPLATE, PROP_DATA_MODEL, PROP_DATA_SOURCE, PROP_DECISION_FUNCTION, PROP_DECISION_FUNCTION_INPUT_TABLE, PROP_DECISION_FUNCTION_OUTPUT_TABLE, PROP_DECISION_FUNCTION_RULESET_TABLE, PROP_DECISION_FUNCTION_TABLE, PROP_DESCRIPTION, PROP_DICTIONARY_LINK_TABLE, PROP_DIMENSION_NODE_TABLE, PROP_DIMENSION_TABLE, PROP_DT_ACTION_NODE_TABLE, PROP_DT_ACTION_PARAMETER_NAME, PROP_DTACTION_TABLE, PROP_DTRULE_TABLE, PROP_EFFECTIVE_END_DATE, PROP_EFFECTIVE_START_DATE, PROP_ENUM, PROP_ENUM_BUCKET_SET_ID, PROP_ENUM_TYPE, PROP_EXCEPTION_IDS, PROP_EXCEPTIONS, PROP_EXCLUDED, PROP_EXPRESSION, PROP_EXPRESSION_TABLE, PROP_FACT_PATH, PROP_FACT_PATH_IDS, PROP_FACT_TYPE, PROP_FACT_TYPE_ID, PROP_FACT_TYPE_TABLE, PROP_FIELD_TABLE, PROP_FINAL, PROP_FORM, PROP_FORMAL_PARAMETER_TABLE, PROP_FUNCTION, PROP_FUNCTION_ID, PROP_FUNCTION_SIGNATURE, PROP_FUNCTION_TABLE, PROP_GENERATED_FROM, PROP_ID, PROP_ID_COUNTER, PROP_INCLUDED, PROP_INTERFACE, PROP_INTERFACE_IDS, PROP_INTERFACES, PROP_IS_ABSTRACT, PROP_IS_CONSTANT, PROP_IS_ENUM, PROP_IS_FINAL, PROP_IS_JAXB2, PROP_IS_PRIMARY_KEY, PROP_IS_STATIC, PROP_IS_TOPLEVEL_VIEW_OBJECT, PROP_LEFT, PROP_LIFECYCLE, PROP_LIFECYCLE_DESCRIPTION, PROP_LIST, PROP_LIST_CONTENT_TYPE, PROP_LIST_CONTENT_TYPE_ID, PROP_LOCAL, PROP_LOGICAL, PROP_METHOD_TABLE, PROP_MODIFIERS, PROP_NAME, PROP_NAMESPACE, PROP_NESTED_TABLE, PROP_NO_CONFLICT, PROP_NODE_NAME, PROP_OPERATOR, PROP_OPERATOR_ID, PROP_OTHERWISE, PROP_OUTPUT_TYPES, PROP_OVERLOADED_PARAMETER_TABLE, PROP_OVERRIDDEN_BY, PROP_OVERRIDE, PROP_PACKAGE, PROP_PARAMETER_ALIAS, PROP_PARAMETER_ID, PROP_PARAMETER_LIST, PROP_PARAMETER_NAME, PROP_PARAMETER_REQUIRED, PROP_PARAMETER_TYPE_IDS, PROP_PARAMETER_TYPES, PROP_PARENT_DIMENSION_NODE, PROP_PATTERN_TABLE, PROP_PRIORITY, PROP_PRIVATE_BUCKET_SET, PROP_PROPERTIES, PROP_PROPERTY_TABLE, PROP_READABLE, PROP_REF_ID, PROP_REPORT_BYUSE_NAMES, PROP_REPORT_PATTERNS, PROP_RESOLVED_TARGET, PROP_RESOLVED_VALUE, PROP_RETURN_TYPE, PROP_RIGHT, PROP_RIGHT_SEPARATOR, PROP_RULE_FIRING_LIMIT, PROP_RULE_REPORT_TABLE, PROP_RULE_SET_TABLE, PROP_RULE_SHEET_TABLE, PROP_RULE_TABLE, PROP_RULESET, PROP_RUN_AFTER, PROP_RUN_BEFORE, PROP_SERVICE_CONFIGURATION, PROP_SERVICE_NAME, PROP_SERVICE_NAMESPACE, PROP_SHARED_BUCKET_SET, PROP_SHARED_BUCKET_SET_ID, PROP_SHOW_CONSTANTS, PROP_SHOW_FUNCTIONS, PROP_SHOW_VARIABLES, PROP_SIMPLE_TEST_TABLE, PROP_SOURCE, PROP_STATELESS, PROP_STATIC, PROP_SUPER_CLASS, PROP_SUPER_CLASS_ID, PROP_SUPPORT_XPATH, PROP_SUPPORTS_XPATH_ENABLED, PROP_SYSTEM, PROP_TARGET, PROP_TARGET_PACKAGE, PROP_TEST_FORM, PROP_TIMESTAMP, PROP_TOKEN_UNDER_CURSOR, PROP_TREE, PROP_TREE_MODE, PROP_TYPE, PROP_TYPE_ID, PROP_TYPE_IDS, PROP_TYPES, PROP_UPDATE_NUMBER, PROP_VALIDATION_UPDATE_NUMBER, PROP_VALUE, PROP_VALUES, PROP_VARIABLE, PROP_VARIABLE_TABLE, PROP_VERSION, PROP_VISIBILITY_FILTER, PROP_VISIBILITY_FILTER_ENABLED, PROP_VISIBLE, PROP_WEB_SERVICE, PROP_WRAPPER_SIGNATURE, PROP_WRITABLE, PROP_XML_NAME

 

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.Comparable rMinEndpoint, boolean rMinIncluded, java.lang.Comparable rMaxEndpoint, boolean rMaxIncluded)
          remove range buckets within range
 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, 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

ALL_VALUES_LIST

public static final java.util.List<Bucket> ALL_VALUES_LIST

UNKNOWN_VALUE_LIST

public static final java.util.List<Bucket> UNKNOWN_VALUE_LIST

CALENDAR_FORM_DATE

public static final 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

See Also:
Constant Field Values

CALENDAR_FORM_TIME

public static final java.lang.String CALENDAR_FORM_TIME
See Also:
Constant Field Values

CALENDAR_FORM_DATETIME

public static final java.lang.String CALENDAR_FORM_DATETIME
See Also:
Constant Field Values

FORM_LOV

public static final java.lang.String FORM_LOV
Forms - to distinguish LOV bucket set from Range bucket set
See Also:
Constant Field Values

FORM_RANGE

public static final java.lang.String FORM_RANGE
See Also:
Constant Field Values

FORM_ENUM

public static final java.lang.String FORM_ENUM
See Also:
Constant Field Values

FORM_DEFAULT

public static final java.lang.String FORM_DEFAULT
See Also:
Constant Field Values

Method Detail

getFormProperty

public SettableProperty<java.lang.String> getFormProperty()
Get Form Property.
Returns:
String SettableProperty

getForm

public java.lang.String getForm()
Get value of Form property
Returns:
String

setForm

public void setForm(java.lang.String form)
set the FORM to RANGE, LOV, or default based on data type.
Parameters:
form -

getFormOptions

public java.lang.String[] getFormOptions()

getFormSelected

public int getFormSelected()

getCalendarFormProperty

public SettableProperty<java.lang.String> getCalendarFormProperty()
Get CalendarForm Property.
Returns:
String SettableProperty

getCalendarForm

public java.lang.String getCalendarForm()
Get Calendar Form value (Date, Time, or DateTime). Default is Date.
Returns:
String

setCalendarForm

public void setCalendarForm(java.lang.String form)

getCalendarFormOptions

public java.lang.String[] getCalendarFormOptions()

getCalendarFormSelected

public int getCalendarFormSelected()

getTestExcludedBucketsProperty

public SettableProperty<java.lang.Boolean> getTestExcludedBucketsProperty()
Get TestExcludedBuckets Property.
Returns:
Boolean SettableProperty

isTestExcludedBuckets

public boolean isTestExcludedBuckets()
should excluded bucket values be allowed in tests or DT condition cells?
Returns:
true or false

setTestExcludedBuckets

public void setTestExcludedBuckets(boolean flag)
should excluded bucket values be allowed in tests or DT condition cells?

getBucketTableProperty

public TableProperty<Bucket> getBucketTableProperty()
Get BucketTable Property.
Returns:
Bucket TableProperty

getBucketTable

public BucketTable getBucketTable()
Get BucketTable
Returns:
BucketTable of the BucketSet

getBuckets

public java.util.List<Bucket> getBuckets()
Get Buckets
Returns:
Buckets in the BucketSet that are not excluded from tests

add

public Bucket add(java.lang.String name)
           throws SDKException
Add Bucket(s) by name. Name can be a value to add to a LOV, or the name of a range. If the name of a range, buckets are added (if needed) in correct order in BucketTable with (minEndpoint, included) property values as shown:
 <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) 
 
Parameters:
name - name of new bucket (value or range)
Throws:
SDKException - if v1 >= v2, v1 < v3, or v* cannot be parsed

add

public Bucket add(java.lang.String value,
                  boolean included)
Add Bucket to Range BucketSet in correct order in BucketTable
Parameters:
value - minEndpoint of range
included - endpoint in range?
Returns:
null if not a range bucketset, or if value cannot be converted to a minEndpoint

remove

public void remove(java.lang.String name)
            throws SDKException
Remove buckets by name. For LOV BucketSet, simply remove named bucket. For Range BucketSet, parse the name for one or two endpoints as in 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.
Parameters:
name - of bucket or bucket range
Throws:
SDKException - as per BucketSet.add(String)

remove

public void remove(java.lang.Comparable rMinEndpoint,
                   boolean rMinIncluded,
                   java.lang.Comparable rMaxEndpoint,
                   boolean rMaxIncluded)
remove range buckets within range
Parameters:
rMinEndpoint - lower end of range
rMinIncluded - is endpoint included in range
rMaxEndpoint - upper end of range
rMaxIncluded - is endpoint included in range

getValues

public java.lang.String[] getValues()
Get the bucket set as an array of bucket names Excluded buckets are not shown.
Returns:
array of bucket names (values or ranges)

validate

public void validate(java.util.List<SDKException> errors,
                     java.util.List<SDKWarning> warnings)
Description copied from class: DictionaryComponent
Validate and append errors and warnings.
Overrides:
validate in class TypedComponent
Parameters:
errors - a List of error exceptions to append to.
warnings - a List of warning exceptions to append to.
See Also:
DictionaryObject.validate(List,List,int,int)

isRange

public boolean isRange()
is the bucketset a range bucketset?
Returns:
true if form is range or form is default and data type is numeric, date, or calendar.

hasOtherwise

public boolean hasOtherwise()
Does the bucketset contain an otherwise bucket?

hasExclusions

public boolean hasExclusions()
does the bucketset have excluded buckets?
Returns:
true or false

isCalendarType

public boolean isCalendarType()
Is the type of the bucketset Calendar? This is mainly used for determining if the Calendar Form should be displayed or set

getBooleanBucketSet

public static BucketSet getBooleanBucketSet()

getOptions

public static java.lang.String[] getOptions(DictionaryComponent dc,
                                            DOID typeID)

isExcluded

public boolean isExcluded(DictionaryObject context,
                          java.lang.String constant,
                          boolean test)

getOtherwise

public Bucket getOtherwise()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-03


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.