On Dec 16, 2008, at 12:13 AM, Robert Zeigler wrote:

I love the new "Map" classes that provide super-easy access to your data map and associated queries. I think a nice extension to these would be to have teh super-class map list, as static finals, the names of all of the queries (even the sql-script queries), the way we do with object entities and property names.

This was the first experiment with generated classes for the DataMaps. We definitely want to explore it further. +1 for adding DataMap names and Query names.

I was also thinking about making the generated classes "managed" (i.e. obtained via a context) instead of static singletons. Still want to play with various scenarios to see how useful that is... Here is one possible scenario - specifying the root of an entity-less query:

// common interface
public interface DataMapObject {
   DataMap getDataMap();
}

T ObjectContext.getDataMap(Class<T extends DataMapObject> generatedClass);
SQLTemplate.SQLTemplate(DataMapObject map, String sqlString);


Unless I hear otherwise, I'll plan on opening up issues for these items.

+1.

Andrus

Reply via email to