I would appreciate if people would look over and try to understand the new design.I would like to get as much input into this stuff as possible. My goal was to cleanly seperate logic that is general to Hibernate's model of entities/components/values/collections from code that implements a particular strategy for persisting an entity. The most pressing need for this was to support different mapping strategies like the normalized table-per-subclass mapping. However, there are other (hypothetical) examples of how "persistence strategies" might be useful:
* an entity is persisted by stored procedure calls * an entity is persisted to LDAP * an entity persists instance variables with no property accessors Now I don't propose that Hibernate would have built-in with persistence strategies to address these cases (I view them as out-of-scope). However, it would be nice to have an API we could point to and say: if you need to do something different, implement this interface. So I've added two new packages. * the cirrus.hibernate.persister package defines - the contract between the session and persistence strategies (ClassPersister) - the contract between QueryTranslator and a persistence strategy that supports querying (Queryable) - the contract between Loader and a persistence strategy that supports built-in loading - a default persistence strategy (EntityPersister) * the cirrus.hibernate.loader package defines the built-in loading mechanisms, which may or may not be used by a particular persistence strategy - Loader implements the most generic logic used by all built-in loaders and the QueryTranslator - OuterJoinLoader implements logic for loading a graph of associated objects using outerjoins - etc. As part of all that, I moved a lot of code around (and rewrote some bad code) and cleaned up a number of internal interfaces. SessionImpl is now completely abstracted from generated SQL and almost completely abstracted from JDBC. Then only remaining code dealing with JDBC is the code that does batching (which I dont know where else to put). Critiques are very welcome :) Gavin ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel