@Override public InstantDt getPublished() { if (myPublished != null) { return new InstantDt(myPublished); } else { return null; } }
/** * Sets the value for <b>lastUpdated</b> () * * <p> * <b>Definition:</b> * When the resource last changed - e.g. when the version changed * </p> */ public MetaDt setLastUpdatedWithMillisPrecision( Date theDate) { myLastUpdated = new InstantDt(theDate); return this; }
/** * Sets the value for <b>when</b> () * * <p> * <b>Definition:</b> * When the digital signature was signed. * </p> */ public SignatureDt setWhenWithMillisPrecision( Date theDate) { myWhen = new InstantDt(theDate); return this; }
@Override public IHistoryTyped since(Date theCutoff) { if (theCutoff != null) { mySince = new InstantDt(theCutoff); } else { mySince = null; } return this; }
/** * Sets the value for <b>dateTime</b> () * * <p> * <b>Definition:</b> * The time when the event occurred on the source * </p> */ public Event setDateTimeWithMillisPrecision( Date theDate) { myDateTime = new InstantDt(theDate); return this; }
@Override public InstantDt getPublished() { if (myPublished != null) { return new InstantDt(myPublished); } else { return null; } }
/** * Sets the value for <b>when</b> () * * <p> * <b>Definition:</b> * When the digital signature was signed. * </p> */ public SignatureDt setWhen( Date theDate, TemporalPrecisionEnum thePrecision) { myWhen = new InstantDt(theDate, thePrecision); return this; }
/** * Sets the value for <b>dateTime</b> () * * <p> * <b>Definition:</b> * The time when the event occurred on the source * </p> */ public Event setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) { myDateTime = new InstantDt(theDate, thePrecision); return this; }
@Override public InstantDt getUpdated() { return new InstantDt(myUpdated); }
/** * Sets the value for <b>lastUpdated</b> () * * <p> * <b>Definition:</b> * When the resource last changed - e.g. when the version changed * </p> */ public MetaDt setLastUpdated( Date theDate, TemporalPrecisionEnum thePrecision) { myLastUpdated = new InstantDt(theDate, thePrecision); return this; }
@Override public InstantDt getUpdated() { return new InstantDt(myUpdated); }
/** * Factory method which creates a new InstantDt with millisecond precision and initializes it with the * current time and the system local timezone. */ public static InstantDt withCurrentTime() { return new InstantDt(new Date(), TemporalPrecisionEnum.MILLI, TimeZone.getDefault()); }
public InstantDt getValueAsInstantDt() { if (myValue == null) { return null; } return new InstantDt(myValue.getValue()); }
@Override protected String doEncode(Date theString) { return new InstantDt(theString).getValueAsString(); }
@Override protected Date doParse(String theString) { return new InstantDt(theString).getValue(); }
@Override protected Calendar doParse(String theString) { return new InstantDt(theString).getValueAsCalendar(); }
@Override protected String doEncode(Calendar theString) { return new InstantDt(theString).getValueAsString(); }
@Override public String toString() { ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE); b.append("paramName", getParamName()); b.append("resourceId", getResource().getId()); // TODO: add a field so we don't need to resolve this b.append("valueLow", new InstantDt(getValueLow())); b.append("valueHigh", new InstantDt(getValueHigh())); return b.build(); }
@Override public InstantDt getPublished() { ensureSearchEntityLoaded(); return new InstantDt(mySearchEntity.getCreated()); }
public static IPrimitiveType<Date> extractLastUpdatedFromResource(IBaseResource theResource) { IPrimitiveType<Date> lastUpdated = null; if (theResource instanceof IResource) { lastUpdated = ResourceMetadataKeyEnum.UPDATED.get((IResource) theResource); } else if (theResource instanceof IAnyResource) { lastUpdated = new InstantDt(theResource.getMeta().getLastUpdated()); } return lastUpdated; }