public abstract class DictionaryComponentTable<T extends DictionaryComponent> extends DictionaryObject implements java.util.List<T>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SORT |
static java.lang.String |
SORT_ASCEND |
static java.lang.String |
SORT_DECEND |
| Modifier and Type | Method and Description |
|---|---|
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.
|
java.util.List<T> |
filter(java.lang.String filterPattern,
boolean translate)
Get the Dictionary Components in this table that match the given pattern
|
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 |
getByAlias(java.lang.String alias,
boolean translate)
Get a DictionaryComponent from this table by its (translated) 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()
|
T |
getProtoType()
The following prototype related operations do not bump the change count of the dictionary:
1.
|
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.
|
static java.util.List<java.lang.Integer> |
ordering(java.util.List<? extends DictionaryComponent> list) |
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)
Sorts the components in the given list by the property and sort order specified
|
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.
|
equals, exists, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getObjectPath, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getReferences, getRuleSet, getState, getWarnings, hashCode, isModified, validateequals, getClass, notify, notifyAll, toString, wait, wait, waitpublic static final java.lang.String SORT_ASCEND
public static final java.lang.String SORT_DECEND
public static final java.lang.String SORT
public T getProtoType()
public T getByName(java.lang.String name)
name - name of componentpublic T getByID(DOID id)
id - ID of componentpublic T getByAlias(java.lang.String alias, boolean translate)
alias - alias of componenttranslate - flagpublic T getByAlias(java.lang.String alias)
alias - alias of componentpublic T removeByID(DOID id) throws DeleteException
id - the id returned by DictionaryComponent.getId()DeleteException - if the component cannot be removed (e.g. a Java Method)public T removeByName(java.lang.String name) throws DeleteException
name - the name returned by DictionaryComponent.getName()DeleteExceptionpublic T removeByAlias(java.lang.String alias) throws DeleteException
alias - the alias returned by DictionaryComponent.getAlias()DeleteExceptionpublic void validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings, int modelChangeLowerBound, int ruleChangeLowerBound)
validate in class DictionaryObjecterrors - validation errorswarnings - validation warningsmodelChangeLowerBound - determines what needs to be re-validated based on changes to the dictionaryruleChangeLowerBound - 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.public void validate(java.util.List<SDKException> errors, java.util.List<SDKWarning> warnings)
DictionaryObjectvalidate in class DictionaryObjecterrors - a List of error exceptions to append to.warnings - a List of warning exceptions to append to.DictionaryObject.validate(List,List,int,int)public int size()
size in interface java.util.Collection<T extends DictionaryComponent>size in interface java.util.List<T extends DictionaryComponent>public boolean isEmpty()
isEmpty in interface java.util.Collection<T extends DictionaryComponent>isEmpty in interface java.util.List<T extends DictionaryComponent>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<T extends DictionaryComponent>contains in interface java.util.List<T extends DictionaryComponent>public java.util.List<DOID> getAEReferences()
DictionaryObjectgetAEReferences in class DictionaryObjectpublic java.util.List<DOID> getAllReferences()
DictionaryObjectgetAllReferences in class DictionaryObjectpublic java.util.Iterator<T> iterator()
iterator in interface java.lang.Iterable<T extends DictionaryComponent>iterator in interface java.util.Collection<T extends DictionaryComponent>iterator in interface java.util.List<T extends DictionaryComponent>public java.util.ListIterator<T> listIterator()
listIterator in interface java.util.List<T extends DictionaryComponent>public java.util.ListIterator<T> listIterator(int index)
listIterator in interface java.util.List<T extends DictionaryComponent>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<T extends DictionaryComponent>toArray in interface java.util.List<T extends DictionaryComponent>public <U> U[] toArray(U[] a)
toArray in interface java.util.Collection<T extends DictionaryComponent>toArray in interface java.util.List<T extends DictionaryComponent>public boolean add(T o)
add in interface java.util.Collection<T extends DictionaryComponent>add in interface java.util.List<T extends DictionaryComponent>o - component to be added, must be of correct type for table.public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<T extends DictionaryComponent>containsAll in interface java.util.List<T extends DictionaryComponent>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<T extends DictionaryComponent>removeAll in interface java.util.List<T extends DictionaryComponent>public void clear()
clear in interface java.util.Collection<T extends DictionaryComponent>clear in interface java.util.List<T extends DictionaryComponent>public T get(int index)
get in interface java.util.List<T extends DictionaryComponent>public T set(int index, T element)
set in interface java.util.List<T extends DictionaryComponent>index - at which to replace the new row.element - to replace existing, must be of correct type for table.public T remove(int index)
remove in interface java.util.List<T extends DictionaryComponent>index - the index of the RuleCompoonent in the table.public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<T extends DictionaryComponent>remove in interface java.util.List<T extends DictionaryComponent>public void move(int fromIndex,
int toIndex,
boolean replace)
fromIndex - the index of the row to movetoIndex - move row to this locationreplace - if true, replace existing row at toIndex, if false move existing row to next higher indexpublic T move(int index, boolean up)
index - up - booleanpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.List<T extends DictionaryComponent>public java.util.List<T> subList(int fromIndex, int toIndex)
subList in interface java.util.List<T extends DictionaryComponent>java.lang.UnsupportedOperationExceptionpublic T add()
java.lang.UnsupportedOperationException - if table is locked.public abstract T add(int index)
public void cut(T dc)
DictionaryComponentTable.paste(T) to paste
the component into this or a different tabledc - public T paste(T dc)
dc - the component to paste into the tablepublic void reorder(java.util.List<java.lang.Integer> ordering)
ordering - a list of indexes the same size as this list.public static java.util.List<java.lang.Integer> ordering(java.util.List<? extends DictionaryComponent> list)
public T getLast()
public void mark(int[] index)
index - an Array containing row numbers (not ID's) to be removedpublic void unMark()
public DictionaryComponent[] getMarked()
public int removeMarked()
throws DeleteException
DeleteExceptionDictionaryComponentTable.mark(int[])public void sort(java.lang.String prop)
public void sort(java.lang.String prop,
boolean ascending)
public static void sort(java.util.List<? extends DictionaryComponent> list, java.lang.String prop, boolean ascending)
list - Collection of components to be sortedprop - Property value to be sorted byascending - true if ascending sort order, false if descending sort orderpublic java.util.List<T> filter(java.lang.String filterPattern, boolean translate)
filterPattern - pattern for filteringtranslate - boolean value to indicate if the translated value should be used for filteringpublic boolean isLocked()