pojos
Class DataObject

java.lang.Object
  extended by pojos.DataObject
Direct Known Subclasses:
AnnotationData, ChannelAcquisitionData, ChannelData, DatasetData, DetectorData, DichroicData, ExperimenterData, FileData, FilterData, FilterSetData, GroupData, ImageAcquisitionData, ImageData, InstrumentData, LightPathData, LightSourceData, ObjectiveData, OTFData, PixelsData, PlateAcquisitionData, PlateData, ProjectData, ROIData, ScreenData, ShapeData, ShapeSettingsData, WellData, WellSampleData, WorkflowData

public abstract class DataObject
extends Object

Abstract superclass for objects that hold OMEDS data. Delegates getters and setters to IObject instances. Modifications are propagated. Not thread-safe.

Since:
OME2.2
Version:
2.2 (Internal version: $Revision$ $Date$)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk,
Andrea Falconi      a.falconi@dundee.ac.uk,
Josh Moore      josh.moore@gmx.de

Constructor Summary
DataObject()
           
 
Method Summary
 omero.model.Annotation asAnnotation()
          Returns the hosted IObject as an Annotation.
 omero.model.Channel asChannel()
          Returns the hosted IObject as a Well.
 omero.model.Dataset asDataset()
          Returns the hosted IObject as a Dataset.
 omero.model.Experimenter asExperimenter()
          Returns the hosted IObject as an Experimenter.
 omero.model.ExperimenterGroup asGroup()
          Returns the hosted IObject as an Experimenter Group.
 ome.model.IAnnotated asIAnnotated()
          not null; may through class-cast exception
 omero.model.Image asImage()
          Returns the hosted IObject as an Image.
 omero.model.IObject asIObject()
          not null; no exceptions.
 omero.model.Pixels asPixels()
          Returns the hosted IObject as a Pixels.
 omero.model.Plate asPlate()
          Returns the hosted IObject as a Plate.
static DataObject asPojo(omero.model.IObject obj)
          Converts the passed IObject into its corresponding Pojo object.
static Set asPojos(Collection iObjects)
          Converts the collection of IObjects into the corresponding DataObjects
static Map asPojos(Map iObjects)
          Converts the map of IObjects into the corresponding DataObjects
 omero.model.Project asProject()
          Returns the hosted IObject as a Project.
 omero.model.Screen asScreen()
          Returns the hosted IObject as a Screen.
 omero.model.Well asWell()
          Returns the hosted IObject as a Well.
 omero.model.WellSample asWellSample()
          Returns the hosted IObject as a Well.
 Timestamp getCreated()
          Returns the creation time of the object.
protected  omero.model.Details getDetails()
          Returns the details of the object.
 long getId()
          Returns the database id of the IObject or -1 if null
 ExperimenterData getOwner()
          Returns the owner of the object.
 PermissionData getPermissions()
          Returns the permission of the object.
 Timestamp getUpdated()
          Returns the updated time of the object.
protected  int getVersion()
          Returns the version of the object if the object is immutable, false otherwise.
 boolean isDirty()
          Returns true if setter value has modified the value of the stored IObject, false otherwise.
 boolean isLoaded()
          Returns true if the object is loaded, false otherwise.
protected  boolean nullDetails()
          Returns true if the details are null otherwise false otherwise.
protected  double nullSafe(Double d)
           
protected  float nullSafe(Float f)
           
protected  int nullSafe(Integer i)
           
protected  long nullSafe(Long l)
           
protected  double nullSafe(omero.RDouble d)
           
protected  float nullSafe(omero.RFloat f)
           
protected  int nullSafe(omero.RInt i)
           
protected  void setDirty(boolean dirty)
          Sets to true if the value has been modified, otherwise.
 void setId(long id)
          Sets the database id.
protected  void setValue(omero.model.IObject value)
          Sets the IObject.
protected  void setVersion(int version)
          Sets the version of the object if it is immutable.
protected  Timestamp timeOfEvent(omero.model.Event event)
           
 String toString()
          Overridden to return the name of the class and the object id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataObject

public DataObject()
Method Detail

asPojos

public static Set asPojos(Collection iObjects)
Converts the collection of IObjects into the corresponding DataObjects

