/** * Copies an instance of {@link Consent} to a new instance. * * @param status the consent whose state is to be copied * @return an instance which is identical to the `from` instance */ @Override public Consent copy(ConsentStatus status) { Consent copy = new DefaultConsent( this.getId(), this.getLabel(), this.getDescription(), this.isRequired(), this.getFields()); copy.setStatus(status); return copy; } }
/** * Copies an instance of {@link Consent} to a new instance. * * @param status the consent whose state is to be copied * @return an instance which is identical to the `from` instance */ @Override public Consent copy(ConsentStatus status) { Consent copy = new DefaultConsent( this.getId(), this.getLabel(), this.getDescription(), this.isRequired(), this.getDataFields(), this.getFields()); copy.setStatus(status); return copy; } }