Created
October 16, 2014 15:26
-
-
Save gabanox/739ecbd3e74b66c6527f to your computer and use it in GitHub Desktop.
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
/** | |
* Created on Oct 17, 2011 | |
*/ | |
package com.company.app.service; | |
import java.util.List; | |
import com.company.app.domain.Contact; | |
public interface ContactService { | |
// 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); | |
// Find all contacts by native query | |
public List<Contact> findAllByNativeQuery(); | |
// Find contacts by criteria query | |
public List<Contact> findByCriteriaQuery(String firstName, String lastName); | |
// Find contacts by first name | |
public List<Contact> findByFirstName(String firstName); | |
// Find contacts by first name and last name | |
public List<Contact> findByFirstNameAndLastName(String firstName, String lastName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment