org.jtheque.books.persistence.dao.impl
Class DaoBooks

java.lang.Object
  extended by org.jtheque.core.managers.persistence.GenericDao<Book>
      extended by org.jtheque.books.persistence.dao.impl.DaoBooks
All Implemented Interfaces:
IDaoBooks, org.jtheque.core.managers.persistence.able.JThequeDao

public final class DaoBooks
extends org.jtheque.core.managers.persistence.GenericDao<Book>
implements IDaoBooks

A Dao implementation for books.

Author:
Baptiste Wicht

Field Summary
 
Fields inherited from interface org.jtheque.books.persistence.dao.able.IDaoBooks
BOOKS_AUTHOR_TABLE, TABLE
 
Constructor Summary
DaoBooks()
          Construct a new DaoBooks.
 
Method Summary
 void create(Book book)
          Create the book.
 Book createBook()
          Create an empty book.
 boolean delete(Book book)
          Delete the book.
 Collection<Book> getBooks()
          Return all the books.
protected  org.jtheque.core.managers.persistence.QueryMapper getQueryMapper()
           
protected  org.springframework.jdbc.core.simple.ParameterizedRowMapper<Book> getRowMapper()
           
protected  void load(int i)
           
protected  void loadCache()
           
 void save(Book book)
          Save the book.
 
Methods inherited from class org.jtheque.core.managers.persistence.GenericDao
addDataListener, clearAll, delete, get, getAll, getCache, isNotInCache, load, removeDataListener, setCacheEntirelyLoaded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jtheque.core.managers.persistence.able.JThequeDao
addDataListener, clearAll, removeDataListener
 

Constructor Detail

DaoBooks

public DaoBooks()
Construct a new DaoBooks.

Method Detail

getBooks

public Collection<Book> getBooks()
Description copied from interface: IDaoBooks
Return all the books.

Specified by:
getBooks in interface IDaoBooks
Returns:
A List containing all the books.

delete

public boolean delete(Book book)
Description copied from interface: IDaoBooks
Delete the book.

Specified by:
delete in interface IDaoBooks
Overrides:
delete in class org.jtheque.core.managers.persistence.GenericDao<Book>
Parameters:
book - The book to delete.
Returns:
true if the object is deleted else false.

save

public void save(Book book)
Description copied from interface: IDaoBooks
Save the book.

Specified by:
save in interface IDaoBooks
Overrides:
save in class org.jtheque.core.managers.persistence.GenericDao<Book>
Parameters:
book - The book to save.

create

public void create(Book book)
Description copied from interface: IDaoBooks
Create the book.

Specified by:
create in interface IDaoBooks
Overrides:
create in class org.jtheque.core.managers.persistence.GenericDao<Book>
Parameters:
book - The book to create.

getRowMapper

protected org.springframework.jdbc.core.simple.ParameterizedRowMapper<Book> getRowMapper()
Specified by:
getRowMapper in class org.jtheque.core.managers.persistence.GenericDao<Book>

getQueryMapper

protected org.jtheque.core.managers.persistence.QueryMapper getQueryMapper()
Specified by:
getQueryMapper in class org.jtheque.core.managers.persistence.GenericDao<Book>

loadCache

protected void loadCache()
Specified by:
loadCache in class org.jtheque.core.managers.persistence.GenericDao<Book>

load

protected void load(int i)
Specified by:
load in class org.jtheque.core.managers.persistence.GenericDao<Book>

createBook

public Book createBook()
Description copied from interface: IDaoBooks
Create an empty book.

Specified by:
createBook in interface IDaoBooks
Returns:
An empty book, not persisted.


Copyright © 2010 JTheque. All Rights Reserved.