Skip navigation links

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

E10663-03


oracle.rules.sdk2.dictionary
Class DictionaryComponentTable<T extends DictionaryComponent>

java.lang.Object
  extended by oracle.rules.sdk2.dictionary.DictionaryObject
      extended by oracle.rules.sdk2.dictionary.DictionaryComponentTable<T>

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>
Direct Known Subclasses:
DictionaryLinkTable, ModelComponentTable, RuleComponentTable

public abstract class DictionaryComponentTable<T extends DictionaryComponent>
extends DictionaryObject
implements java.util.List<T>

A dictionary component table is a List of DictionaryComponents.

See Also:
Serialized Form

Field Summary
static java.lang.String SORT
           
static java.lang.String SORT_ASCEND
           
static java.lang.String SORT_DECEND
           

 

Method Summary
 T add()
          Add a new element to the table and return the new element.
abstract  T add(int index)
          Add a new element to the table at the specified location and return the new element Must be abstract because generics cannot do "new T"
 boolean add(T o)
          Used internally by subclasses.
 void clear()
          remove all elements in the table
 boolean contains(java.lang.Object o)
          return if the the table contains the object
 boolean containsAll(java.util.Collection<?> c)
          returns true if the table contains all of the components in the Collection argument
 T copyTo(int index, T from)
           
 void cut(T dc)
          Cut (remove) the given component from this table.
 T get(int index)
          retrieve the ith element from the table
 java.util.List<DOID> getAEReferences()
          Get DOIDs referenced by this Object and descendants.
 java.util.List<DOID> getAllReferences()
          Get all DOIDs referenced by this Object and descendants.
 T getByAlias(java.lang.String alias)
          Get a DictionaryComponent from this table by its alias.
 T getByID(DOID id)
          Get a DictionaryComponent from this table by its ID.
 T getByName(java.lang.String name)
          Get a DictionaryComponent from this table by its name.
 T getLast()
          Get the last entry in the table
 DictionaryComponent[] getMarked()
          see DictionaryComponentTable.mark(int[])
 int indexOf(java.lang.Object o)
          get the index of the Object argument
 boolean isEmpty()
          return if the table is empty
 boolean isLocked()
          Whether the table is locked (is readonly)
 java.util.Iterator<T> iterator()
           
 java.util.ListIterator<T> listIterator()
           
 java.util.ListIterator<T> listIterator(int index)
           
 void mark(int[] index)
          Mark the rows with the given indexes
 T move(int index, boolean up)
          Shift the entry defined by index either up or down one entry in the table.
 void move(int fromIndex, int toIndex, boolean replace)
          Move the DictionaryComponent with the given id from its current location to the location of the second id.
 T paste(T dc)
          Paste a cut or existing component at the end of this table
 T remove(int index)
          Remove the DictionaryComponent at the given index from the table
 boolean remove(java.lang.Object o)
          remove the DictionaryComponent from this table
 boolean removeAll(java.util.Collection<?> c)
          remove all of the elements in the Collection from this table
 T removeByAlias(java.lang.String alias)
          Remove the DictionaryComponent with the given alias from the table
 T removeByID(DOID id)
          Remove the DictionaryComponent with the given id from the table
 T removeByName(java.lang.String name)
          Remove the DictionaryComponent with the given name from the table
 int removeMarked()
           
 void reorder(java.util.List<java.lang.Integer> ordering)
          reorder this table according to a list of indexes.
 T set(int index, T element)
          Used internally by subclasses.
 int size()
          return the size of the table
static void sort(java.util.List<? extends DictionaryComponent> list, java.lang.String prop, boolean ascending)
           
 void sort(java.lang.String prop)
           
 void sort(java.lang.String prop, boolean ascending)
           
 java.util.List<T> subList(int fromIndex, int toIndex)
          Not Supported
 java.lang.Object[] toArray()
           
<U> U[]
toArray(U[] a)
           
 void unMark()
          Clear marks.
 void validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings)
          Validate the entire dictionary object and its decendants.
 void validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings, int modelChangeLowerBound, int ruleChangeLowerBound)
          Validate each DictionaryObject in the table.

 

Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject
equals, exists, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectPath, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validate

 

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

 

Methods inherited from interface java.util.List
add, addAll, addAll, equals, hashCode, lastIndexOf, retainAll

 

