Hi,
I found this article https://dzone.com/articles/activeobjects-easier-java-orm which describes how to put some business logic in an AO. The example is
@Implementation(CompanyImpl.class)
public interface Company extends Entity {
// ...
}
public class CompanyImpl {
private Company company;
public CompanyImpl(Company company) {
this.company = company;
}
public void setName(String name) {
company.setName(name);
name = name.trim();
if (name.length() > 4) {
company.setTickerSymbol(name.substring(0, 4).toUpperCase());
} else {
company.setTickerSymbol(name.toUpperCase());
}
}
}
in which Company is an Active Object that contains getName(..) and setName(..). Should this also work with Atlassian Active Objects? Is there another way how I can put some business logic in an Atlassian AO?
Thanks!