Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.editor.datamodel
Class DataModel

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byoracle.rules.sdk.editor.datamodel.ModelComponent
              extended byoracle.rules.sdk.editor.datamodel.DataModel

All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class DataModel
extends ModelComponent

DataModel is the top level container of the entire model, through which applications can access the list of global variables, constraints, functions and FactTypes. Each dictionary can only have one datamodel.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_MODEL_NAME
          Construct a read-only datamodel object for a given version
static java.lang.String PROP_CONSTRAINT_TABLE
           
static java.lang.String PROP_FACT_TYPE_TABLE
           
static java.lang.String PROP_FUNCTION_TABLE
           
static java.lang.String PROP_VARIABLE_TABLE
           

 

Fields inherited from class oracle.rules.sdk.editor.datamodel.ModelComponent
PROP_ALIAS, PROP_ID, PROP_NAME, PROP_PROPERTIES, PROP_VISIBLE

 

Constructor Summary
DataModel(RuleDictionary dict)
          Constructor used to edit a datamodel.

 

Method Summary
 Constraint getConstraint(java.lang.String constraintName)
          Get a constraint by name
 Constraint[] getConstraints()
          Get all constraint inside the data model
 ConstraintTable getConstraintTable()
          Get the constraint Table
 FactType[] getFactTypes()
          Get all FactTypes inside the data model
 FactTypeTable getFactTypeTable()
          Get all FactTypes inside the data model
 Function getFunction(java.lang.String funcName)
          Get a function by name
 Function[] getFunctions()
          Get all functions inside the data model
 FunctionTable getFunctionTable()
          Get the function table
 JavaFactType[] getJavaFactTypes()
          Get all Java FactTypes inside the data model (excluding JAXB fact type)
 JaxbFactType[] getJaxbFactTypes()
          Get all Jaxb FactTypes inside the data model
 PrimitiveFactType[] getPrimitiveTypes()
          Get all primitive FactTypes inside the data model
 RLFactType[] getRLFactTypes()
          Get all RL FactTypes inside the data model
 RuleDictionary getRuleDictionary()
          Get the containing RuleDictionary object
 Variable getVariable(java.lang.String variableName)
          Get a global variable by name
 Variable[] getVariables()
          Get all global variables inside the data model
 VariableTable getVariableTable()
          Get the global variable table
 void update()
          Save the DataModel into an in-memory dictionary.
 void validate()
          Validate the consistency of the datamodel.

 

Methods inherited from class oracle.rules.sdk.editor.datamodel.ModelComponent
get, getAlias, getDataModel, getID, getName, getParent, getProperties, getVisible, setAlias, setName, setVisible

 

Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values

 

Methods inherited from class java.util.AbstractMap
equals, hashCode, toString

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.util.Map
equals, hashCode

 

Field Detail

DEFAULT_MODEL_NAME

public static final java.lang.String DEFAULT_MODEL_NAME
Construct a read-only datamodel object for a given version
See Also:
Constant Field Values

PROP_VARIABLE_TABLE

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

PROP_CONSTRAINT_TABLE

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

PROP_FUNCTION_TABLE

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

PROP_FACT_TYPE_TABLE

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

Constructor Detail

DataModel

public DataModel(RuleDictionary dict)
          throws RulesSDKException
Constructor used to edit a datamodel. If no datamodel in the Rule Dictionary, a new datamodel is going to be created.
Parameters:
dict - The dictionary in which the datamodel is to be editted.
Throws:
thrown - if error occured when loading the persistent datamodel into the editor datamodel
RulesSDKException

Method Detail

getRuleDictionary

public RuleDictionary getRuleDictionary()
Get the containing RuleDictionary object
Returns:
the containing RuleDictionary Object

validate

public void validate()
              throws RulesSDKDMValidationException
Validate the consistency of the datamodel.
Overrides:
validate in class ModelComponent
Throws:
thrown - if the datamodel is not consistent.
RulesSDKDMValidationException

update

public void update()
            throws RulesSDKException
Save the DataModel into an in-memory dictionary. Note the changes is not persisted yet after calling update(). If you want to persist the change, you have to save the datamodel to repository. See package overview example code.
Throws:
thrown - if error occured when validating the datamodel or saving the datamodel.
RulesSDKException

getVariableTable

public VariableTable getVariableTable()
Get the global variable table
Returns:
the list of variables inside the data model

getVariable

public Variable getVariable(java.lang.String variableName)
Get a global variable by name
Parameters:
variableName - name of the variable
Returns:
the variable matching the name

getConstraintTable

public ConstraintTable getConstraintTable()
Get the constraint Table
Returns:
the list of constraints inside the data model

getConstraint

public Constraint getConstraint(java.lang.String constraintName)
Get a constraint by name
Parameters:
constraintName - name of the constraint
Returns:
the constraint matching the name

getFunctionTable

public FunctionTable getFunctionTable()
Get the function table
Returns:
the list of functions inside the data model

getFunction

public Function getFunction(java.lang.String funcName)
Get a function by name
Parameters:
funcName - name of the function
Returns:
the function matching the name

getFactTypeTable

public FactTypeTable getFactTypeTable()
Get all FactTypes inside the data model
Returns:
all the FactTypes inside the data model

getFactTypes

public FactType[] getFactTypes()
Get all FactTypes inside the data model
Returns:
all the FactTypes inside the data model

getVariables

public Variable[] getVariables()
Get all global variables inside the data model
Returns:
all the global variables inside the data model

getConstraints

public Constraint[] getConstraints()
Get all constraint inside the data model
Returns:
all the constraints inside the data model

getFunctions

public Function[] getFunctions()
Get all functions inside the data model
Returns:
all the functions inside the data model

getJavaFactTypes

public JavaFactType[] getJavaFactTypes()
Get all Java FactTypes inside the data model (excluding JAXB fact type)
Returns:
all the Java FactTypes inside the data model

getJaxbFactTypes

public JaxbFactType[] getJaxbFactTypes()
Get all Jaxb FactTypes inside the data model
Returns:
all the Jaxb FactTypes inside the data model

getRLFactTypes

public RLFactType[] getRLFactTypes()
Get all RL FactTypes inside the data model
Returns:
all the RL FactTypes inside the data model

getPrimitiveTypes

public PrimitiveFactType[] getPrimitiveTypes()
Get all primitive FactTypes inside the data model
Returns:
all the primitive FactTypes inside the data model

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.