db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject RFD: RecordMappers, Peers and MapBuilders
Date Tue, 10 Jul 2012 19:39:55 GMT
Hi folks,

when fiddling with the LargeSelect class I stumbled across the necessity
to add SELECT columns as well as the requirement of a RecordMapper. I
came to think that it would be helpful to concentrate the information
about a table and its structure into one class, preferably not with
static methods. Currently, this information is distributed over three
classes, the RecordMapper, the Peer and the MapBuilder.

I believe that this might even help to reduce the amount of code that
needs to be generated by using sophisticated generics. Just some thoughts:

- RecordMapper provides a List of Column objects that can be used by the
Peer (or LargeSelect, for that matter).
- The BasePeerImpl<T> gets a static member variable of type RecordMapper<T>.
- The MapBuilder could be merged into the RecordMapper, no longer static
- Several PeerImpl methods could be moved into BasePeerImpl<T>

What do you think?

Bye, Thomas.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message