@Entity @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public abstract class Job extends java.lang.Object implements java.io.Serializable, IObject, IMutable
Modifier and Type | Class and Description |
---|---|
static class |
Job.Details |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
_dynamicFields |
protected boolean |
_loaded |
protected Details |
details |
static java.lang.String |
DETAILS |
static java.lang.String |
EVENT_FILTER |
static java.lang.String |
EVENT_FILTER_ORIGINALFILELINKS |
static java.util.Set<java.lang.String> |
FIELDS |
protected java.sql.Timestamp |
finished |
static java.lang.String |
FINISHED |
static java.lang.String |
GROUP_FILTER |
static java.lang.String |
GROUP_FILTER_ORIGINALFILELINKS |
protected java.lang.String |
groupname |
static java.lang.String |
GROUPNAME |
protected java.lang.Long |
id |
static java.lang.String |
ID |
protected java.lang.String |
message |
static java.lang.String |
MESSAGE |
protected java.util.Set<JobOriginalFileLink> |
originalFileLinks |
static java.lang.String |
ORIGINALFILELINKS |
static java.lang.String |
ORIGINALFILELINKSCOUNTPEROWNER |
static java.lang.String |
OWNER_FILTER |
static java.lang.String |
OWNER_FILTER_ORIGINALFILELINKS |
static java.lang.String |
PERMS_FILTER |
static java.lang.String |
PERMS_FILTER_ORIGINALFILELINKS |
protected java.sql.Timestamp |
scheduledFor |
static java.lang.String |
SCHEDULEDFOR |
protected java.sql.Timestamp |
started |
static java.lang.String |
STARTED |
protected JobStatus |
status |
static java.lang.String |
STATUS |
protected java.sql.Timestamp |
submitted |
static java.lang.String |
SUBMITTED |
protected java.lang.String |
type |
static java.lang.String |
TYPE |
protected java.lang.String |
username |
static java.lang.String |
USERNAME |
protected java.lang.Integer |
version |
static java.lang.String |
VERSION |
Modifier | Constructor and Description |
---|---|
|
Job() |
protected |
Job(java.lang.Long id) |
|
Job(java.lang.Long id,
boolean loaded)
Main constructor.
|
|
Job(java.lang.String _username,
java.lang.String _groupname,
java.lang.String _type,
java.lang.String _message,
JobStatus _status,
java.sql.Timestamp _submitted,
java.sql.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(java.util.Collection<JobOriginalFileLink> targets)
use like addJobOriginalFileLink.
|
void |
clearOriginalFileLinks()
clears the set.
|
<E> java.util.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> java.util.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() |
java.util.Set<java.lang.String> |
fields()
returns a Set of field names that belong to this class
|
java.util.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.
|
java.sql.Timestamp |
getFinished()
Simple field ome.model.jobs.Job.finished (java.sql.Timestamp)
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
java.lang.String |
getGroupname()
Simple field ome.model.jobs.Job.groupname (java.lang.String)
|
java.lang.Long |
getId()
The DB unique identifier for this object.
|
java.lang.String |
getMessage()
Simple field ome.model.jobs.Job.message (java.lang.String)
|
protected java.util.Set<JobOriginalFileLink> |
getOriginalFileLinks()
returns originalFileLinks .
|
java.util.Map<java.lang.Long,java.lang.Long> |
getOriginalFileLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.jobs.JobOriginalFileLink that a user has.
|
java.sql.Timestamp |
getScheduledFor()
Simple field ome.model.jobs.Job.scheduledFor (java.sql.Timestamp)
|
java.sql.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)
|
java.sql.Timestamp |
getSubmitted()
Simple field ome.model.jobs.Job.submitted (java.sql.Timestamp)
|
java.lang.String |
getType()
Simple field ome.model.jobs.Job.type (java.lang.String)
|
java.lang.String |
getUsername()
Simple field ome.model.jobs.Job.username (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<JobOriginalFileLink> |
iterateOriginalFileLinks()
should be used rather than accessing the originalFileLinks set directly.
|
java.util.Iterator<OriginalFile> |
linkedOriginalFileIterator()
provides an iterator over the parent values of the originalFileLinks.
|
java.util.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(java.lang.String field,
java.lang.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(java.util.Collection<JobOriginalFileLink> targets)
use like removeJobOriginalFileLink
|
java.lang.Object |
retrieve(java.lang.String field)
retrieves a value from this instance.
|
protected void |
setDetails(Details details) |
void |
setFinished(java.sql.Timestamp finished) |
void |
setGroupname(java.lang.String groupname) |
void |
setId(java.lang.Long id)
usually unneeded.
|
void |
setMessage(java.lang.String message) |
protected void |
setOriginalFileLinks(java.util.Set<JobOriginalFileLink> originalFileLinks)
setter for originalFileLinks should be avoided.
|
protected void |
setOriginalFileLinksCountPerOwner(java.util.Map<java.lang.Long,java.lang.Long> map) |
void |
setScheduledFor(java.sql.Timestamp scheduledFor) |
void |
setStarted(java.sql.Timestamp started) |
void |
setStatus(JobStatus status) |
void |
setSubmitted(java.sql.Timestamp submitted) |
void |
setType(java.lang.String type) |
void |
setUsername(java.lang.String username) |
void |
setVersion(java.lang.Integer version)
use with caution.
|
int |
sizeOfOriginalFileLinks()
returns the size of originalFileLinks.
|
protected void |
throwNullCollectionException(java.lang.String propertyName) |
java.lang.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.
|
java.util.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 java.lang.String OWNER_FILTER
public static final java.lang.String GROUP_FILTER
public static final java.lang.String EVENT_FILTER
public static final java.lang.String PERMS_FILTER
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 java.lang.String username
protected java.lang.String groupname
protected java.lang.String type
protected java.lang.String message
protected JobStatus status
protected java.sql.Timestamp submitted
protected java.sql.Timestamp scheduledFor
protected java.sql.Timestamp started
protected java.sql.Timestamp finished
protected java.util.Set<JobOriginalFileLink> originalFileLinks
public static final java.lang.String OWNER_FILTER_ORIGINALFILELINKS
public static final java.lang.String GROUP_FILTER_ORIGINALFILELINKS
public static final java.lang.String EVENT_FILTER_ORIGINALFILELINKS
public static final java.lang.String PERMS_FILTER_ORIGINALFILELINKS
protected Details details
public static final java.lang.String USERNAME
public static final java.lang.String GROUPNAME
public static final java.lang.String TYPE
public static final java.lang.String MESSAGE
public static final java.lang.String STATUS
public static final java.lang.String SUBMITTED
public static final java.lang.String SCHEDULEDFOR
public static final java.lang.String STARTED
public static final java.lang.String FINISHED
public static final java.lang.String ORIGINALFILELINKSCOUNTPEROWNER
public static final java.lang.String ORIGINALFILELINKS
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 Job()
protected Job(java.lang.Long id)
public Job(java.lang.Long id, boolean loaded)
public Job(java.lang.String _username, java.lang.String _groupname, java.lang.String _type, java.lang.String _message, JobStatus _status, java.sql.Timestamp _submitted, java.sql.Timestamp _scheduledFor)
@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.@Field(index=TOKENIZED) @Field(index=TOKENIZED,analyzer=@Analyzer(impl=ConfiguredAnalyzer.class),name="combined_fields") public java.lang.String getUsername()
public void setUsername(java.lang.String username)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,analyzer=@Analyzer(impl=ConfiguredAnalyzer.class),name="combined_fields") public java.lang.String getGroupname()
public void setGroupname(java.lang.String groupname)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,analyzer=@Analyzer(impl=ConfiguredAnalyzer.class),name="combined_fields") public java.lang.String getType()
public void setType(java.lang.String type)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,analyzer=@Analyzer(impl=ConfiguredAnalyzer.class),name="combined_fields") public java.lang.String getMessage()
public void setMessage(java.lang.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 java.sql.Timestamp getSubmitted()
public void setSubmitted(java.sql.Timestamp submitted)
@DateBridge(resolution=MINUTE) @Field(index=UN_TOKENIZED) @Field(index=UN_TOKENIZED,name="combined_fields") public java.sql.Timestamp getScheduledFor()
public void setScheduledFor(java.sql.Timestamp scheduledFor)
@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 getFinished()
public void setFinished(java.sql.Timestamp finished)
protected java.util.Set<JobOriginalFileLink> getOriginalFileLinks()
protected void setOriginalFileLinks(java.util.Set<JobOriginalFileLink> originalFileLinks)
public int sizeOfOriginalFileLinks()
public java.util.Iterator<JobOriginalFileLink> iterateOriginalFileLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfOriginalFileLinks()
is less than zero.public java.util.Collection<JobOriginalFileLink> unmodifiableOriginalFileLinks()
public <E> java.util.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(java.util.Collection<JobOriginalFileLink> targets)
public void removeJobOriginalFileLink(JobOriginalFileLink target)
public void removeJobOriginalFileLinkSet(java.util.Collection<JobOriginalFileLink> targets)
public JobOriginalFileLink linkOriginalFile(OriginalFile addition)
public void addJobOriginalFileLink(JobOriginalFileLink link, boolean bothSides)
public java.util.Iterator<OriginalFile> linkedOriginalFileIterator()
ConcurrentModificationException
.
Use linkedOriginalFileList()
instead.public java.util.Set<JobOriginalFileLink> findJobOriginalFileLink(OriginalFile target)
public java.util.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> java.util.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(java.util.Map<java.lang.Long,java.lang.Long> map)
public java.util.Map<java.lang.Long,java.lang.Long> getOriginalFileLinksCountPerOwner()
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 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)