Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.editor.datamodel
Class FactTypeTable

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byoracle.rules.sdk.editor.datamodel.ModelComponentTable
                  extended byoracle.rules.sdk.editor.datamodel.FactTypeTable

All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class FactTypeTable
extends ModelComponentTable

Top level table in the datamodel. It contains a list of Fact Types.

See Also:
Serialized Form

Method Summary
 RLFactType addRLFactType()
          Create a RLFactType and add it to the Fact type table
 FactType getFactType(int index)
          get a factType by index
 FactType getFactType(java.lang.String id)
          get a factType by id
 FactType getFactTypeByAlias(java.lang.String alias)
          get a factType by alias
 FactType getFactTypeByID(java.lang.String id)
          get a factType by id
 FactType getFactTypeByName(java.lang.String name)
          get a factType by name
 java.lang.Object removeByID(java.lang.String id)
          Remove a factType by id.
 int removeByIDs(java.lang.String[] ids)
          Remove a list of factTypes by ID.
 java.lang.Object removeByName(java.lang.String name)
          Remove a factType by name.
 int removeByNames(java.lang.String[] names)
          Remove a list of factTypes by name.
 int removeMarked()
          Remove the rows previously marked.

 

Methods inherited from class oracle.rules.sdk.editor.datamodel.ModelComponentTable
getParent, mark

 

Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize

 

Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList

 

Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString

 

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

 

Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList

 

Method Detail

addRLFactType

public RLFactType addRLFactType()
Create a RLFactType and add it to the Fact type table
Returns:
The newly created RLFact.

getFactType

public FactType getFactType(int index)
get a factType by index
Parameters:
index - the index of the factType list
Returns:
The factType in the position

getFactType

public FactType getFactType(java.lang.String id)
get a factType by id
Parameters:
id - the id of the factType requested
Returns:
The factType matching the id

getFactTypeByName

public FactType getFactTypeByName(java.lang.String name)
get a factType by name
Parameters:
name - the name of the factType requested
Returns:
The factType matching the name

getFactTypeByAlias

public FactType getFactTypeByAlias(java.lang.String alias)
get a factType by alias
Parameters:
alias - the alias of the factType requested
Returns:
The factType matching the alias. NULL if no match.

getFactTypeByID

public FactType getFactTypeByID(java.lang.String id)
get a factType by id
Parameters:
id - the id of the factType requested
Returns:
The factType matching the id. NULL if no match.

removeByID

public java.lang.Object removeByID(java.lang.String id)
                            throws DeleteException
Remove a factType by id. If the given id does not match any facttype, then no factType is removed. If the factType is used in other datamodel/rule definition(s), a DeleteException is thrown.
Specified by:
removeByID in class ModelComponentTable
Parameters:
id - the id of the factType to be removed
Returns:
The factType being removed. Null if no factType is removed.
Throws:
thrown - if the factType is used in other datamodel/rule definition(s). The message of the exception contains all the places where the factType is used
DeleteException

removeByName

public java.lang.Object removeByName(java.lang.String name)
                              throws DeleteException
Remove a factType by name. If the given name does not match any facttype, then no factType is removed. If the factType is used in other datamodel/rule definition(s), a DeleteException is thrown.
Parameters:
name - the fully qualified name of the factType to be removed
Returns:
The factType being removed. Null if no factType is removed.
Throws:
thrown - if the factType is used in other datamodel/rule definition(s). The message of the exception contains all the places where the factType is used
DeleteException

removeMarked

public int removeMarked()
                 throws DeleteException
Remove the rows previously marked. Overwrite the method in base class. If we have fact1 depends on fact2 and fact2 depends on fact1 (circular reference). We won't be able to delete either of the facts using the base class implementation. The implementation here allows the deletion of fact1 and fact2 together.
Overrides:
removeMarked in class ModelComponentTable
Returns:
the number of rows removed
Throws:
thrown - if the marked factTypes are used in other datamodel/rule definition(s). The message of the exception contains all the places where the list of factTypes are used
DeleteException

removeByNames

public int removeByNames(java.lang.String[] names)
                  throws DeleteException
Remove a list of factTypes by name. It is useful in the scenario that fact1 depends on fact2 and fact2 depends on fact1 (circular reference).
Parameters:
names - the fully qualified names of the factTypes to be removed
Returns:
The number of facttypes removed
Throws:
thrown - if the group of factTypes are used in other datamodel/rule definition(s). The message of the exception contains all the places where the list of factTypes are used
DeleteException

removeByIDs

public int removeByIDs(java.lang.String[] ids)
                throws DeleteException
Remove a list of factTypes by ID. It is useful in the scenario that fact1 depends on fact2 and fact2 depends on fact1 (circular reference).
Parameters:
ids - the IDs of the factTypes to be removed
Returns:
The number of facttypes removed
Throws:
thrown - if the group of factTypes are used in other datamodel/rule definition(s). The message of the exception contains all the places where the list of factTypes are used
DeleteException

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.