Skip to content

Instantly share code, notes, and snippets.

@jadianes
Created August 19, 2012 10:03
Show Gist options
  • Save jadianes/3394093 to your computer and use it in GitHub Desktop.
Save jadianes/3394093 to your computer and use it in GitHub Desktop.
The DAO
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