You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Thomas Fox <Th...@seitenbau.net> on 2012/08/26 12:44:52 UTC
Changed default constructors of generated PeerImpl
Before BasePeerImpl was generified, the BasePeerImpl had a constructor
which worked without additional setters. The implementation of the
generification changed that (it needed the injection of TableMap,
RecordMapper, databaseName after construction).
This made the usage of the PeerImpl casses as standalone classes more
comlicated. To change that, I made the default constructor read its table
map, database name and record mapper from the static generated peer class.
For those which do not want to have this, I introduced another constructor
to which these resources can be passed as input.
I am aware that this introduces direct dependencies from the generated
PeerImpl classes to the Peer classes, but as Torque will not work with out
the generated peer classes anyway I think it's ok. Besides that people can
use the other constructor.
Thomas V, please check whether the solution is ok for you. Personally, I
believe that even the setters for table map, database name and record
mapper can be removed from BasePeerImpl.
If that discussion is through, I believe that we can set TORQUE-220 to
resolved.
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
Re: Changed default constructors of generated PeerImpl
Posted by Thomas Vandahl <tv...@apache.org>.
On 26.08.12 12:44, Thomas Fox wrote:
> Thomas V, please check whether the solution is ok for you. Personally, I
> believe that even the setters for table map, database name and record
> mapper can be removed from BasePeerImpl.
I just chose to call the other constructor. Other than that, all is
fine. I'd leave the setters in for orthogonality of the interface and
the possibility to override them (if you want to do additional checks,
for example)
Bye, Thomas.
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org