Field Detail

SORT_ASCEND

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

SORT_DECEND

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

SORT

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

Method Detail

getByName

public T getByName(java.lang.String name)
Get a DictionaryComponent from this table by its name.
Parameters:
name - name of component
Returns:
the component

getByID

public T getByID(DOID id)
Get a DictionaryComponent from this table by its ID.
Parameters:
id - ID of component
Returns:
the component

getByAlias

public T getByAlias(java.lang.String alias)
Get a DictionaryComponent from this table by its alias.
Parameters:
alias - alias of component
Returns:
the component

removeByID

public T removeByID(DOID id)
                                         throws DeleteException
Remove the DictionaryComponent with the given id from the table
Parameters:
id - the id returned by DictionaryComponent.getId()
Returns:
the removed component
Throws:
DeleteException - if the component cannot be removed (e.g. a Java Method)

removeByName

public T removeByName(java.lang.String name)
                                           throws DeleteException
Remove the DictionaryComponent with the given name from the table
Parameters:
name - the name returned by DictionaryComponent.getName()
Throws:
DeleteException

removeByAlias

public T removeByAlias(java.lang.String alias)
                                            throws DeleteException
Remove the DictionaryComponent with the given alias from the table
Parameters:
alias - the alias returned by DictionaryComponent.getAlias()
Throws:
DeleteException

validate

public void validate(java.util.List<SDKException> errors,
                     java.util.List<SDKWarning> warnings,
                     int modelChangeLowerBound,
                     int ruleChangeLowerBound)
Validate each DictionaryObject in the table.
Overrides:
validate in class DictionaryObject
Parameters:
errors - validation errors
warnings - validation warnings
modelChangeLowerBound - determines what needs to be revalidated based on changes to the dictionary
ruleChangeLowerBound - smallest RuleComponent.CreationUpdateNumber modified in thix tx. Rulesets and rules with UpdateNumber >= modelChangeLowerBound will be revalidated. a value of 0 will force revalidation of all rulesets. A value of Integer.MAX_VALUE will skip validation of all rulesets.

validate

public void validate(java.util.List<SDKException> errors,
                     java.util.List<SDKWarning> warnings)
Description copied from class: DictionaryObject
Validate the entire dictionary object and its decendants. Not incremental.
Specified by:
validate in class DictionaryObject
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)

size

public int size()
return the size of the table
Specified by:
size in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
size in interface java.util.List<T extends DictionaryComponent>

isEmpty

public boolean isEmpty()
return if the table is empty
Specified by:
isEmpty in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
isEmpty in interface java.util.List<T extends DictionaryComponent>

contains

public boolean contains(java.lang.Object o)
return if the the table contains the object
Specified by:
contains in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
contains in interface java.util.List<T extends DictionaryComponent>

getAEReferences

public java.util.List<DOID> getAEReferences()
Description copied from class: DictionaryObject
Get DOIDs referenced by this Object and descendants. By convention, properties of type DOID and DOID[] are not considered. This basically makes this useful for finding DOIDs referenced in IDTables and in Expressions and Actions. Note that a parent contains its children but (usually) does not reference them.
Specified by:
getAEReferences in class DictionaryObject
Returns:
list of the DOIDS

getAllReferences

public java.util.List<DOID> getAllReferences()
Description copied from class: DictionaryObject
Get all DOIDs referenced by this Object and descendants.
Specified by:
getAllReferences in class DictionaryObject
Returns:
list of the DOIDS

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T extends DictionaryComponent>
Specified by:
iterator in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
iterator in interface java.util.List<T extends DictionaryComponent>

listIterator

public java.util.ListIterator<T> listIterator()
Specified by:
listIterator in interface java.util.List<T extends DictionaryComponent>

listIterator

public java.util.ListIterator<T> listIterator(int index)
Specified by:
listIterator in interface java.util.List<T extends DictionaryComponent>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
toArray in interface java.util.List<T extends DictionaryComponent>

toArray

public <U> U[] toArray(U[] a)
Specified by:
toArray in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
toArray in interface java.util.List<T extends DictionaryComponent>

add

public boolean add(T o)
Used internally by subclasses.
Specified by:
add in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
add in interface java.util.List<T extends DictionaryComponent>
Parameters:
o - component to be added, must be of correct type for table.

containsAll

