@Entity @Indexed(index="FullText") @ClassBridge(name="details", impl=DetailsFieldBridge.class, index=UN_TOKENIZED, store=NO) public class Reagent extends Object implements Serializable, IObject, IMutable, IAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
Reagent.Details |
Modifier | Constructor and Description |
---|---|
|
Reagent() |
protected |
Reagent(Long id) |
|
Reagent(Long id,
boolean loaded)
Main constructor.
|
|
Reagent(Screen _screen) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFilter(Filter __filter) |
void |
addReagentAnnotationLink(ReagentAnnotationLink target)
use instead of setAnnotationLinks .
|
void |
addReagentAnnotationLink(ReagentAnnotationLink link,
boolean bothSides)
Adds a ome.model.annotations.ReagentAnnotationLink to annotationLinks, allowing for recursion -- whether
or not addReagentAnnotationLink will be called on the addition if it is loaded
|
void |
addReagentAnnotationLinkSet(Collection<ReagentAnnotationLink> targets)
use like addReagentAnnotationLink.
|
void |
addWellReagentLink(WellReagentLink target)
use instead of setWellLinks .
|
void |
addWellReagentLink(WellReagentLink link,
boolean bothSides)
Adds a ome.model.screen.WellReagentLink to wellLinks, allowing for recursion -- whether
or not addWellReagentLink will be called on the addition if it is loaded
|
void |
addWellReagentLinkSet(Collection<WellReagentLink> targets)
use like addWellReagentLink.
|
void |
clearAnnotationLinks()
clears the set.
|
void |
clearWellLinks()
clears the set.
|
<E> List<E> |
collectAnnotationLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.ReagentAnnotationLink while
collecting the results.
|
<E> List<E> |
collectWellLinks(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.screen.WellReagentLink while
collecting the results.
|
<E> List<E> |
eachLinkedAnnotation(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.annotations.Annotation while
collecting the results.
|
<E> List<E> |
eachLinkedWell(CBlock<E> block)
takes a CBlock and calls the block once for each ome.model.screen.Well while
collecting the results.
|
protected void |
errorIfUnloaded() |
Set<String> |
fields()
returns a Set of field names that belong to this class
|
Set<ReagentAnnotationLink> |
findReagentAnnotationLink(Annotation target)
find all ome.model.annotations.ReagentAnnotationLink which have the argument as their child.
|
Set<WellReagentLink> |
findWellReagentLink(Well target)
find all ome.model.screen.WellReagentLink which have the argument as their parent.
|
protected Set<ReagentAnnotationLink> |
getAnnotationLinks()
returns annotationLinks .
|
Map<Long,Long> |
getAnnotationLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.annotations.ReagentAnnotationLink that a user has.
|
String |
getDescription()
Simple field ome.model.screen.Reagent.description (java.lang.String)
|
Details |
getDetails()
The details of this object correspond to low-level system
information.
|
GraphHolder |
getGraphHolder()
retrieves the
GraphHolder for this entity. |
Long |
getId()
The DB unique identifier for this object.
|
String |
getName()
Simple field ome.model.screen.Reagent.name (java.lang.String)
|
String |
getReagentIdentifier()
Simple field ome.model.screen.Reagent.reagentIdentifier (java.lang.String)
|
Screen |
getScreen()
Many-to-one field ome.model.screen.Reagent.screen (ome.model.screen.Screen)
|
Integer |
getVersion()
This version number is controlled by the database for optimisitic
locking.
|
protected Set<WellReagentLink> |
getWellLinks()
returns wellLinks .
|
Map<Long,Long> |
getWellLinksCountPerOwner()
If fetched, returns the count(*) of ome.model.screen.WellReagentLink that a user has.
|
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<ReagentAnnotationLink> |
iterateAnnotationLinks()
should be used rather than accessing the annotationLinks set directly.
|
Iterator<WellReagentLink> |
iterateWellLinks()
should be used rather than accessing the wellLinks set directly.
|
ReagentAnnotationLink |
linkAnnotation(Annotation addition)
Adds a ome.model.annotations.ReagentAnnotationLink to annotationLinks .
|
Iterator<Annotation> |
linkedAnnotationIterator()
provides an iterator over the parent values of the annotationLinks.
|
List<Annotation> |
linkedAnnotationList()
produces a
List -copy of the underlying collection. |
Iterator<Well> |
linkedWellIterator()
provides an iterator over the child values of the wellLinks.
|
List<Well> |
linkedWellList()
produces a
List -copy of the underlying collection. |
WellReagentLink |
linkWell(Well addition)
Adds a ome.model.screen.WellReagentLink to wellLinks .
|
Reagent |
newInstance() |
Reagent |
proxy() |
void |
putAt(String field,
Object value)
stores a value in this instance.
|
void |
removeReagentAnnotationLink(ReagentAnnotationLink target)
removes a single element from this set and makes the inverse call on ome.model.annotations.ReagentAnnotationLink
|
void |
removeReagentAnnotationLink(ReagentAnnotationLink link,
boolean bothSides)
removes the given ReagentAnnotationLink from annotationLinks, allowing for recursion -- whether
or not the removal will call unlinkReagent again if loaded.
|
void |
removeReagentAnnotationLinkSet(Collection<ReagentAnnotationLink> targets)
use like removeReagentAnnotationLink
|
void |
removeWellReagentLink(WellReagentLink target)
removes a single element from this set and makes the inverse call on ome.model.screen.WellReagentLink
|
void |
removeWellReagentLink(WellReagentLink link,
boolean bothSides)
removes the given WellReagentLink from wellLinks, allowing for recursion -- whether
or not the removal will call unlinkReagent again if loaded.
|
void |
removeWellReagentLinkSet(Collection<WellReagentLink> targets)
use like removeWellReagentLink
|
Object |
retrieve(String field)
retrieves a value from this instance.
|
protected void |
setAnnotationLinks(Set<ReagentAnnotationLink> annotationLinks)
setter for annotationLinks should be avoided.
|
protected void |
setAnnotationLinksCountPerOwner(Map<Long,Long> map) |
void |
setDescription(String description) |
protected void |
setDetails(Details details)
Use the
Details.copy(ome.model.internal.Details)
or Details.shallowCopy(ome.model.internal.Details)
methods to set the Reagent.Details instance instead. |
void |
setId(Long id)
usually unneeded.
|
void |
setName(String name) |
void |
setReagentIdentifier(String reagentIdentifier) |
void |
setScreen(Screen screen) |
void |
setVersion(Integer version)
use with caution.
|
protected void |
setWellLinks(Set<WellReagentLink> wellLinks)
setter for wellLinks should be avoided.
|
protected void |
setWellLinksCountPerOwner(Map<Long,Long> map) |
int |
sizeOfAnnotationLinks()
returns the size of annotationLinks.
|
int |
sizeOfWellLinks()
returns the size of wellLinks.
|
protected void |
throwNullCollectionException(String propertyName) |
String |
toString() |
void |
unlinkAnnotation(Annotation removal)
unlinks all ome.model.annotations.Annotation instances from this instance.
|
void |
unlinkWell(Well removal)
unlinks all ome.model.screen.Well instances from this instance.
|
void |
unload()
set the loaded field to false, and set all non-ID fields to null.
|
Collection<ReagentAnnotationLink> |
unmodifiableAnnotationLinks()
Returns an unmodifiable collection-view
|
Collection<WellReagentLink> |
unmodifiableWellLinks()
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 name
protected String reagentIdentifier
protected Screen screen
protected Set<WellReagentLink> wellLinks
public static final String OWNER_FILTER_WELLLINKS
public static final String GROUP_FILTER_WELLLINKS
public static final String EVENT_FILTER_WELLLINKS
public static final String PERMS_FILTER_WELLLINKS
protected Set<ReagentAnnotationLink> annotationLinks
public static final String OWNER_FILTER_ANNOTATIONLINKS
public static final String GROUP_FILTER_ANNOTATIONLINKS
public static final String EVENT_FILTER_ANNOTATIONLINKS
public static final String PERMS_FILTER_ANNOTATIONLINKS
protected String description
protected Details details
public static final String NAME
public static final String REAGENTIDENTIFIER
public static final String SCREEN
public static final String WELLLINKSCOUNTPEROWNER
public static final String WELLLINKS
public static final String ANNOTATIONLINKSCOUNTPEROWNER
public static final String ANNOTATIONLINKS
public static final String DESCRIPTION
public static final String DETAILS
protected boolean _loaded
public Reagent()
protected Reagent(Long id)
public Reagent(Long id, boolean loaded)
public Reagent(Screen _screen)
@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 getName()
public void setName(String name)
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getReagentIdentifier()
public void setReagentIdentifier(String reagentIdentifier)
public Screen getScreen()
public void setScreen(Screen screen)
protected Set<WellReagentLink> getWellLinks()
protected void setWellLinks(Set<WellReagentLink> wellLinks)
public int sizeOfWellLinks()
public Iterator<WellReagentLink> iterateWellLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfWellLinks()
is less than zero.public Collection<WellReagentLink> unmodifiableWellLinks()
public <E> List<E> collectWellLinks(CBlock<E> block)
block == null
, then the
iterator values themselves are collected. This method uses
iterateWellLinks()
internally and so will return a value
even if the underlying collection is null.public void addWellReagentLink(WellReagentLink target)
public void addWellReagentLinkSet(Collection<WellReagentLink> targets)
public void removeWellReagentLink(WellReagentLink target)
public void removeWellReagentLinkSet(Collection<WellReagentLink> targets)
public WellReagentLink linkWell(Well addition)
public void addWellReagentLink(WellReagentLink link, boolean bothSides)
public Iterator<Well> linkedWellIterator()
ConcurrentModificationException
.
Use linkedWellList()
instead.public Set<WellReagentLink> findWellReagentLink(Well target)
public List<Well> linkedWellList()
List
-copy of the underlying collection. Unlike,
linkedWellIterator()
, while using the returned List
,
modifications can be made to the underlying collection without throwing
ConcurrentModificationException
.public <E> List<E> eachLinkedWell(CBlock<E> block)
block == null
, then the
iterator values themselves are collected.public void unlinkWell(Well removal)
public void removeWellReagentLink(WellReagentLink link, boolean bothSides)
public void clearWellLinks()
public Map<Long,Long> getWellLinksCountPerOwner()
protected Set<ReagentAnnotationLink> getAnnotationLinks()
protected void setAnnotationLinks(Set<ReagentAnnotationLink> annotationLinks)
public int sizeOfAnnotationLinks()
sizeOfAnnotationLinks
in interface IAnnotated
public Iterator<ReagentAnnotationLink> iterateAnnotationLinks()
EmptyIterator
. To test for a null collection,
see of sizeOfAnnotationLinks()
is less than zero.iterateAnnotationLinks
in interface IAnnotated
public Collection<ReagentAnnotationLink> unmodifiableAnnotationLinks()
unmodifiableAnnotationLinks
in interface IAnnotated
public <E> 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 addReagentAnnotationLink(ReagentAnnotationLink target)
public void addReagentAnnotationLinkSet(Collection<ReagentAnnotationLink> targets)
public void removeReagentAnnotationLink(ReagentAnnotationLink target)
public void removeReagentAnnotationLinkSet(Collection<ReagentAnnotationLink> targets)
public ReagentAnnotationLink linkAnnotation(Annotation addition)
linkAnnotation
in interface IAnnotated
public void addReagentAnnotationLink(ReagentAnnotationLink link, boolean bothSides)
public Iterator<Annotation> linkedAnnotationIterator()
ConcurrentModificationException
.
Use linkedAnnotationList()
instead.linkedAnnotationIterator
in interface IAnnotated
public Set<ReagentAnnotationLink> findReagentAnnotationLink(Annotation target)
public 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> 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 removeReagentAnnotationLink(ReagentAnnotationLink link, boolean bothSides)
public void clearAnnotationLinks()
clearAnnotationLinks
in interface IAnnotated
public Map<Long,Long> getAnnotationLinksCountPerOwner()
@Field(index=TOKENIZED) @Field(index=TOKENIZED,name="combined_fields") public String getDescription()
public void setDescription(String description)
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 Reagent.Details
instance instead.public boolean isValid()
IObject
Validation.isValid()
public Validation validate()
IObject
Validation
object.public Reagent newInstance()
public Reagent 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.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.