public interface IlrDTDataProvider
The IlrDTDataProvider is hierarchically structured.
getObjects(ilog.rules.dt.model.IlrDTDefinition) is called to retrieve root elements of your data. Then,
for each element, getChildren(java.lang.Object, ilog.rules.dt.model.IlrDTDefinition) gives its children, and so on
recursively. When calling these two methods, you must provide a definition
(see IlrDTDefinition) of the decision table model, to indicate how
to provide your data. With
IlrDTDefinition.getExpressionParameterCount() a definition gives the
number of parameters of the decision table model items that correspond to the
elements of the collection returned from your data.
So, for each collection element returned by getObjects(ilog.rules.dt.model.IlrDTDefinition) and
getChildren(java.lang.Object, ilog.rules.dt.model.IlrDTDefinition), the method getValue(Object, int) is called to
fill a parameter of its corresponding item in the decision table model. This
parameter number is related to the definition given when getObjects(ilog.rules.dt.model.IlrDTDefinition)
and getChildren(java.lang.Object, ilog.rules.dt.model.IlrDTDefinition) were called.
When a decision table model is displayed as a table, root elements correspond to the cells of the first column. Children of a cell correspond to the cell directly to its right. So, only merged cells have more than one child. The number of parameters of a definition corresponds to the number of subcolumns of a column.
IlrDTDefinition| Modifier and Type | Method and Description |
|---|---|
java.util.Collection |
getChildren(java.lang.Object object,
IlrDTDefinition definition)
Returns the child elements of the object.
|
java.util.Collection |
getObjects(IlrDTDefinition definition)
Returns the root elements of the provided data.
|
java.util.Map |
getProperties(java.lang.Object object)
Not used in basic use of
IlrDTDataProvider. |
java.util.Map |
getProperties(java.lang.Object object,
int index)
Not used in basic use of
IlrDTDataProvider. |
java.lang.Object |
getValue(java.lang.Object object)
Not used in basic use of
IlrDTDataProvider. |
java.lang.Object |
getValue(java.lang.Object object,
int index)
Returns the value of the
index parameter of the element
object. |
java.util.Collection getObjects(IlrDTDefinition definition)
definition - Indicates the number of parameters of items corresponding to the
returned elements.IlrDTDefinition.getExpressionParameterCount()java.util.Collection getChildren(java.lang.Object object,
IlrDTDefinition definition)
object - The parent element of the returned collection of elements.definition - The number of parameters of items corresponding to the returned
elements.IlrDTDefinition.getExpressionParameterCount()java.lang.Object getValue(java.lang.Object object,
int index)
index parameter of the element
object.object - The element corresponding to the item from the decision table
model to be filled.index - Index of the parameter to be retrieved.String value of the index parameter.java.lang.Object getValue(java.lang.Object object)
IlrDTDataProvider.java.util.Map getProperties(java.lang.Object object)
IlrDTDataProvider.java.util.Map getProperties(java.lang.Object object,
int index)
IlrDTDataProvider.© Copyright IBM Corp. 1987, 2017