|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.LinkIndexManager
public class LinkIndexManager
This class manages the Custom Type link index. It is intended to return a Set of Data targeted by a given Data that has a pointer on each of these Data. Since JCMS-3.1, these reverse links are managed at 'field-level'. That is, referencing data can be request for a given field (e.g. get all the data referrencing the given data with field 'myLink').
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
Field Summary | |
---|---|
static String |
ALL_FIELD_KEY
|
static String |
REVISION
|
Constructor Summary | |
---|---|
LinkIndexManager()
|
Method Summary | ||
---|---|---|
void |
checkLinkIndex()
Check that "all" field entries are consistent with the other fields. |
|
TreeMap<Data,Map<Class<?>,Map<String,TreeSet<Data>>>> |
getIndex()
|
|
|
getIndexedDataSet(Data data,
Class<T> clazz)
Returns the Set of clazz instances referring this data (whatever the field they used for this reference) |
|
|
getIndexedDataSet(Data data,
Class<T> clazz,
String field)
Returns the Set of clazz instances referring this data with the given field. |
|
int |
getLinkCount(Data data)
|
|
void |
printLinkIndex(PrintWriter pw)
Print an XML view of the index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String ALL_FIELD_KEY
Constructor Detail |
---|
public LinkIndexManager()
Method Detail |
---|
public TreeMap<Data,Map<Class<?>,Map<String,TreeSet<Data>>>> getIndex()
public <T> TreeSet<T> getIndexedDataSet(Data data, Class<T> clazz)
T
- any object type (usually something extending Data)data
- the dataclazz
- the class to search the referring instances
public <T> TreeSet<T> getIndexedDataSet(Data data, Class<T> clazz, 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 reference
public int getLinkCount(Data data)
public void checkLinkIndex()
public void printLinkIndex(PrintWriter pw)
pw
- the printWriter where the XML view must be printed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |