@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Session extends java.lang.Object implements java.io.Serializable, IObject, IGlobal, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Session.Details |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_dynamicFields |
protected boolean |
_loaded |
protected java.util.Set<SessionAnnotationLink> |
annotationLinks |
static java.lang.String |
ANNOTATIONLINKS |
static java.lang.String |
ANNOTATIONLINKSCOUNTPEROWNER |
protected java.sql.Timestamp |
closed |
static java.lang.String |
CLOSED |
protected java.lang.String |
defaultEventType |
static java.lang.String |
DEFAULTEVENTTYPE |
protected Details |
details |
static java.lang.String |
DETAILS |
static java.lang.String |
EVENT_FILTER_ANNOTATIONLINKS |
protected java.util.Set<Event> |
events |
static java.lang.String |
EVENTS |
static java.util.Set<java.lang.String> |
FIELDS |
static java.lang.String |
GROUP_FILTER_ANNOTATIONLINKS |
protected java.lang.Long |
id |
static java.lang.String |
ID |
protected java.lang.String |
message |
static java.lang.String |
MESSAGE |
protected Node |
node |
static java.lang.String |
NODE |
protected Experimenter |
owner |
static java.lang.String |
OWNER |
static java.lang.String |
OWNER_FILTER_ANNOTATIONLINKS |
static java.lang.String |
PERMS_FILTER_ANNOTATIONLINKS |
protected java.sql.Timestamp |
started |
static java.lang.String |
STARTED |
protected Experimenter |
sudoer |
static java.lang.String |
SUDOER |
protected java.lang.Long |
timeToIdle |
static java.lang.String |
TIMETOIDLE |
protected java.lang.Long |
timeToLive |
static java.lang.String |
TIMETOLIVE |
protected java.lang.String |
userAgent |
static java.lang.String |
USERAGENT |
protected java.lang.String |
userIP |
static java.lang.String |
USERIP |
protected java.lang.String |
uuid |
static java.lang.String |
UUID |
protected java.lang.Integer |
version |
static java.lang.String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Session() |
protected |
Session(java.lang.Long id) |
|
Session(java.lang.Long id,
boolean loaded)
Main constructor.
|
|
Session(Node _node,
java.lang.String _uuid,
Experimenter _owner,
java.lang.Long _timeToIdle,
java.lang.Long _timeToLive,
java.sql.Timestamp _started,
java.lang.String _defaultEventType) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addEvent(Event target)
use instead of setEvents .
|
void |
addEventSet(java.util.Collection<Event> targets)
use like addEvent.
|
void |
addSessionAnnotationLink(SessionAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addSessionAnnotationLink(SessionAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.SessionAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addSessionAnnotationLink will be called on the addition if it is loaded
|
void |
addSessionAnnotationLinkSet(java.util.Collection<SessionAnnotationLink> targets)
use like addSessionAnnotationLink.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearEvents()
clears the set.
|
<E> java.util.List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.SessionAnnotationLink while
collecting the results.
|
<E> java.util.List<E> |
collectEvents(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.meta.Event while
collecting the results.
|
<E> java.util.List<E> |
eachLinkedAnnotation(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.Annotation 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
|
java.util.Set<SessionAnnotationLink> |
findSessionAnnotationLink(Annotation target)
find all ome.model.annotations.SessionAnnotationLink which have the argument as their child.
|
protected java.util.Set<SessionAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.SessionAnnotationLink that a user has.
|
java.sql.Timestamp |
getClosed()
Simple field ome.model.meta.Session.closed (java.sql.Timestamp)
|
java.lang.String |
getDefaultEventType()
Simple field ome.model.meta.Session.defaultEventType (java.lang.String)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
protected java.util.Set<Event> |
getEvents()
returns events .
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
java.lang.Long |
getId()
The DB unique identifier for this object.
|
java.lang.String |
getMessage()
Simple field ome.model.meta.Session.message (java.lang.String)
|
Node |
getNode()
Many-to-one field ome.model.meta.Session.node (ome.model.meta.Node)
|
Experimenter |
getOwner()
Many-to-one field ome.model.meta.Session.owner (ome.model.meta.Experimenter)
|
java.sql.Timestamp |
getStarted()
Simple field ome.model.meta.Session.started (java.sql.Timestamp)
|
Experimenter |
getSudoer()
Many-to-one field ome.model.meta.Session.sudoer (ome.model.meta.Experimenter)
|
java.lang.Long |
getTimeToIdle()
Simple field ome.model.meta.Session.timeToIdle (java.lang.Long)
|
java.lang.Long |
getTimeToLive()
Simple field ome.model.meta.Session.timeToLive (java.lang.Long)
|
java.lang.String |
getUserAgent()
Simple field ome.model.meta.Session.userAgent (java.lang.String)
|
java.lang.String |
getUserIP()
Simple field ome.model.meta.Session.userIP (java.lang.String)
|
java.lang.String |
getUuid()
Simple field ome.model.meta.Session.uuid (java.lang.String)
|
java.lang.Integer |
getVersion()
This version number is controlled by the database for optimisitic
locking.
|
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<SessionAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
java.util.Iterator<Event> |
iterateEvents()
should be used rather than accessing the events set directly.
|
SessionAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.SessionAnnotationLink to annotationLinks .
|
java.util.Iterator<Annotation> |
linkedAnnotationIterator()
provides an iterator over the parent values of the annotationLinks.
|
java.util.List<Annotation> |
linkedAnnotationList()
produces a
List -copy of the underlying collection. |
Session |
newInstance() |
Session |
proxy() |
void |
putAt(java.lang.String field,
java.lang.Object value)
stores a value in this instance.
|
void |
removeEvent(Event target)
removes a single element from this set and makes the inverse call on ome.model.meta.Event
|
void |
removeEventSet(java.util.Collection<Event> targets)
use like removeEvent
|
void |
removeSessionAnnotationLink(SessionAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.SessionAnnotationLink
|
void |
removeSessionAnnotationLink(SessionAnnotationLink link,
boolean bothSides)
removes the given SessionAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkSession again if loaded.
|
void |
removeSessionAnnotationLinkSet(java.util.Collection<SessionAnnotationLink> targets)
use like removeSessionAnnotationLink
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(java.util.Set<SessionAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setClosed(java.sql.Timestamp closed) |
void |
setDefaultEventType(java.lang.String defaultEventType) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Session.Details instance instead. |
protected void |
setEvents(java.util.Set<Event> events)
setter for events should be avoided.
|
void |
setId(java.lang.Long id)
usually unneeded.
|
void |
setMessage(java.lang.String message) |
void |
setNode(Node node) |
void |
setOwner(Experimenter owner) |
void |
setStarted(java.sql.Timestamp started) |
void |
setSudoer(Experimenter sudoer) |
void |
setTimeToIdle(java.lang.Long timeToIdle) |
void |
setTimeToLive(java.lang.Long timeToLive) |
void |
setUserAgent(java.lang.String userAgent) |
void |
setUserIP(java.lang.String userIP) |
void |
setUuid(java.lang.String uuid) |
void |
setVersion(java.lang.Integer version)
use with caution.
|
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfEvents()
returns the size of events.
|
protected void |
throwNullCollectionException(java.lang.String propertyName) |
java.lang.String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
java.util.Collection<SessionAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
java.util.Collection<Event> |
unmodifiableEvents()
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
public static final java.lang.String VERSION
protected java.lang.Integer version
protected Node node
protected java.lang.String uuid
protected Experimenter owner
protected Experimenter sudoer
protected java.lang.Long timeToIdle
protected java.lang.Long timeToLive
protected java.sql.Timestamp started
protected java.sql.Timestamp closed
protected java.lang.String message
protected java.lang.String defaultEventType
protected java.lang.String userAgent
protected java.lang.String userIP
protected java.util.Set<Event> events
protected java.util.Set<SessionAnnotationLink> annotationLinks
public static final java.lang.String OWNER_FILTER_ANNOTATIONLINKS
public static final java.lang.String GROUP_FILTER_ANNOTATIONLINKS
public static final java.lang.String EVENT_FILTER_ANNOTATIONLINKS
public static final java.lang.String PERMS_FILTER_ANNOTATIONLINKS
protected Details details
public static final java.lang.String NODE
public static final java.lang.String UUID
public static final java.lang.String OWNER
public static final java.lang.String SUDOER
public static final java.lang.String TIMETOIDLE
public static final java.lang.String TIMETOLIVE
public static final java.lang.String STARTED
public static final java.lang.String CLOSED
public static final java.lang.String MESSAGE
public static final java.lang.String DEFAULTEVENTTYPE
public static final java.lang.String USERAGENT
public static final java.lang.String USERIP
public static final java.lang.String EVENTS
public static final java.lang.String ANNOTATIONLINKSCOUNTPEROWNER
public static final java.lang.String ANNOTATIONLINKS
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 Session()
protected Session(java.lang.Long id)
public Session(java.lang.Long id, boolean loaded)
public Session(Node _node, java.lang.String _uuid, Experimenter _owner, java.lang.Long _timeToIdle, java.lang.Long _timeToLive, java.sql.Timestamp _started, java.lang.String _defaultEventType)
@DocumentId public java.lang.Long getId()
public void setId(java.lang.Long id)
IObject
public java.lang.Integer getVersion()
getVersion
in interface IMutable
public void setVersion(java.lang.Integer version)
IMutable
setVersion
in interface IMutable
version
- Value for this objects version.public Node getNode()
public void setNode(Node node)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getUuid()
public void setUuid(java.lang.String uuid)
public Experimenter getOwner()
public void setOwner(Experimenter owner)
public Experimenter getSudoer()
public void setSudoer(Experimenter sudoer)
@Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.lang.Long getTimeToIdle()
public void setTimeToIdle(java.lang.Long timeToIdle)
@Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.lang.Long getTimeToLive()
public void setTimeToLive(java.lang.Long timeToLive)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.sql.Timestamp getStarted()
public void setStarted(java.sql.Timestamp started)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.sql.Timestamp getClosed()
public void setClosed(java.sql.Timestamp closed)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getMessage()
public void setMessage(java.lang.String message)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getDefaultEventType()
public void setDefaultEventType(java.lang.String defaultEventType)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public java.lang.String getUserIP()
public void setUserIP(java.lang.String userIP)
protected java.util.Set<Event> getEvents()
protected void setEvents(java.util.Set<Event> events)
public int sizeOfEvents()
public java.util.Iterator<Event> iterateEvents()
EmptyIterator
. To test for a null collection,
see of sizeOfEvents()
is less than zero.public java.util.Collection<Event> unmodifiableEvents()
public <E> java.util.List<E> collectEvents(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateEvents()
internally and so will return a value
even if the underlying collection is null.public void addEvent(Event target)
public void addEventSet(java.util.Collection<Event> targets)
public void removeEvent(Event target)
public void removeEventSet(java.util.Collection<Event> targets)
public void clearEvents()
protected java.util.Set<SessionAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(java.util.Set<SessionAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public java.util.Iterator<SessionAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public java.util.Collection<SessionAnnotationLink> unmodifiableAnnotationLinks()
unmodifiableAnnotationLinks
in interface IAnnotated
public <E> java.util.List<E> collectAnnotationLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateAnnotationLinks()
internally and so will return a value
even if the underlying collection is null.collectAnnotationLinks
in interface IAnnotated
public void addSessionAnnotationLink(SessionAnnotationLink target)
public void addSessionAnnotationLinkSet(java.util.Collection<SessionAnnotationLink> targets)
public void removeSessionAnnotationLink(SessionAnnotationLink target)
public void removeSessionAnnotationLinkSet(java.util.Collection<SessionAnnotationLink> targets)
public SessionAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addSessionAnnotationLink(SessionAnnotationLink link, boolean bothSides)
public java.util.Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public java.util.Set<SessionAnnotationLink> findSessionAnnotationLink(Annotation target)
public java.util.List<Annotation> linkedAnnotationList()
List
-copy of the underlying collection. Unlike,
linkedAnnotationIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.linkedAnnotationList
in interface IAnnotated
public <E> java.util.List<E> eachLinkedAnnotation(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.eachLinkedAnnotation
in interface IAnnotated
public void unlinkAnnotation(Annotation removal)
unlinkAnnotation
in interface IAnnotated
public void removeSessionAnnotationLink(SessionAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
protected void setAnnotationLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getAnnotationLinksCountPerOwner()
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 Session.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Session newInstance()
public Session 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)
Version: 5.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.