T
- type of manipulated business objectpublic abstract class DaoForEntityWithSurrogateKey<T extends EntityWithSurrogateKey> extends DaoTemplate<T> implements DaoSortableDataProvidable<T>
Modifier and Type | Field and Description |
---|---|
protected static String |
KEY_COLUMN |
logger, TABLE_NAME_PREFIX
Constructor and Description |
---|
DaoForEntityWithSurrogateKey() |
Modifier and Type | Method and Description |
---|---|
void |
delete(Integer id)
Delete a record by primary key.
|
void |
delete(T item)
Deletes the database record represented by the given business object.
|
protected void |
deleteRaw(Integer id)
Deletes a record from
DaoTemplate.getTableName() table with the given id. |
protected int |
getLastInsertId()
Returns the last assigned identity column value in the clean database instance.
|
T |
load(Integer id)
Loads the business entity by primary key.
|
void |
save(T item)
Saves a business object to the database.
|
int |
saveAndGetKey(T item)
Saves a business entity to the database and returns its primary key.
|
copyBetweenTablesBy, getRowMapper, getSelectAndFromClause, getTableName, loadAll, loadAllBy, loadAllBy, loadBy, postLoadAllBy, postLoadBy
boolToSmallint, createVirtuosoConnectionWrapper, executeInTransaction, getLookupFactory, jdbcQuery, jdbcQuery, jdbcQueryForInt, jdbcQueryForInt, jdbcQueryForInt, jdbcQueryForList, jdbcQueryForObject, jdbcQueryForObject, jdbcQueryForObject, jdbcQueryForObject, jdbcUpdate, jdbcUpdate, jdbcUpdate, setDaoLookupFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
loadAllBy
protected static final String KEY_COLUMN
protected void deleteRaw(Integer id) throws Exception
DaoTemplate.getTableName()
table with the given id.id
- idException
public T load(Integer id)
load
in interface DaoSortableDataProvidable<T extends EntityWithSurrogateKey>
public final void delete(T item) throws Exception
Exception
public final void delete(Integer id) throws Exception
Exception
public void save(T item) throws Exception
UnsupportedOperationException
.Exception
public int saveAndGetKey(T item) throws Exception
Exception
Copyright © 2013. All Rights Reserved.