ome.logic
Class PojosImpl

java.lang.Object
  extended by ome.logic.AbstractLevel2Service
      extended by ome.logic.PojosImpl
All Implemented Interfaces:
IContainer, ServiceInterface, SelfConfigurableService

@Transactional
public class PojosImpl
extends AbstractLevel2Service
implements IContainer

implementation of the Pojos service interface.

Since:
OMERO 2.0
Version:
1.0 (Internal version: $Rev$ $Date: 2007-10-03 13:25:20 +0100 (Wed, 03 Oct 2007) $)
Author:
Josh Moore, josh.moore@gmx.de

Field Summary
 
Fields inherited from class ome.logic.AbstractLevel2Service
iQuery, iUpdate, metadata, queryFactory, sec
 
Constructor Summary
PojosImpl()
           
 
Method Summary
protected  void checkProperty(String type, String property)
           
protected  void checkType(String type)
           
 ome.model.IObject createDataObject(ome.model.IObject arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 ome.model.IObject[] createDataObjects(ome.model.IObject[] arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 void deleteDataObject(ome.model.IObject row, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 void deleteDataObjects(ome.model.IObject[] rows, ome.parameters.Parameters options)
          Implemented as specified by the IContainer I/F
 Set findContainerHierarchies(Class rootNodeType, Set imageIds, ome.parameters.Parameters options)
          Implemented as speficied by the IContainer I/F
 Map getCollectionCount(String type, String property, Set ids, ome.parameters.Parameters options)
          Implemented as specified by the IContainer I/F
 Set getImages(Class rootNodeType, Set rootNodeIds, ome.parameters.Parameters options)
          Implemented as specified by the IContainer I/F
 Set getImagesByOptions(ome.parameters.Parameters options)
          Implemented as specified by the IContainer I/F
 Class<? extends ServiceInterface> getServiceInterface()
          Returns the Interface implemented by this class.
 Set getUserImages(ome.parameters.Parameters options)
          Implemented as specified by the IContainer I/F
 ome.model.ILink[] link(ome.model.ILink[] arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 Set loadContainerHierarchy(Class rootNodeType, Set rootNodeIds, ome.parameters.Parameters options)
          Implemented as speficied by the IContainer I/F
 Collection retrieveCollection(ome.model.IObject arg0, String arg1, ome.parameters.Parameters arg2)
          Implemented as specified by the IContainer I/F
 void unlink(ome.model.ILink[] arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 ome.model.IObject updateDataObject(ome.model.IObject arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 ome.model.IObject[] updateDataObjects(ome.model.IObject[] arg0, ome.parameters.Parameters arg1)
          Implemented as specified by the IContainer I/F
 
Methods inherited from class ome.logic.AbstractLevel2Service
getBeanHelper, getExtendedMetadata, getQueryFactory, getSecuritySystem, selfConfigure, setExtendedMetadata, setQueryFactory, setQueryService, setSecuritySystem, setUpdateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PojosImpl

public PojosImpl()
Method Detail

getServiceInterface

public final Class<? extends ServiceInterface> getServiceInterface()
Returns the Interface implemented by this class.

Specified by:
getServiceInterface in interface SelfConfigurableService
Returns:
See above.

loadContainerHierarchy

@Transactional(readOnly=true)
public Set loadContainerHierarchy(Class rootNodeType,
                                                Set rootNodeIds,
                                                ome.parameters.Parameters options)
Implemented as speficied by the IContainer I/F

Specified by:
loadContainerHierarchy in interface IContainer
Parameters:
rootNodeType - The type of the root node. Can be Project, Dataset or Screen. Cannot be null.
rootNodeIds - The ids of the root nodes. Can be null if an Experimenter is specified in options, otherwise an Exception is thrown to prevent all images in the entire database from being downloaded.
options - Parameters as above. annotator, leaves, orphan, acquisition data used. acquisition data is only relevant for images and taken into account if the images are loaded. If rootNodeIds==null, experimenter|group must be set and filtering will be applied at the Class-level; e.g. to retrieve a user's Projects, or user's Datasets. If rootNodeIds!=null, the result will be filtered by the experimenter|group at the Image and intermediate levels if available. Due to the amount of data potentially linked a Screen/Plate, the leaves option is not taken into account. when the root node is a Screen. orphan implies that objects which are not contained in an object of rootNodeType should also be returned.
Returns:
a set of hierarchy trees. The requested node as root and all of its descendants. The type of the returned value will be rootNodeType, unless orphan is specified in which case objects of type rootNodeType and below may be returned.
See Also:
IContainer.loadContainerHierarchy(Class, Set, Parameters)

findContainerHierarchies

@Transactional(readOnly=true)
public Set findContainerHierarchies(Class rootNodeType,
                                                  Set imageIds,
                                                  ome.parameters.Parameters options)
Implemented as speficied by the IContainer I/F

Specified by:
findContainerHierarchies in interface IContainer
Parameters:
rootNodeType - top-most type which will be searched for Can be Project. Not null.
imageIds - Contains the ids of the Images that sit at the bottom of the trees. Not null.
options - Parameters as above. annotator used. experimenter|group may be applied at the top-level only or at each level in the hierarchy, but will not apply to the leaf (Image) level.
Returns:
A Set with all root nodes that were found.
See Also:
IContainer.findContainerHierarchies(Class, Set, Parameters)

getImages

@Transactional(readOnly=true)
public Set getImages(Class rootNodeType,
                                   Set rootNodeIds,
                                   ome.parameters.Parameters options)
Implemented as specified by the IContainer I/F

Specified by:
getImages in interface IContainer
Parameters:
rootNodeType - A Class which will have its hierarchy searched for Images. Not null. TODO types?
rootNodeIds - A set of ids of type rootNodeType Not null.
options - Parameters as above. No notion of leaves. experimenter|group apply at the Image level. OPTIONS: - startTime and/or endTime should be Timestamp.valueOf("YYYY-MM-DD hh:mm:ss.ms");

limit and offset are applied at the Image-level. That is, calling with Dataset.class, limit == 10 and offset == 0 will first perform one query to get an effective set of rootNodeIds, then getImages will be called with an effective rootNodeType of Image.class and the new ids.

. acquisition data is only relevant for images.
Returns:
A set of images.
See Also:
IContainer#getImages(Class, Set, Map)

getImagesByOptions

@Transactional(readOnly=true)
public Set getImagesByOptions(ome.parameters.Parameters options)
Implemented as specified by the IContainer I/F

Specified by:
getImagesByOptions in interface IContainer
Parameters:
options - Parameters as above. No notion of leaves. experimenter|group apply at the Image level and must be present. OPTIONS: - startTime and/or endTime should be Timestamp.valueOf("YYYY-MM-DD hh:mm:ss.ms"). acquisition data is only relevant for images.
Returns:
A set of images.
See Also:
IContainer.getImagesByOptions(Parameters)

getUserImages

@Transactional(readOnly=true)
public Set getUserImages(ome.parameters.Parameters options)
Implemented as specified by the IContainer I/F

Specified by:
getUserImages in interface IContainer
Parameters:
options - Parameters as above. No notion of leaves. experimenter|group apply at the Image level and must be present.
Returns:
A set of images.
See Also:
IContainer.getUserImages(Parameters)

getCollectionCount

@Transactional(readOnly=true)
public Map getCollectionCount(String type,
                                            String property,
                                            Set ids,
                                            ome.parameters.Parameters options)
Implemented as specified by the IContainer I/F

Specified by:
getCollectionCount in interface IContainer
Parameters:
type - The fully-qualified classname of the object to be tested
property - Name of the property on that class, omitting getters and setters.
ids - Set of Longs, the ids of the objects to test
options - Parameters. Unused.
Returns:
A map from id integer to count integer
See Also:
IContainer.getCollectionCount(String, String, Set, Parameters)

retrieveCollection

@Transactional(readOnly=true)
public Collection retrieveCollection(ome.model.IObject arg0,
                                                   String arg1,
                                                   ome.parameters.Parameters arg2)
Implemented as specified by the IContainer I/F

Specified by:
retrieveCollection in interface IContainer
Parameters:
arg0 - Can be "unloaded".
arg1 - public final static String from the IObject.class
arg2 - Parameters. Unused.
Returns:
An initialized collection.
See Also:
IContainer.retrieveCollection(IObject, String, Parameters)

createDataObject

@Transactional(readOnly=false)
public ome.model.IObject createDataObject(ome.model.IObject arg0,
                                                        ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
createDataObject in interface IContainer
Parameters:
arg0 - IObject. Supported: Project, Dataset, Annotation, Group, Experimenter. Not null.
Returns:
the created object
See Also:
IContainer.createDataObject(IObject, Parameters)

createDataObjects

@Transactional(readOnly=false)
public ome.model.IObject[] createDataObjects(ome.model.IObject[] arg0,
                                                           ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
createDataObjects in interface IContainer
Parameters:
arg0 - Array of Omero IObjects
arg1 - Parameters as above.
See Also:
IContainer#createDataObject(IObject[], Parameters)

unlink

@Transactional(readOnly=false)
public void unlink(ome.model.ILink[] arg0,
                                 ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
unlink in interface IContainer
arg1 - Parameters as above.
See Also:
IContainer.unlink(ILink[], Parameters)

link

@Transactional(readOnly=false)
public ome.model.ILink[] link(ome.model.ILink[] arg0,
                                            ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
link in interface IContainer
Parameters:
arg0 - Array of links to be created.
arg1 - Parameters as above.
Returns:
the created links
See Also:
IContainer.link(ILink[], Parameters)

updateDataObject

@Transactional(readOnly=false)
public ome.model.IObject updateDataObject(ome.model.IObject arg0,
                                                        ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
updateDataObject in interface IContainer
Parameters:
arg0 - Pojos-based IObject. Supported: supported: Project, Dataset, Annotation, Group, Experimenter.
arg1 - Parameters as above.
Returns:
created data object
See Also:
IContainer.updateDataObject(IObject, Parameters)

updateDataObjects

@Transactional(readOnly=false)
public ome.model.IObject[] updateDataObjects(ome.model.IObject[] arg0,
                                                           ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
updateDataObjects in interface IContainer
arg1 - Parameters as above.
Returns:
created data objects.
See Also:
IContainer#updateDataObject(IObject[], Parameters)

deleteDataObject

@Transactional(readOnly=false)
public void deleteDataObject(ome.model.IObject row,
                                           ome.parameters.Parameters arg1)
Implemented as specified by the IContainer I/F

Specified by:
deleteDataObject in interface IContainer
See Also:
IContainer.deleteDataObject(IObject, Parameters)

deleteDataObjects

@Transactional(readOnly=false)
public void deleteDataObjects(ome.model.IObject[] rows,
                                            ome.parameters.Parameters options)
Implemented as specified by the IContainer I/F

Specified by:
deleteDataObjects in interface IContainer
options - Parameters as above.
See Also:
IContainer.deleteDataObjects(IObject[], Parameters)

checkType

protected void checkType(String type)

checkProperty

protected void checkProperty(String type,
                             String property)


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

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