There are some classes in which some rows are "special" and need to be statically bound to, but most rows are not. In the NAQT project, for example, we often needed the special Org rows for "None" and "NAQT", but we certainly wouldn't want to generate static bindings for all the tens of thousands of Orgs.
This can be faked by adding to the UserFacing-subinterface (e.g., Org.java) something like this:
public static Org NONE() {return OrgFactory.getInstance().forId(1);}
but writing that manually is inelegant. It would be cool if Opal could be given a query and a column, e.g.,
There are some classes in which some rows are "special" and need to be statically bound to, but most rows are not. In the NAQT project, for example, we often needed the special Org rows for "None" and "NAQT", but we certainly wouldn't want to generate static bindings for all the tens of thousands of Orgs.
This can be faked by adding to the UserFacing-subinterface (e.g.,
Org.java
) something like this:but writing that manually is inelegant. It would be cool if Opal could be given a query and a column, e.g.,
(the latter attribute meaning "use the
short_name
column as the source for the static method name", since Org doesn't have acode
column).