public abstract class HierarchyNavigatorWrap<T,E> extends HierarchyNavigator
HierarchyNavigator
with different model object representations.iQuery
Constructor and Description |
---|
HierarchyNavigatorWrap(IQuery iQuery) |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<E> |
doLookup(T toType,
E from)
Look up which objects of a given type relate to the given query object.
|
protected abstract Map.Entry<String,Long> |
entityToStringLong(E entity)
Convert a model object to the type string and database ID expected by
HierarchyNavigator . |
void |
prepareLookups(T toType,
Collection<E> from)
Batch bulk database queries to prime the cache for
doLookup(Object, Object) . |
protected abstract E |
stringLongToEntity(String typeName,
long id)
Convert the given type string and database ID to the model object.
|
protected abstract T |
stringToType(String typeName)
Convert the given type string to the object type.
|
protected abstract String |
typeToString(T type)
Convert the given object type to the type strings expected by
HierarchyNavigator . |
doLookup, prepareLookups
public HierarchyNavigatorWrap(IQuery iQuery)
protected abstract String typeToString(T type)
HierarchyNavigator
.type
- an object typeprotected abstract T stringToType(String typeName)
typeName
- a type stringprotected abstract Map.Entry<String,Long> entityToStringLong(E entity)
HierarchyNavigator
.entity
- a model objectprotected abstract E stringLongToEntity(String typeName, long id)
typeName
- a type stringid
- a database IDpublic void prepareLookups(T toType, Collection<E> from)
doLookup(Object, Object)
.
It is not necessary to call this method, but it is advised if many lookups are anticipated.
Wraps HierarchyNavigator.prepareLookups(String, String, Collection)
.toType
- the type of the objects to which the query objects may be related, not null
from
- the query objects, none null
, may be of differing typespublic com.google.common.collect.ImmutableSet<E> doLookup(T toType, E from)
prepareLookups(Object, Collection)
.
Wraps HierarchyNavigator.doLookup(String, String, Long)
.toType
- the type of the objects to which the query object may be related, not null
from
- the query object, not null
null
Version: 5.1.4-ice35-b55
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.