Skip to content

Instantly share code, notes, and snippets.

@gabanox
Created October 16, 2014 13:37
Show Gist options
  • Save gabanox/7ece6286d3b7c5dec9bf to your computer and use it in GitHub Desktop.
Save gabanox/7ece6286d3b7c5dec9bf to your computer and use it in GitHub Desktop.
package com.company.hibernate.dao;
import java.util.List;
import com.company.hibernate.domain.Contact;
public interface ContactDao {
// Find all contacts
public List<Contact> findAll();
// Find all contacts with telephone and hobbies
public List<Contact> findAllWithDetail();
// Find a contact with details by id
public Contact findById(Long id);
// Insert or update a contact
public Contact save(Contact contact);
// Delete a contact
public void delete(Contact contact);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment