public class LinkIndexManager
extends java.lang.Object
TreeMap Key: The data which is referenced by Value: HashMap: (classMap) Key: Class (the class referencing the data) Value: (fieldMap) HashMap: Key: String (the name of the field referencing the data) Value: TreeSet containing all the referencing data
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALL_FIELD_KEY |
static java.lang.String |
REVISION |
Constructor and Description |
---|
LinkIndexManager() |
Modifier and Type | Method and Description |
---|---|
void |
checkLinkIndex()
Check that "all" field entries are consistent with the other fields.
|
java.util.TreeMap<Data,java.util.Map<java.lang.Class<?>,java.util.Map<java.lang.String,java.util.TreeSet<Data>>>> |
getIndex() |
<T> java.util.TreeSet<T> |
getIndexedDataSet(Data data,
java.lang.Class<T> clazz)
Returns the Set of clazz instances referring this data (whatever
the field they used for this reference)
|
<T> java.util.TreeSet<T> |
getIndexedDataSet(Data data,
java.lang.Class<T> clazz,
java.lang.String field)
Returns the Set of clazz instances referring this data with the given field.
|
int |
getLinkCount(Data data) |
void |
printLinkIndex(java.io.PrintWriter pw)
Print an XML view of the index.
|
public static final java.lang.String REVISION
public static final java.lang.String ALL_FIELD_KEY
public java.util.TreeMap<Data,java.util.Map<java.lang.Class<?>,java.util.Map<java.lang.String,java.util.TreeSet<Data>>>> getIndex()
public <T> java.util.TreeSet<T> getIndexedDataSet(Data data, java.lang.Class<T> clazz)
T
- any object type (usually something extending Data)data
- the dataclazz
- the class to search the referring instancespublic <T> java.util.TreeSet<T> getIndexedDataSet(Data data, java.lang.Class<T> clazz, java.lang.String field)
T
- any object type (usually something extending Data)data
- the dataclazz
- the class to search the referring instancesfield
- the name of the field which contains the referencepublic int getLinkCount(Data data)
public void checkLinkIndex()
public void printLinkIndex(java.io.PrintWriter pw)
pw
- the printWriter where the XML view must be printed.Copyright © 2001-2010 Jalios SA. All Rights Reserved.