@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Event extends java.lang.Object implements java.io.Serializable, IObject, IGlobal
Modifier and Type | Class and Description |
---|---|
static class |
Event.Details |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_dynamicFields |
protected boolean |
_loaded |
protected Event |
containingEvent |
static java.lang.String |
CONTAININGEVENT |
protected Details |
details |
static java.lang.String |
DETAILS |
protected Experimenter |
experimenter |
static java.lang.String |
EXPERIMENTER |
protected ExperimenterGroup |
experimenterGroup |
static java.lang.String |
EXPERIMENTERGROUP |
static java.util.Set<java.lang.String> |
FIELDS |
protected java.lang.Long |
id |
static java.lang.String |
ID |
protected java.util.Set<EventLog> |
logs |
static java.lang.String |
LOGS |
protected Session |
session |
static java.lang.String |
SESSION |
protected java.lang.String |
status |
static java.lang.String |
STATUS |
protected java.sql.Timestamp |
time |
static java.lang.String |
TIME |
protected EventType |
type |
static java.lang.String |
TYPE |
Modifier | Constructor and Description |
---|---|
|
Event() |
protected |
Event(java.lang.Long id) |
|
Event(java.lang.Long id,
boolean loaded)
Main constructor.
|
|
Event(java.sql.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(java.util.Collection<EventLog> targets)
use like addEventLog.
|
void |
clearLogs()
clears the set.
|
<E> java.util.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() |
java.util.Set<java.lang.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. |
java.lang.Long |
getId()
The DB unique identifier for this object.
|
protected java.util.Set<EventLog> |
getLogs()
returns logs .
|
Session |
getSession()
Many-to-one field ome.model.meta.Event.session (ome.model.meta.Session)
|
java.lang.String |
getStatus()
Simple field ome.model.meta.Event.status (java.lang.String)
|
java.sql.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() |
java.util.Iterator<EventLog> |
iterateLogs()
should be used rather than accessing the logs set directly.
|
Event |
newInstance() |
Event |
proxy() |
void |
putAt(java.lang.String field,
java.lang.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(java.util.Collection<EventLog> targets)
use like removeEventLog
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
void |
setContainingEvent(Event containingEvent) |
protected void |
setDetails(Details details) |
void |
setExperimenter(Experimenter experimenter) |
void |
setExperimenterGroup(ExperimenterGroup experimenterGroup) |
void |
setId(java.lang.Long id)
usually unneeded.
|
protected void |
setLogs(java.util.Set<EventLog> logs)
setter for logs should be avoided.
|
void |
setSession(Session session) |
void |
setStatus(java.lang.String status) |
void |
setTime(java.sql.Timestamp time) |
void |
setType(EventType type) |
int |
sizeOfLogs()
returns the size of logs.
|
protected void |
throwNullCollectionException(java.lang.String propertyName) |
java.lang.String |
toString() |
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
java.util.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 java.lang.String ID
protected java.lang.Long id
protected java.lang.String status
protected java.sql.Timestamp time
protected Experimenter experimenter
protected ExperimenterGroup experimenterGroup
protected EventType type
protected Event containingEvent
protected java.util.Set<EventLog> logs
protected Session session
protected Details details
public static final java.lang.String STATUS
public static final java.lang.String TIME
public static final java.lang.String EXPERIMENTER
public static final java.lang.String EXPERIMENTERGROUP
public static final java.lang.String TYPE
public static final java.lang.String CONTAININGEVENT
public static final java.lang.String LOGS
public static final java.lang.String SESSION
public static final java.lang.String DETAILS
public static final java.util.Set<java.lang.String> FIELDS
protected java.util.Map<java.lang.String,java.lang.Object> _dynamicFields
protected boolean _loaded
public Event()
protected Event(java.lang.Long id)
public Event(java.lang.Long id, boolean loaded)
public Event(java.sql.Timestamp _time, Experimenter _experimenter, ExperimenterGroup _experimenterGroup, EventType _type, Session _session)
@DocumentId public java.lang.Long getId()
public void setId(java.lang.Long id)
IObject
@Field(index=TOKENIZED) @Field(index=TOKENIZED,analyzer=@Analyzer(impl=ConfiguredAnalyzer.class),name="combined_fields") public java.lang.String getStatus()
public void setStatus(java.lang.String status)
@DateBridge(resolution=MINUTE) @Fields(value=@Field(index=UN_TOKENIZED)) public java.sql.Timestamp getTime()
public void setTime(java.sql.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 java.util.Set<EventLog> getLogs()
protected void setLogs(java.util.Set<EventLog> logs)
public int sizeOfLogs()
public java.util.Iterator<EventLog> iterateLogs()
EmptyIterator
. To test for a null collection,
see of sizeOfLogs()
is less than zero.public java.util.Collection<EventLog> unmodifiableLogs()
public <E> java.util.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(java.util.Collection<EventLog> targets)
public void removeEventLog(EventLog target)
public void removeEventLogSet(java.util.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)
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 java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<java.lang.String> fields()
IObject
public java.lang.Object retrieve(java.lang.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(java.lang.String field, java.lang.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(java.lang.String propertyName)