/** * Convenient method to execute an update given two int args. */ public int update(int p1, int p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
/** * Convenient method to execute an update given two String args. */ public int update(String p1, String p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
/** * Convenient method to execute an update given one String arg. */ public int update(String p) throws DataAccessException { return update(new Object[] {p}); }
/** * Convenience method to execute an update with no parameters. */ public int update() throws DataAccessException { return update(new Object[0]); }
/** * Convenient method to execute an update given one int arg. */ public int update(int p1) throws DataAccessException { return update(new Object[] {p1}); }
/** * Convenient method to execute an update given one long arg. */ public int update(long p1) throws DataAccessException { return update(new Object[] {p1}); }
/** * Convenient method to execute an update given two long args. */ public int update(long p1, long p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
/** * Convenient method to execute an update given two long args. */ public int update(long p1, long p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
/** * Convenient method to execute an update given one String arg. */ public int update(String p) throws DataAccessException { return update(new Object[] {p}); }
protected void delete(Long aclObjectIdentity, String recipient) throws DataAccessException { super.update(new Object[] {aclObjectIdentity, recipient}); } }
protected void insert(Long aclObjectIdentity, String recipient, Integer mask) throws DataAccessException { Object[] objs = new Object[] {aclObjectIdentity, recipient, mask}; super.update(objs); } }
protected void insert(String objectIdentity, Long parentAclObjectIdentity, String aclClass) throws DataAccessException { Object[] objs = new Object[] {objectIdentity, parentAclObjectIdentity, aclClass}; super.update(objs); } }
/** * Convenience method to execute an update with no parameters. */ public int update() throws DataAccessException { return update((Object[]) null); }
/** * Convenient method to execute an update given one int arg. */ public int update(int p1) throws DataAccessException { return update(new Object[] {p1}); }
/** * Convenient method to execute an update given two String args. */ public int update(String p1, String p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
/** * Convenient method to execute an update given one long arg. */ public int update(long p1) throws DataAccessException { return update(new Object[] {p1}); }
/** * Convenient method to execute an update given two int args. */ public int update(int p1, int p2) throws DataAccessException { return update(new Object[] {p1, p2}); }
protected void update(Long aclPermissionId, Integer newMask) throws DataAccessException { super.update(newMask.intValue(), aclPermissionId.intValue()); } }
public int go() { return super .update(conference.getSlug(), conference.getName(), conference.getDescription(), new java.sql.Timestamp(conference.getStartedDate() .getTime()), new java.sql.Timestamp( conference.getEndedDate().getTime()), conference.getId()); } }
SqlUpdate insert = new SqlUpdate(ds, "INSERT INTO company (name) VALUES (?)"); insert.declareParameter(new SqlParameter(Types.VARCHAR)); insert.setReturnGeneratedKeys(true); // assuming auto-generated col is named 'id' insert.setGeneratedKeysColumnNames(new String[] {"id"}); insert.compile(); .... GeneratedKeyHolder keyHolder = new GeneratedKeyHolder(); insert.update(new Object[]{"test"}, keyHolder); System.out.println(keyHolder.getKey().longValue());