ome.formats.enums
Class IQueryEnumProvider

java.lang.Object
  extended by ome.formats.enums.IQueryEnumProvider
All Implemented Interfaces:
EnumerationProvider

public class IQueryEnumProvider
extends Object
implements EnumerationProvider

An enumeration provider which uses IQuery and a cache to fulfill the contract of an EnumerationProvider.

Author:
Chris Allan

Constructor Summary
IQueryEnumProvider(omero.api.IQueryPrx iQuery)
          Default IQuery based enumeration provider constructor.
 
Method Summary
<T extends omero.model.IObject>
T
getEnumeration(Class<T> klass, String value, boolean loaded)
          Retrieves an enumeration.
<T extends omero.model.IObject>
HashMap<String,T>
getEnumerations(Class<T> klass)
          Retrieves all enumerations of a specific type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IQueryEnumProvider

public IQueryEnumProvider(omero.api.IQueryPrx iQuery)
Default IQuery based enumeration provider constructor.

Parameters:
iQuery - OMERO query service to use for enumeration lookups.
Method Detail

getEnumeration

public <T extends omero.model.IObject> T getEnumeration(Class<T> klass,
                                                        String value,
                                                        boolean loaded)
Description copied from interface: EnumerationProvider
Retrieves an enumeration.

Specified by:
getEnumeration in interface EnumerationProvider
Parameters:
klass - Enumeration's base class from ome.model.enums.
value - Enumeration's string value.
loaded - true if the enumeration returned should be loaded, otherwise false.
Returns:
Enumeration object.

getEnumerations

public <T extends omero.model.IObject> HashMap<String,T> getEnumerations(Class<T> klass)
Description copied from interface: EnumerationProvider
Retrieves all enumerations of a specific type.

Specified by:
getEnumerations in interface EnumerationProvider
Parameters:
klass - Enumeration's base class from ome.model.enums.
Returns:
Enumeration object.


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.