|
From: <jm...@ch...> - 2005-05-19 21:05:06
|
Following the advice from Rod at: http://forum.springframework.org/viewtopic.php?t=3957 I have started work on implementing support for torque in Spring. Following the pattern of what is out there already i have created stubbed out classes for 2 packages: org.springframework.orm.torque -TorqueAccessor -TorqueCallback -TorqueOperations -TorqueJDBCException -TorqueTemplate org.springframework.orm.torque.support -TorqueDaoSupport Following the current design patterns in the other Spring ORM implementations, i coded the TorqueOperations interface. The methods defined in it are the methods that Torque makes available to it's persistence classes defined in org.apache.torque.util.BasePeer. In the template i plan to delegate the calls into template methods to a BasePeer object (POJO with all static methods). Something like this: Code: public List doSelect(org.apache.torque.util.Criteria criteria) throws DataAccessException { List returnList = null; try { returnList = this.getTorqueBasePeer().doSelect(criteria); } catch (TorqueException e) { convertTorqueAccessException(e); } return returnList; } Is this a correct approach? Is there any place i can share this code with others that are interested? -jm |