Created
August 19, 2012 10:03
-
-
Save jadianes/3394093 to your computer and use it in GitHub Desktop.
The DAO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.jadianes.samples.genericdao.dao; | |
import com.jadianes.samples.genericdao.transfer.TransferEntity; | |
/** | |
* The Dao represents the DataAccessObject (Dao) in the Dao pattern. It is generified so it is associated | |
* will a specific TransferEntity (TransferEntity in the Dao pattern) that will create, update, persist, etc.The interface | |
* enforces the minimum set of operations needed to deal with TransferEntity instances. | |
* Other methods can be used under the following conventions: | |
*/ | |
public interface Dao<K, E extends TransferEntity<K>> { | |
public E create(); | |
public E get(K key); | |
public void delete(K key); | |
public void update(E e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment