return new EqualsBuilder() .append(id, other.getID()) .append(creationTime, other.getCreationTime()) .append(modificationTime, other.getModificationTime()) .append(description, other.getDescription())
/** * {@inheritDoc} */ @Override public void checkForIllegalUpdate(Experiment experiment, Experiment updates) { // Throw an exception if ID, ModificationTime or CreationTime is being updated. if (updates.getID() != null && !updates.getID().equals(experiment.getID())) { throw new IllegalArgumentException("Invalid experimentID \"" + updates.getID() + "\" " + "Cannot change experiment ID"); } if (updates.getCreationTime() != null && !updates.getCreationTime().equals(experiment.getCreationTime())) { throw new IllegalArgumentException("Invalid creationTime \"" + updates.getCreationTime() + "\" " + "Experiment creation time cannot be modified"); } if (updates.getModificationTime() != null && !updates.getModificationTime().equals(experiment.getModificationTime())) { throw new IllegalArgumentException("Invalid modificationTime \"" + updates.getModificationTime() + "\" " + "Experiment modification time cannot be modified"); } }
private Builder(Experiment other, Integer priority) { this(other.getID()); instance.creationTime = copyDate(other.getCreationTime()); instance.modificationTime = copyDate(other.getModificationTime()); instance.setDescription(other.getDescription()); instance.setSamplingPercent(other.getSamplingPercent()); instance.setRule(other.getRule()); instance.setStartTime(copyDate(other.getStartTime())); instance.setEndTime(copyDate(other.getEndTime())); instance.setState(other.getState()); instance.setLabel(other.getLabel()); instance.setApplicationName(other.getApplicationName()); instance.setPriority(priority); instance.setIsPersonalizationEnabled(other.getIsPersonalizationEnabled()); instance.setModelName(other.getModelName()); instance.setModelVersion(other.getModelVersion()); instance.isRapidExperiment = other.getIsRapidExperiment(); instance.userCap = other.getUserCap(); instance.creatorID = other.getCreatorID(); instance.tags = other.getTags(); }
return new EqualsBuilder() .append(id, other.getID()) .append(creationTime, other.getCreationTime()) .append(modificationTime, other.getModificationTime()) .append(description, other.getDescription())
private Builder(Experiment other, Integer priority) { this(other.getID()); instance.creationTime = copyDate(other.getCreationTime()); instance.modificationTime = copyDate(other.getModificationTime()); instance.setDescription(other.getDescription()); instance.setSamplingPercent(other.getSamplingPercent()); instance.setRule(other.getRule()); instance.setStartTime(copyDate(other.getStartTime())); instance.setEndTime(copyDate(other.getEndTime())); instance.setState(other.getState()); instance.setLabel(other.getLabel()); instance.setApplicationName(other.getApplicationName()); instance.setPriority(priority); instance.setIsPersonalizationEnabled(other.getIsPersonalizationEnabled()); instance.setModelName(other.getModelName()); instance.setModelVersion(other.getModelVersion()); instance.isRapidExperiment = other.getIsRapidExperiment(); instance.userCap = other.getUserCap(); instance.creatorID = other.getCreatorID(); instance.tags = other.getTags(); }