[Building Sakai] Sakai BasicSQLService - Can we add dbUpdate() Methods?

csev csev at umich.edu
Tue Jul 19 20:46:02 PDT 2011


On Jul 19, 2011, at 10:07 PM, Steve Swinsburg wrote:

> Agreed, for existing apps that are already heavily bound to Sakai's SqlService that wanted to make a change, this should be done. 
> 
> But for any new apps being developed, better directions can be taken in the persistence layer.

I found this page:

https://confluence.sakaiproject.org/display/BOOT/Spring+JDBC+Info

This a pretty direct example:

https://source.sakaiproject.org/contrib/programmerscafe/trunk/tasklist-simple/tool/src/java/org/sakaiproject/tool/tasklist/impl/TaskListManagerJdbcImpl.java

But this file is a little obtuse:

https://source.sakaiproject.org/contrib/programmerscafe/trunk/tasklist-simple/tool/src/webapp/WEB-INF/spring-beans.xml

Is there a simple direct way to get my hands on a properly provisioned jdbcTemplate so statements like the following work:

getJdbcTemplate().update(TASK_UPDATE_QUERY,
		new Object[] {t.getOwner(), t.getSiteId(), t.getTask(), t.getId()},
		new int[] {Types.VARCHAR, Types.VARCHAR, Types.CLOB, Types.BIGINT});
I would also observe that the array of types is an extra effort beyond JDBC - seems a bit redundant to have to list each type.

/Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110719/80aea3d1/attachment.html 


More information about the sakai-dev mailing list