public boolean containsAll(java.util.Collection<?> c)
returns true if the table contains all of the components in the Collection argument
Specified by:
containsAll in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
containsAll in interface java.util.List<T extends DictionaryComponent>

removeAll

public boolean removeAll(java.util.Collection<?> c)
remove all of the elements in the Collection from this table
Specified by:
removeAll in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
removeAll in interface java.util.List<T extends DictionaryComponent>

clear

public void clear()
remove all elements in the table
Specified by:
clear in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
clear in interface java.util.List<T extends DictionaryComponent>

get

public T get(int index)
retrieve the ith element from the table
Specified by:
get in interface java.util.List<T extends DictionaryComponent>

set

public T set(int index,
             T element)
Used internally by subclasses.
Specified by:
set in interface java.util.List<T extends DictionaryComponent>
Parameters:
index - at which to replace the new row.
element - to replace existing, must be of correct type for table.

remove

public T remove(int index)
Remove the DictionaryComponent at the given index from the table
Specified by:
remove in interface java.util.List<T extends DictionaryComponent>
Parameters:
index - the index of the RuleCompoonent in the table.
Returns:
the Object which was removed.

remove

public boolean remove(java.lang.Object o)
remove the DictionaryComponent from this table
Specified by:
remove in interface java.util.Collection<T extends DictionaryComponent>
Specified by:
remove in interface java.util.List<T extends DictionaryComponent>

move

public void move(int fromIndex,
                 int toIndex,
                 boolean replace)
Move the DictionaryComponent with the given id from its current location to the location of the second id. Shift the row currently at that location up, or replace it.
Parameters:
fromIndex - the index of the row to move
toIndex - move row to this location
replace - if true, replace existing row at toIndex, if false move existing row to next higher index

move

public T move(int index,
              boolean up)
Shift the entry defined by index either up or down one entry in the table. The direction up==true will swap the entry with the one with index -1. The direction up==false will swap the entry with the one with index + 1.
Parameters:
index -
up - boolean
Returns:
the item moved

indexOf

public int indexOf(java.lang.Object o)
get the index of the Object argument
Specified by:
indexOf in interface java.util.List<T extends DictionaryComponent>

subList

public java.util.List<T> subList(int fromIndex,
                                 int toIndex)
Not Supported
Specified by:
subList in interface java.util.List<T extends DictionaryComponent>
Throws:
java.lang.UnsupportedOperationException

add

public T add()
Add a new element to the table and return the new element.
Returns:
new table element
Throws:
java.lang.UnsupportedOperationException - if table is locked.

add

public abstract T add(int index)
Add a new element to the table at the specified location and return the new element Must be abstract because generics cannot do "new T"
Returns:
new table element

copyTo

public T copyTo(int index,
                T from)

cut

public void cut(T dc)
Cut (remove) the given component from this table. Use DictionaryComponentTable.paste(T) to paste the component into this or a different table
Parameters:
dc -

paste

public T paste(T dc)
Paste a cut or existing component at the end of this table
Parameters:
dc - the component to paste into the table
Returns:
component pasted

reorder

public void reorder(java.util.List<java.lang.Integer> ordering)
reorder this table according to a list of indexes. e.g. to reverse a list of 3 elements, use ordering (2,1,0).
Parameters:
ordering - a list of indexes the same size as this list.

getLast

public T getLast()
Get the last entry in the table
Returns:
entry at position size() - 1

mark

public void mark(int[] index)
Mark the rows with the given indexes
Parameters:
index - an Array containing row numbers (not ID's) to be removed

unMark

public void unMark()
Clear marks. Set all rows to unmarked.

getMarked

public DictionaryComponent[] getMarked()
see DictionaryComponentTable.mark(int[])
Returns:
an Array of the marked RuleComponents

removeMarked

public int removeMarked()
                 throws DeleteException
Returns:
the number of rows removed
Throws:
DeleteException
See Also:
DictionaryComponentTable.mark(int[])

sort

public void sort(java.lang.String prop)

sort

public void sort(java.lang.String prop,
                 boolean ascending)

sort

public static void sort(java.util.List<? extends DictionaryComponent> list,
                        java.lang.String prop,
                        boolean ascending)

isLocked

public boolean isLocked()
Whether the table is locked (is readonly)
Returns:
whether the table is readonly

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.