List of usage examples for java.util Date clone
public Object clone()
From source file:de.fhg.fokus.odp.registry.ckan.impl.MetadataImpl.java
@Override public void setTemporalCoverageFrom(Date temporalCoverageFrom) { this.temporalCoverageFrom = temporalCoverageFrom == null ? null : (Date) temporalCoverageFrom.clone(); }
From source file:org.everit.jira.timetracker.plugin.JiraTimetrackerWebAction.java
public void setDate(final Date date) { this.date = (Date) date.clone(); }
From source file:org.apache.roller.weblogger.pojos.Weblog.java
/** @ejb:persistent-field */ public void setDateCreated(final Date date) { if (date != null) { dateCreated = (Date) date.clone(); } else {/* w w w . j a va 2 s . c o m*/ dateCreated = null; } }
From source file:com.stratelia.webactiv.util.publication.model.PublicationDetail.java
public void setDraftOutDate(Date draftOutDate) { if (draftOutDate != null) { this.draftOutDate = (Date) draftOutDate.clone(); }/* ww w . ja v a 2s . c o m*/ this.draftOutDate = null; }
From source file:dk.netarkivet.harvester.datamodel.Job.java
/** * Set the actual time when this job was started. * <p>//w w w . j ava 2 s. c om * Sends a notification, if actualStart is set to a time after actualStop. * * @param actualStart A Date object representing the time when this job was started. */ public void setActualStart(Date actualStart) { ArgumentNotValid.checkNotNull(actualStart, "actualStart"); if (actualStop != null && actualStop.before(actualStart)) { log.warn("Job(" + getJobID() + "): Start time (" + actualStart + ") is after end time: " + actualStop); } this.actualStart = (Date) actualStart.clone(); }
From source file:dk.netarkivet.harvester.datamodel.Job.java
/** * Set the actual time when this job was stopped/completed. Sends a notification, if actualStop is set to a time * before actualStart.//www .j av a 2s . c om * * @param actualStop A Date object representing the time when this job was stopped. * @throws ArgumentNotValid */ public void setActualStop(Date actualStop) throws ArgumentNotValid { ArgumentNotValid.checkNotNull(actualStop, "actualStop"); if (actualStart == null) { log.warn("Job(" + getJobID() + "): actualStart should be defined before setting actualStop"); } else if (actualStop.before(actualStart)) { log.warn("Job(" + getJobID() + "): actualStop (" + actualStop + ") is before actualStart: " + actualStart); } this.actualStop = (Date) actualStop.clone(); }
From source file:org.photovault.imginfo.PhotoInfo.java
/** * Set the value of shootTime./*from w ww . j a v a 2s.co m*/ * @param v Value to assign to shootTime. */ public void setShootTime(java.util.Date v) { this.shootTime = (v != null) ? (java.util.Date) v.clone() : null; modified(); }
From source file:org.photovault.imginfo.PhotoInfo.java
public void setLastModified(final java.util.Date newDate) { this.lastModified = (newDate != null) ? (java.util.Date) newDate.clone() : null; modified();//w w w . j a v a2 s. com }
From source file:org.photovault.imginfo.PhotoInfo.java
/** Set both shooting time & accuracy directly using a FuzzyTime object @param v FuzzyTime containing new values. *//*from www.java 2 s .c om*/ public void setFuzzyShootTime(FuzzyDate v) { if (v != null) { java.util.Date d = v.getDate(); this.shootTime = (d != null) ? (java.util.Date) d.clone() : null; this.timeAccuracy = v.getAccuracy(); } else { this.shootTime = null; this.timeAccuracy = 0.0; } modified(); }
From source file:org.mifos.accounts.business.AccountBO.java
protected void setClosedDate(final Date closedDate) { this.closedDate = (Date) (closedDate == null ? null : closedDate.clone()); }