704476323e9fbc0bba4766e4a5b21dda0bcace04
A little bit back Mike added a fast-path for Key construction for keys with one Comparable. Keys with multiple values would still validate the order every time. This was necessary even when using the generated factory because Class' getFields() does not guarantee any order. In practice, the Sun JVM seems to return them in declared order, but apparently other JVMs may not. The arguments to getKey() are determined when 'genrecord' is run, but the field order used during runtime is computed at runtime. This change generates code that stashes the key fields in an order deteremined at the time 'genrecord' is run and that is guaranteed to match the argument order to each PersistentRecord subclass' getKey(). Thus, getKey() can now directly construct a key with minimal overhead. The field order is still computed at runtime as a fallback for PersistentRecord classes that haven't yet been updated. The ordering of getFields() is still being relied upon at 'genrecord' time, but Mike may introduce a patch that will guarantee that ordering matches declaration order. In the meantime, it's no worse than before and if somehow someone does run 'genrecord' with an alternate JVM they should immediately notice the discrepency in their diffs. The Key constructor utilized is still public because it is used by DepotUtil. A nice change would be to make it package-private.
Depot Persistence Library ------------------------- Depot is a relational persistence library for Java. It is an ORM library, but has aims that are somewhat different from the popular "managed" persistence libraries like Hibernate and others. Website ------- See the Depot website for documentation and other info: http://code.google.com/p/depot/ Building -------- The library is built using ant. It can be found here: http://jakarta.apache.org/ant/ Next, ensure that the necessary third party jar files are copied to the lib/ directory. See etc/libs-incl.xml for the list of those jar files. Finally invoke 'ant dist' to compile the code and generate a jar file. Invoke 'ant -p' to see information on other build targets. Depot also provides .classpath and .project files for Eclipse users which require that you set an EXT_LIBS_DIR variable indicating the location of the external jar dependencies. The Depot Eclipse project also depends on the Eclipse project for the samskivert library. That library can be found at: http://code.google.com/p/samskivert/ License and Distribution ------------------------ Depot is released under the LGPL. This means you are free to use Depot on any project, open source or proprietary, but that any modifications made to the library must be made available to the maintainers. See COPYING for more detailed information. The most recent version of the Depot source code is available at the website listed above. $Id$
Description
Languages
Java
95.6%
Shell
4.3%