Here is a list of some of the useful, if minor, features I've added to
Castor in the last couple of weeks. If anybody is interested, I can send
them a diff -c of the files that I've modified.
1. Added support for PoolDataSource objects, allowing me to use
JDK1.3/JDBC2.0 pooled connections (JDBC drivers which support JDBC 2.0
usually have pooling built in, and I wished to use that built in pooling,
instead of using some other 3rd party pooling code).
2. Added support for mytype.Guid as a Castor type (so Castor can map it
to a database column). Castor currently, as far as I can tell, doesn't
support mapping custom java types to known database column types.
mytype.Guid is a simple type with a simple mapping, and I added it directly
to the code. If I have time, I think I am going to see what I can do to
generalize adding custom java types, but I think I'll wait until after the
refactoring.
3. Allow Castor to support fields that begin with '_' seamlessly
(unsure if this works in all cases). One of the standards we use is that
all class fields we use begin with an '_'. Castor will not map these
correctly. Now it does, simply by ignoring any leading '_' characters on a
field. I'm not sure if this change has larger ramifications, but I haven't
noticed any yet (but then I'm not pounding on the code).
4. Allow Castor to read private fields directly (don't limit all direct
access to public fields). I want to use my getter and setter methods to
transform my fields into business-level objects and/or values. The fields
themselves should hold exactly what the database values are. Needless to
say, I don't wish to expose my fields, so I've simply commented out Castor's
check to insure the fields are public (as well as setting the field
accessible).
5. Support nested field access. In other words, just like for method
access, allow direct access to nested fields, directly accessing all of the
fields in a chain to the final, contained field. For example, if I have a
class Foo with field _bar of type Bar, which has a field _string of type
String, I want to have direct field access to _string from class Foo. So,
Foo._bar._string would be accessible to Castor JDO. Castor already supports
this type of access using accessor methods, but not through direct field
access. I've extended it to support fields.
Again, if anybody is interested in the above changes, drop me a line.
jvc
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev