org.nakedobjects.example.expenses.claims.ProjectCode Maven / Gradle / Ivy
The newest version!
package org.nakedobjects.example.expenses.claims;
import org.nakedobjects.applib.AbstractDomainObject;
import org.nakedobjects.applib.annotation.Bounded;
import org.nakedobjects.applib.annotation.Immutable;
import org.nakedobjects.applib.annotation.When;
@Bounded
@Immutable(When.ONCE_PERSISTED)
public class ProjectCode extends AbstractDomainObject {
// {{ Title & Icon
public String title() {
StringBuilder t = new StringBuilder();
t.append(getCode()).append(" ").append(getDescription());
return t.toString();
}
public String iconName() {
return "Look Up";
}
// }}
// {{ Code
private String code;
public String getCode() {
resolve(code);
return this.code;
}
public void setCode(String code) {
this.code = code;
objectChanged();
}
// }}
// {{ Description
private String description;
public String getDescription() {
resolve(description);
return this.description;
}
public void setDescription(String description) {
this.description = description;
objectChanged();
}
// }}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy