1 package org.objectstyle.cayenne.modeler.dialog.classgen; 2 3 import org.objectstyle.cayenne.map.ObjEntity; 4 5 8 public class ClassGeneratorEntityWrapper { 9 protected ObjEntity entity; 10 protected boolean selected; 11 protected String validationMessage; 12 13 public ClassGeneratorEntityWrapper(ObjEntity entity, boolean selected) { 14 this(entity, selected, null); 15 } 16 17 public ClassGeneratorEntityWrapper(ObjEntity entity, boolean selected, String validationMessage) { 18 this.entity = entity; 19 this.selected = selected; 20 this.validationMessage = validationMessage; 21 } 22 23 27 public ObjEntity getEntity() { 28 return entity; 29 } 30 31 35 public boolean isSelected() { 36 return selected; 37 } 38 39 43 public void setEntity(ObjEntity entity) { 44 this.entity = entity; 45 } 46 47 51 public void setSelected(boolean selected) { 52 this.selected = selected; 53 } 54 55 59 public boolean isEnabled() { 60 return validationMessage == null; 61 } 62 63 67 public String getValidationMessage() { 68 return validationMessage; 69 } 70 71 75 public void setValidationMessage(String validationMessage) { 76 this.validationMessage = validationMessage; 77 } 78 } 79 | Popular Tags |