connection.setAutoCommit(false);
PreparedStatement statement = connection.prepareStatement( sql );
statement.setInt( 1, taskID );
UserID userID = task.getUserID();
if (userID == null) {
statement.setNull( 2, Types.INTEGER);
}
else {
statement.setInt( 2, userID.getID() );
}
GroupID groupID = task.getGroupID();
if (groupID == null) {
statement.setNull( 3, Types.INTEGER);
}