return retVal;
}
public UserID addUser(UserInfo newUser) {
UserID retVal = null;
Connection connection = null;
try {
String sql = "insert into bpm_userinfo values( ?, ?, ?, ?, ? )";
int userID = generateKey();
connection = getConnection();
connection.setAutoCommit(false);
PreparedStatement statement = connection.prepareStatement( sql );
statement.setInt( 1, userID );
statement.setString( 2, newUser.getUserName() );
statement.setString( 3, newUser.getUserPassword() );
statement.setString( 4, newUser.getUserPrincipal() );
statement.setBoolean( 5, newUser.isAdmin() );
statement.execute();
connection.commit();
statement.close();
retVal = new UserID( userID );
} catch( SQLException e ) {
throw new RuntimeException( e );
}
finally {
if (connection != null) {