@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Event extends Object implements Serializable, IObject, IGlobal
Modifier and Type | Class and Description |
---|---|
static class |
Event.Details |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
_dynamicFields |
protected boolean |
_loaded |
protected Event |
containingEvent |
static String |
CONTAININGEVENT |
protected Details |
details |
static String |
DETAILS |
protected Experimenter |
experimenter |
static String |
EXPERIMENTER |
protected ExperimenterGroup |
experimenterGroup |
static String |
EXPERIMENTERGROUP |
static Set<String> |
FIELDS |
protected Long |
id |
static String |
ID |
protected Set<EventLog> |
logs |
static String |
LOGS |
protected Session |
session |
static String |
SESSION |
protected String |
status |
static String |
STATUS |
protected Timestamp |
time |
static String |
TIME |
protected EventType |
type |
static String |
TYPE |
Modifier | Constructor and Description |
---|---|
|
Event() |
protected |
Event(Long id) |
|
Event(Long id,
boolean loaded)
Main constructor.
|
|
Event(Timestamp _time,
Experimenter _experimenter,
ExperimenterGroup _experimenterGroup,
EventType _type,
Session _session) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addEventLog(EventLog target)
use instead of setLogs .
|
void |
addEventLogSet(Collection<EventLog> targets)
use like addEventLog.
|
void |
clearLogs()
clears the set.
|
<E> List<E> |
collectLogs(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.meta.EventLog while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Event |
getContainingEvent()
Many-to-one field ome.model.meta.Event.containingEvent (ome.model.meta.Event)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
Experimenter |
getExperimenter()
Many-to-one field ome.model.meta.Event.experimenter (ome.model.meta.Experimenter)
|
ExperimenterGroup |
getExperimenterGroup()
Many-to-one field ome.model.meta.Event.experimenterGroup (ome.model.meta.ExperimenterGroup)
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
Long |
getId()
The DB unique identifier for this object.
|
protected Set<EventLog> |
getLogs()
returns logs .
|
Session |
getSession()
Many-to-one field ome.model.meta.Event.session (ome.model.meta.Session)
|
String |
getStatus()
Simple field ome.model.meta.Event.status (java.lang.String)
|
Timestamp |
getTime()
Simple field ome.model.meta.Event.time (java.sql.Timestamp)
|
EventType |
getType()
Many-to-one field ome.model.meta.Event.type (ome.model.enums.EventType)
|
boolean |
isLoaded()
transient field (not stored in the DB) which specifies whether this
object has been loaded from the DB or is only a wrapper around the ID.
|
boolean |
isValid()
calls the class-specific validator for this instance and returns the
value from
Validation.isValid() |
Iterator<EventLog> |
iterateLogs()
should be used rather than accessing the logs set directly.
|
Event |
newInstance() |
Event |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeEventLog(EventLog target)
removes a single element from this set and makes the inverse call on ome.model.meta.EventLog
|
void |
removeEventLogSet(Collection<EventLog> targets)
use like removeEventLog
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
void |
setContainingEvent(Event containingEvent) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Event.Details instance instead. |
void |
setExperimenter(Experimenter experimenter) |
void |
setExperimenterGroup(ExperimenterGroup experimenterGroup) |
void |
setId(Long id)
usually unneeded.
|
protected void |
setLogs(Set<EventLog> logs)
setter for logs should be avoided.
|
void |
setSession(Session session) |
void |
setStatus(String status) |
void |
setTime(Timestamp time) |
void |
setType(EventType type) |
int |
sizeOfLogs()
returns the size of logs.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<EventLog> |
unmodifiableLogs()
Returns an unmodifiable collection-view
|
Validation |
validate()
calls the class-specific validator for this instance and returns the
Validation object. |
public static final String ID
protected Long id
protected String status
protected Timestamp time
protected Experimenter experimenter
protected ExperimenterGroup experimenterGroup
protected EventType type
protected Event containingEvent
protected Session session
protected Details details
public static final String STATUS
public static final String TIME
public static final String EXPERIMENTER
public static final String EXPERIMENTERGROUP
public static final String TYPE
public static final String CONTAININGEVENT
public static final String LOGS
public static final String SESSION
public static final String DETAILS
protected boolean _loaded
public Event()
protected Event(Long id)
public Event(Long id, boolean loaded)
public Event(Timestamp _time, Experimenter _experimenter, ExperimenterGroup _experimenterGroup, EventType _type, Session _session)
@DocumentId public Long getId()
public void setId(Long id)
IObject
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getStatus()
public void setStatus(String status)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getTime()
public void setTime(Timestamp time)
public Experimenter getExperimenter()
public void setExperimenter(Experimenter experimenter)
public ExperimenterGroup getExperimenterGroup()
public void setExperimenterGroup(ExperimenterGroup experimenterGroup)
public EventType getType()
public void setType(EventType type)
public Event getContainingEvent()
public void setContainingEvent(Event containingEvent)
protected Set<EventLog> getLogs()
protected void setLogs(Set<EventLog> logs)
public int sizeOfLogs()
public Iterator<EventLog> iterateLogs()
EmptyIterator
. To test for a null collection,
see of sizeOfLogs()
is less than zero.public Collection<EventLog> unmodifiableLogs()
public <E> List<E> collectLogs(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateLogs()
internally and so will return a value
even if the underlying collection is null.public void addEventLog(EventLog target)
public void addEventLogSet(Collection<EventLog> targets)
public void removeEventLog(EventLog target)
public void removeEventLogSet(Collection<EventLog> targets)
public void clearLogs()
public Session getSession()
public void setSession(Session session)
public Details getDetails()
Details
type.getDetails
in interface IObject
protected void setDetails(Details details)
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Event.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Event newInstance()
public Event proxy()
public boolean acceptFilter(Filter __filter)
acceptFilter
in interface Filterable
public Set<String> fields()
IObject
public Object retrieve(String field)
IObject
field
which match a field of this instance will be delegated to the accessors.
Otherwise, values will be retrieved from a lazy-loaded map filled by
calls to IObject.putAt(String, Object)
public void putAt(String field, Object value)
IObject
field
which
match a field of this instance will be delegated to the accessors.
Otherwise, values will be stored in a lazy-loaded map.public boolean isLoaded()
IObject
protected void errorIfUnloaded()
public void unload()
IObject
public final GraphHolder getGraphHolder()
IObject
GraphHolder
for this entity. If the GraphHolder has
not been actively set, a new one will be instatiated.getGraphHolder
in interface IObject
protected void throwNullCollectionException(String propertyName)
Version: 5.2.4-ice35-b23
Copyright © 2016 The University of Dundee & Open Microscopy Environment. All Rights Reserved.