.append(id, other.getID()) .append(creationTime, other.getCreationTime()) .append(modificationTime, other.getModificationTime()) .append(description, other.getDescription()) .append(hypothesisIsCorrect, other.getHypothesisIsCorrect())
/** * {@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(); }
.append(id, other.getID()) .append(creationTime, other.getCreationTime()) .append(modificationTime, other.getModificationTime()) .append(description, other.getDescription()) .append(hypothesisIsCorrect, other.getHypothesisIsCorrect())
/** * Creates the ExperimentDetail with a given Experiment and the total number of users. * * @param exp the experiment that provides the basic information */ public ExperimentDetail(Experiment exp) { this(exp.getID(), exp.getState(), exp.getLabel(), exp.getApplicationName(), exp.getModificationTime(), exp.getStartTime(), exp.getEndTime(), exp.getDescription(), exp.getTags()); }
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(); }