From: Jon M. <jo...@te...> - 2006-06-16 13:03:43
|
True, so public static Event findEvent( String where ) etc. will return > Events for that sub class and casting will identify event_codes for > that type. But what if we use JDBC to query events table - we don't > have object info? Are you providing WS or other API for external > queries? > PersistentObject 101.... The object oriented nature of the Bodington data store is implemented like this.... All data object have a record in "objects" which holds the object unique ID and a number that indicates the type. Metainformation about the type is stored in classes and fields tables. A subclass of PersistentObject will have another table which repeats the unique ID in the first field so it can be linked to the record in "objects". A sub-sub-class has another table which also repeats the unique ID in the first field so that all three tables can be joined. A query in Bodington can return a heterogenous list of object, i.e. objects of different type. For example a list of various subclasses of Event can be compiled. An initial SQL query finds the IDs and types of the records in the "events" table and then loads each record. Since it now knows the type of each record it can join the correct three tables for each record. If you want to do a query outside of Bodington on the events it all depends on whether you really want the event type specific data. What are you trying to achieve? Jon |