We have developed a simple wrapper for Torque that allows integration with 
the Spring Framework.  By using it, you get some support for Generics. 

https://torque-spring.dev.java.net/

Currently we support a simple set of methods.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 

 package org.springmodules.orm.torque;

import java.util.List;

import org.apache.torque.om.BaseObject;

public interface TorqueExternalOperations extends TorqueOperations {

  <T extends BaseObject> T create(Class<T> torqueObjectClass) throws 
TorqueSpringException;

  <T extends BaseObject> List<T> find(Class<T> torqueObjectClass, int[] 
ids) throws TorqueSpringException;

  <T extends BaseObject> T find(Class<T> torqueObjectClass, int id) throws 
TorqueSpringException;

  <T extends BaseObject> void remove(T persistableObject) throws 
TorqueSpringException;

  <T extends BaseObject> void save(T persistableObject) throws 
TorqueSpringException;

  <T extends BaseObject> T copy(final T object) throws 
TorqueSpringException;

}

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Note  this framework it is not replacement for torque
it is just adds extra functionality typical for springframework.

We are looking for reviews/suggestions for expansion/improvement  any peer 
review would be appreciated.

Reply via email to