Class AbstractCuratableValueObject<C extends Curatable>
java.lang.Object
ubic.gemma.model.common.IdentifiableValueObject<C>
ubic.gemma.model.common.auditAndSecurity.curation.AbstractCuratableValueObject<C>
- All Implemented Interfaces:
Serializable, Identifiable
- Direct Known Subclasses:
ArrayDesignValueObject, ExpressionExperimentValueObject
public abstract class AbstractCuratableValueObject<C extends Curatable>
extends IdentifiableValueObject<C>
Created by tesarst on 07/03/17.
Abstract curatable value object that provides variables and methods for data stored in CurationDetails objects on
curatable objects.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPre-fetched triple of "last X event" associations off aCurationDetails, batch-loaded per page of curatable entities to avoid the NĂ—3-SELECT proxy-init cost of letting each VO constructor touch the three lazy proxies on its own. -
Field Summary
Fields inherited from class IdentifiableValueObject
id -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRequired when using the implementing classes as a spring beans.protectedAbstractCuratableValueObject(C curatable) protectedAbstractCuratableValueObject(C curatable, boolean skipEvents) Variant ofAbstractCuratableValueObject(Curatable)that skips reading the threelast*Eventassociations offCurationDetails.protectedprotectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidApply a batchedAbstractCuratableValueObject.LastEventTripleonto this VO.booleanbooleangetTroubleDetails(boolean htmlEscape) voidsetCurationNote(String curationNote) voidsetLastNeedsAttentionEvent(AuditEventValueObject lastNeedsAttentionEvent) voidsetLastNoteUpdateEvent(AuditEventValueObject lastNoteUpdateEvent) voidsetLastTroubledEvent(AuditEventValueObject lastTroubledEvent) voidsetLastUpdated(Date lastUpdated) voidsetNeedsAttention(Boolean needsAttention) voidsetTroubled(Boolean troubled)
-
Constructor Details
-
AbstractCuratableValueObject
protected AbstractCuratableValueObject()Required when using the implementing classes as a spring beans. -
AbstractCuratableValueObject
-
AbstractCuratableValueObject
-
AbstractCuratableValueObject
Variant ofAbstractCuratableValueObject(Curatable)that skips reading the threelast*Eventassociations offCurationDetails. Use this when a caller is batch-hydrating the events post-fetch (seeExpressionExperimentDaoImpl's value-object transformer): passingskipEvents=truekeeps the three lazy-proxy associations untouched at VO-construction time, avoiding ~3 SELECTs per row, and the caller fills in the threeAuditEventValueObjectfields via the inherited setters once a batched prefetch is available. -
AbstractCuratableValueObject
Copy constructor.
-
-
Method Details
-
applyLastEventTriple
Apply a batchedAbstractCuratableValueObject.LastEventTripleonto this VO. Wraps non-nullAuditEventreferences inAuditEventValueObjectmatching the per-row constructor's behaviour; respects the same admin-only gate onlastNoteUpdateEventthat the per-row ctor uses. Called by callers that constructed this VO withskipEvents=true. -
getTroubled
public boolean getTroubled() -
setTroubled
-
getNeedsAttention
public boolean getNeedsAttention() -
setNeedsAttention
-
getTroubleDetails
- Returns:
- a string describing the current trouble of this object. In this case, only the trouble of the Expression
Experiment are described. If you also need to include the Array Design trouble info, use
ExpressionExperimentDetailsValueObject
-
getTroubleDetails
-
getLastUpdated
-
getLastTroubledEvent
-
getLastNeedsAttentionEvent
-
getCurationNote
-
getLastNoteUpdateEvent
-
setLastUpdated
-
setLastTroubledEvent
-
setLastNeedsAttentionEvent
-
setCurationNote
-
setLastNoteUpdateEvent
-