// ----------> GENERATED FILE - DON'T TOUCH! <---------- // generator: ilarkesto.mda.legacy.generator.GwtEntityGenerator package scrum.client.project; import java.util.*; import ilarkesto.persistence.*; import ilarkesto.core.logging.Log; import ilarkesto.base.*; import ilarkesto.base.time.*; import ilarkesto.auth.*; import scrum.client.common.*; import ilarkesto.gwt.client.*; public abstract class GQuality extends scrum.client.common.AScrumGwtEntity { protected scrum.client.Dao getDao() { return scrum.client.Dao.get(); } public abstract boolean isEditable(); public GQuality() { } public GQuality(Map data) { super(data); updateProperties(data); } public static final String ENTITY_TYPE = "quality"; @Override public final String getEntityType() { return ENTITY_TYPE; } // --- project --- private String projectId; public final scrum.client.project.Project getProject() { if (projectId == null) return null; return getDao().getProject(this.projectId); } public final boolean isProjectSet() { return projectId != null; } public final Quality setProject(scrum.client.project.Project project) { String id = project == null ? null : project.getId(); if (equals(this.projectId, id)) return (Quality) this; this.projectId = id; propertyChanged("projectId", this.projectId); return (Quality)this; } public final boolean isProject(scrum.client.project.Project project) { return equals(this.projectId, project); } // --- number --- private int number ; public final int getNumber() { return this.number ; } public final Quality setNumber(int number) { if (isNumber(number)) return (Quality)this; this.number = number ; propertyChanged("number", this.number); return (Quality)this; } public final boolean isNumber(int number) { return equals(this.number, number); } private transient NumberModel numberModel; public NumberModel getNumberModel() { if (numberModel == null) numberModel = createNumberModel(); return numberModel; } protected NumberModel createNumberModel() { return new NumberModel(); } protected class NumberModel extends ilarkesto.gwt.client.editor.AIntegerEditorModel { @Override public String getId() { return "Quality_number"; } @Override public java.lang.Integer getValue() { return getNumber(); } @Override public void setValue(java.lang.Integer value) { setNumber(value); } @Override public void increment() { setNumber(getNumber() + 1); } @Override public void decrement() { setNumber(getNumber() - 1); } @Override protected void onChangeValue(java.lang.Integer oldValue, java.lang.Integer newValue) { super.onChangeValue(oldValue, newValue); addUndo(this, oldValue); } } // --- label --- private java.lang.String label ; public final java.lang.String getLabel() { return this.label ; } public final Quality setLabel(java.lang.String label) { if (isLabel(label)) return (Quality)this; this.label = label ; propertyChanged("label", this.label); return (Quality)this; } public final boolean isLabel(java.lang.String label) { return equals(this.label, label); } private transient LabelModel labelModel; public LabelModel getLabelModel() { if (labelModel == null) labelModel = createLabelModel(); return labelModel; } protected LabelModel createLabelModel() { return new LabelModel(); } protected class LabelModel extends ilarkesto.gwt.client.editor.ATextEditorModel { @Override public String getId() { return "Quality_label"; } @Override public java.lang.String getValue() { return getLabel(); } @Override public void setValue(java.lang.String value) { setLabel(value); } @Override public boolean isMandatory() { return true; } @Override public boolean isEditable() { return GQuality.this.isEditable(); } @Override public String getTooltip() { return "The label should be short (as it appears where the Quality is referenced), yet give a hint strong enough to make the content of it come to mind."; } @Override protected void onChangeValue(java.lang.String oldValue, java.lang.String newValue) { super.onChangeValue(oldValue, newValue); addUndo(this, oldValue); } } // --- description --- private java.lang.String description ; public final java.lang.String getDescription() { return this.description ; } public final Quality setDescription(java.lang.String description) { if (isDescription(description)) return (Quality)this; this.description = description ; propertyChanged("description", this.description); return (Quality)this; } public final boolean isDescription(java.lang.String description) { return equals(this.description, description); } private transient DescriptionModel descriptionModel; public DescriptionModel getDescriptionModel() { if (descriptionModel == null) descriptionModel = createDescriptionModel(); return descriptionModel; } protected DescriptionModel createDescriptionModel() { return new DescriptionModel(); } protected class DescriptionModel extends ilarkesto.gwt.client.editor.ATextEditorModel { @Override public String getId() { return "Quality_description"; } @Override public java.lang.String getValue() { return getDescription(); } @Override public void setValue(java.lang.String value) { setDescription(value); } @Override public boolean isEditable() { return GQuality.this.isEditable(); } @Override public boolean isRichtext() { return true; } @Override public String getTooltip() { return "The desctiption of a Quality should give detailled information on what the Quality is about and how it affects Storys that reference it."; } @Override protected void onChangeValue(java.lang.String oldValue, java.lang.String newValue) { super.onChangeValue(oldValue, newValue); addUndo(this, oldValue); } } // --- testDescription --- private java.lang.String testDescription ; public final java.lang.String getTestDescription() { return this.testDescription ; } public final Quality setTestDescription(java.lang.String testDescription) { if (isTestDescription(testDescription)) return (Quality)this; this.testDescription = testDescription ; propertyChanged("testDescription", this.testDescription); return (Quality)this; } public final boolean isTestDescription(java.lang.String testDescription) { return equals(this.testDescription, testDescription); } private transient TestDescriptionModel testDescriptionModel; public TestDescriptionModel getTestDescriptionModel() { if (testDescriptionModel == null) testDescriptionModel = createTestDescriptionModel(); return testDescriptionModel; } protected TestDescriptionModel createTestDescriptionModel() { return new TestDescriptionModel(); } protected class TestDescriptionModel extends ilarkesto.gwt.client.editor.ATextEditorModel { @Override public String getId() { return "Quality_testDescription"; } @Override public java.lang.String getValue() { return getTestDescription(); } @Override public void setValue(java.lang.String value) { setTestDescription(value); } @Override public boolean isEditable() { return GQuality.this.isEditable(); } @Override public boolean isRichtext() { return true; } @Override public String getTooltip() { return "The Test contains requirements that have to be met by the Team in order for a Story that references this Quality to be considered done."; } @Override protected void onChangeValue(java.lang.String oldValue, java.lang.String newValue) { super.onChangeValue(oldValue, newValue); addUndo(this, oldValue); } } // --- update properties by map --- public void updateProperties(Map props) { projectId = (String) props.get("projectId"); number = (Integer) props.get("number"); label = (java.lang.String) props.get("label"); description = (java.lang.String) props.get("description"); testDescription = (java.lang.String) props.get("testDescription"); } @Override public void storeProperties(Map properties) { super.storeProperties(properties); properties.put("projectId", this.projectId); properties.put("number", this.number); properties.put("label", this.label); properties.put("description", this.description); properties.put("testDescription", this.testDescription); } @Override public boolean matchesKey(String key) { if (super.matchesKey(key)) return true; if (matchesKey(getLabel(), key)) return true; if (matchesKey(getDescription(), key)) return true; if (matchesKey(getTestDescription(), key)) return true; return false; } }