Created
October 16, 2014 15:26
-
-
Save gabanox/49b274f7d871640af447 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 18, 2011 | |
*/ | |
package com.company.app.service; | |
import java.util.List; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Repository; | |
import org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Transactional; | |
import com.company.app.domain.Contact; | |
import com.company.app.repository.ContactRepository; | |
import com.google.common.collect.Lists; | |
@Service("springJpaContactService") | |
@Repository | |
@Transactional | |
public class ContactServiceImpl implements ContactService { | |
@Autowired | |
private ContactRepository contactRepository; | |
@Transactional(readOnly=true) | |
public List<Contact> findAll() { | |
return Lists.newArrayList(contactRepository.findAll()); | |
} | |
@Transactional(readOnly=true) | |
public List<Contact> findByFirstName(String firstName) { | |
return contactRepository.findByFirstName(firstName); | |
} | |
@Transactional(readOnly=true) | |
public List<Contact> findByFirstNameAndLastName(String firstName, | |
String lastName) { | |
return contactRepository.findByFirstNameAndLastName(firstName, lastName); | |
} | |
public List<Contact> findAllWithDetail() { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
public Contact findById(Long id) { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
public Contact save(Contact contact) { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
public void delete(Contact contact) { | |
// TODO Auto-generated method stub | |
} | |
public List<Contact> findAllByNativeQuery() { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
public List<Contact> findByCriteriaQuery(String firstName, String lastName) { | |
// TODO Auto-generated method stub | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment