public CopyFieldDTO(CopyField copyField) { this.copyFieldId = copyField.getId(); this.indexFieldSourceModel = new EntityModel<IndexField>(copyField.getIndexFieldSource()); this.indexFieldDestModel = new EntityModel<IndexField>(copyField.getIndexFieldDest()); this.maxChars = copyField.getMaxChars(); this.sourceAllFields = copyField.isSourceAllFields(); }
public CopyField toCopyField() { CopyField copyField = new CopyField(); copyField.setId(copyFieldId); copyField.setIndexFieldSource(getIndexFieldSource()); copyField.setIndexFieldDest(getIndexFieldDest()); copyField.setMaxChars(getMaxChars()); copyField.setSourceAllFields(isSourceAllFields()); return copyField; }