@Entity @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public abstract class Job extends Object implements Serializable, IObject, IMutable
Modifier and Type | Class and Description |
---|---|
static class |
Job.Details |
Modifier | Constructor and Description |
---|---|
|
Job() |
protected |
Job(Long id) |
|
Job(Long id,
boolean loaded)
Main constructor.
|
|
Job(String _username,
String _groupname,
String _type,
String _message,
JobStatus _status,
Timestamp _submitted,
Timestamp _scheduledFor) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addJobOriginalFileLink(JobOriginalFileLink target)
use instead of setOriginalFileLinks .
|
void |
addJobOriginalFileLink(JobOriginalFileLink link,
boolean bothSides)
Adds a ome.model.jobs.JobOriginalFileLink to originalFileLinks, allowing for recursion -- whether
or not addJobOriginalFileLink will be called on the addition if it is loaded
|
void |
addJobOriginalFileLinkSet(Collection<JobOriginalFileLink> targets)
use like addJobOriginalFileLink.
|
void |
clearOriginalFileLinks()
clears the set.
|
<E> List<E> |
collectOriginalFileLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.jobs.JobOriginalFileLink while
collecting the results.
|
<E> List<E> |
eachLinkedOriginalFile(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.core.OriginalFile while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<JobOriginalFileLink> |
findJobOriginalFileLink(OriginalFile target)
find all ome.model.jobs.JobOriginalFileLink which have the argument as their child.
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
Timestamp |
getFinished()
Simple field ome.model.jobs.Job.finished (java.sql.Timestamp)
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
String |
getGroupname()
Simple field ome.model.jobs.Job.groupname (java.lang.String)
|
Long |
getId()
The DB unique identifier for this object.
|
String |
getMessage()
Simple field ome.model.jobs.Job.message (java.lang.String)
|
protected Set<JobOriginalFileLink> |
getOriginalFileLinks()
returns originalFileLinks .
|
Map<Long,Long> |
getOriginalFileLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.jobs.JobOriginalFileLink that a user has.
|
Timestamp |
getScheduledFor()
Simple field ome.model.jobs.Job.scheduledFor (java.sql.Timestamp)
|
Timestamp |
getStarted()
Simple field ome.model.jobs.Job.started (java.sql.Timestamp)
|
JobStatus |
getStatus()
Many-to-one field ome.model.jobs.Job.status (ome.model.jobs.JobStatus)
|
Timestamp |
getSubmitted()
Simple field ome.model.jobs.Job.submitted (java.sql.Timestamp)
|
String |
getType()
Simple field ome.model.jobs.Job.type (java.lang.String)
|
String |
getUsername()
Simple field ome.model.jobs.Job.username (java.lang.String)
|
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() |
Iterator<JobOriginalFileLink> |
iterateOriginalFileLinks()
should be used rather than accessing the originalFileLinks set directly.
|
Iterator<OriginalFile> |
linkedOriginalFileIterator()
provides an iterator over the parent values of the originalFileLinks.
|
List<OriginalFile> |
linkedOriginalFileList()
produces a
List -copy of the underlying collection. |
JobOriginalFileLink |
linkOriginalFile(OriginalFile addition)
Adds a ome.model.jobs.JobOriginalFileLink to originalFileLinks .
|
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeJobOriginalFileLink(JobOriginalFileLink target)
removes a single element from this set and makes the inverse call on ome.model.jobs.JobOriginalFileLink
|
void |
removeJobOriginalFileLink(JobOriginalFileLink link,
boolean bothSides)
removes the given JobOriginalFileLink from originalFileLinks, allowing for recursion -- whether
or not the removal will call unlinkJob again if loaded.
|
void |
removeJobOriginalFileLinkSet(Collection<JobOriginalFileLink> targets)
use like removeJobOriginalFileLink
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Job.Details instance instead. |
void |
setFinished(Timestamp finished) |
void |
setGroupname(String groupname) |
void |
setId(Long id)
usually unneeded.
|
void |
setMessage(String message) |
protected void |
setOriginalFileLinks(Set<JobOriginalFileLink> originalFileLinks)
setter for originalFileLinks should be avoided.
|
protected void |
setOriginalFileLinksCountPerOwner(Map<Long,Long> map) |
void |
setScheduledFor(Timestamp scheduledFor) |
void |
setStarted(Timestamp started) |
void |
setStatus(JobStatus status) |
void |
setSubmitted(Timestamp submitted) |
void |
setType(String type) |
void |
setUsername(String username) |
void |
setVersion(Integer version)
use with caution.
|
int |
sizeOfOriginalFileLinks()
returns the size of originalFileLinks.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkOriginalFile(OriginalFile removal)
unlinks all ome.model.core.OriginalFile instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<JobOriginalFileLink> |
unmodifiableOriginalFileLinks()
Returns an unmodifiable collection-view
|
Validation |
validate()
calls the class-specific validator for this instance and returns the
Validation object. |
public static final String OWNER_FILTER
public static final String GROUP_FILTER
public static final String EVENT_FILTER
public static final String PERMS_FILTER
public static final String ID
protected Long id
public static final String VERSION
protected Integer version
protected String username
protected String groupname
protected String type
protected String message
protected JobStatus status
protected Timestamp submitted
protected Timestamp scheduledFor
protected Timestamp started
protected Timestamp finished
protected Set<JobOriginalFileLink> originalFileLinks
public static final String OWNER_FILTER_ORIGINALFILELINKS
public static final String GROUP_FILTER_ORIGINALFILELINKS
public static final String EVENT_FILTER_ORIGINALFILELINKS
public static final String PERMS_FILTER_ORIGINALFILELINKS
protected Details details
public static final String USERNAME
public static final String GROUPNAME
public static final String TYPE
public static final String MESSAGE
public static final String STATUS
public static final String SUBMITTED
public static final String SCHEDULEDFOR
public static final String STARTED
public static final String FINISHED
public static final String ORIGINALFILELINKSCOUNTPEROWNER
public static final String ORIGINALFILELINKS
public static final String DETAILS
protected boolean _loaded
public Job()
protected Job(Long id)
public Job(Long id, boolean loaded)
@DocumentId public Long getId()
public void setId(Long id)
IObject
public Integer getVersion()
getVersion
in interface IMutable
public void setVersion(Integer version)
IMutable
setVersion
in interface IMutable
version
- Value for this objects version.@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getUsername()
public void setUsername(String username)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getGroupname()
public void setGroupname(String groupname)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getType()
public void setType(String type)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getMessage()
public void setMessage(String message)
public JobStatus getStatus()
public void setStatus(JobStatus status)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getSubmitted()
public void setSubmitted(Timestamp submitted)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getScheduledFor()
public void setScheduledFor(Timestamp scheduledFor)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getStarted()
public void setStarted(Timestamp started)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public Timestamp getFinished()
public void setFinished(Timestamp finished)
protected Set<JobOriginalFileLink> getOriginalFileLinks()
protected void setOriginalFileLinks(Set<JobOriginalFileLink> originalFileLinks)
public int sizeOfOriginalFileLinks()
public Iterator<JobOriginalFileLink> iterateOriginalFileLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfOriginalFileLinks()
is less than zero.public Collection<JobOriginalFileLink> unmodifiableOriginalFileLinks()
public <E> List<E> collectOriginalFileLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateOriginalFileLinks()
internally and so will return a value
even if the underlying collection is null.public void addJobOriginalFileLink(JobOriginalFileLink target)
public void addJobOriginalFileLinkSet(Collection<JobOriginalFileLink> targets)
public void removeJobOriginalFileLink(JobOriginalFileLink target)
public void removeJobOriginalFileLinkSet(Collection<JobOriginalFileLink> targets)
public JobOriginalFileLink linkOriginalFile(OriginalFile addition)
public void addJobOriginalFileLink(JobOriginalFileLink link, boolean bothSides)
public Iterator<OriginalFile> linkedOriginalFileIterator()
ConcurrentModificationException
.
Use linkedOriginalFileList()
instead.public Set<JobOriginalFileLink> findJobOriginalFileLink(OriginalFile target)
public List<OriginalFile> linkedOriginalFileList()
List
-copy of the underlying collection. Unlike,
linkedOriginalFileIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedOriginalFile(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkOriginalFile(OriginalFile removal)
public void removeJobOriginalFileLink(JobOriginalFileLink link, boolean bothSides)
public void clearOriginalFileLinks()
protected void setOriginalFileLinksCountPerOwner(Map<Long,Long> map)
public Map<Long,Long> getOriginalFileLinksCountPerOwner()
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 Job.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.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.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.