db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject BasePeerImpl, was: Re: RFD: RecordMappers, Peers and MapBuilders
Date Wed, 18 Jul 2012 18:08:26 GMT
On 17.07.12 10:41, Thomas Fox wrote:
> Regarding the Peer and PeerImpl classes, of course we can go back to just
> static methods, with all their problems (e.g. cannot be exchanged on
> runtime, e.g. for unit testing).

I had a quick look over the code. I'd like to give some ideas and ask
some questions:
- I'd inject a RecordMapper<T>, the database name and a TableMap on
creation of the instance (setters and/or constructor)
- Move setDBName() to BasePeerImpl
- Move addSelectColumns() to BasePeerImpl by using TableMap.getColumns()
- Provide some kind of default record mapper/default record to make
calls like in doSelectVillageRecords() work again.
- Remove the record mapper and the table map from the various method
signatures
- Remove the then obsolete methods in the generated PeerImpls.
WDYT? Stop me or I'll do it. :-)

Question:
- Why do we have deprecated methods in a class that didn't even exist in
Torque 3.3? Is it just for keeping the old Criteria object alive?

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