public interface Persistable
Modifier and Type | Method and Description |
---|---|
Object[] |
getGeneratedKeys()
This method will return the automatically generated key for the insert if
one was triggered, or 'null' otherwise.
|
int |
persist(Connection aConn)
This method can be called to store the implemnted objects state to a persistent
store for the first time (equivalent to SQL 'INSERT').
|
int persist(Connection aConn) throws SQLException
aConn
- The Connection on which to execute SQL statements.
It should be an open connection and the implementation
should refrain from closing it, so the caller can reuse it.SQLException
- When the insert fails (e.g.: connection gone stale).Object[] getGeneratedKeys()
Copyright © 2016. All rights reserved.