Parameters:
iObjects - The map to handle.
Returns:
See above.

asPojos

public static Map asPojos(Map iObjects)
Converts the map of IObjects into the corresponding DataObjects

Parameters:
iObjects - The map to handle.
Returns:
See above.

asPojo

public static DataObject asPojo(omero.model.IObject obj)
Converts the passed IObject into its corresponding Pojo object.

Parameters:
obj - The object to convert.
Returns:
See above.

setValue

protected void setValue(omero.model.IObject value)
Sets the IObject.

Parameters:
value - The value to set.

isDirty

public boolean isDirty()
Returns true if setter value has modified the value of the stored IObject, false otherwise.

Returns:
See above.

setDirty

protected void setDirty(boolean dirty)
Sets to true if the value has been modified, otherwise.

Parameters:
dirty - The value to set.

getId

public long getId()
Returns the database id of the IObject or -1 if null

Returns:
See above.

setId

public void setId(long id)
Sets the database id.

Parameters:
id - The value to set.

getVersion

protected int getVersion()
Returns the version of the object if the object is immutable, false otherwise.

Returns:
See above.

setVersion

protected void setVersion(int version)
Sets the version of the object if it is immutable.

Parameters:
version - The value to set.

isLoaded

public boolean isLoaded()
Returns true if the object is loaded, false otherwise.

Returns:
See above.

getOwner

public ExperimenterData getOwner()
Returns the owner of the object.

Returns:
See above.

getPermissions

public PermissionData getPermissions()
Returns the permission of the object.

Returns:
See above.

toString

public String toString()
Overridden to return the name of the class and the object id.

Overrides:
toString in class Object
See Also:
Object.toString()

nullSafe

protected int nullSafe(Integer i)

nullSafe

protected int nullSafe(omero.RInt i)

nullSafe

protected long nullSafe(Long l)

nullSafe

protected double nullSafe(Double d)

nullSafe

protected float nullSafe(Float f)

nullSafe

protected float nullSafe(omero.RFloat f)

nullSafe

protected double nullSafe(omero.RDouble d)

timeOfEvent

protected Timestamp timeOfEvent(omero.model.Event event)

nullDetails

protected boolean nullDetails()
Returns true if the details are null otherwise false otherwise.

Returns:
See above.

getDetails

protected omero.model.Details getDetails()
Returns the details of the object.

Returns:
See above.

getCreated

public Timestamp getCreated()
Returns the creation time of the object.

Returns:
See above.

getUpdated

public Timestamp getUpdated()
Returns the updated time of the object.

Returns:
See above.

asIObject

public omero.model.IObject asIObject()
not null; no exceptions.

Returns:
not null IObject

asIAnnotated

public ome.model.IAnnotated asIAnnotated()
not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asExperimenter

public omero.model.Experimenter asExperimenter()
Returns the hosted IObject as an Experimenter. Not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asGroup

public omero.model.ExperimenterGroup asGroup()
Returns the hosted IObject as an Experimenter Group. Not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asAnnotation

public omero.model.Annotation asAnnotation()
Returns the hosted IObject as an Annotation. Not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asImage

public omero.model.Image asImage()
Returns the hosted IObject as an Image. Not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asDataset

public omero.model.Dataset asDataset()
Returns the hosted IObject as a Dataset. Not null; may through class-cast exception

Returns:
not null IObject
Throws:
ClassCastException

asProject

public omero.model.Project asProject()
Returns the hosted IObject as a Project. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asPixels

public omero.model.Pixels asPixels()
Returns the hosted IObject as a Pixels. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asScreen

public omero.model.Screen asScreen()
Returns the hosted IObject as a Screen. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asPlate

public omero.model.Plate asPlate()
Returns the hosted IObject as a Plate. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asWell

public omero.model.Well asWell()
Returns the hosted IObject as a Well. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asWellSample

public omero.model.WellSample asWellSample()
Returns the hosted IObject as a Well. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException

asChannel

public omero.model.Channel asChannel()
Returns the hosted IObject as a Well. Not null; may through class-cast exception

Returns:
See above
Throws:
ClassCastException


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

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