net.sourceforge.mystique.infrastructure.persistence
Class UserJpaRepository

java.lang.Object
  extended by net.sourceforge.mystique.infrastructure.persistence.JpaRepository<User,java.lang.Long>
      extended by net.sourceforge.mystique.infrastructure.persistence.UserJpaRepository
All Implemented Interfaces:
Repository<User,java.lang.Long>, SimpleRepository<User,java.lang.Long>, UserRepository

@Repository
public class UserJpaRepository
extends JpaRepository<User,java.lang.Long>
implements UserRepository

Author:
Elias Gomes [eliasgomes@users.sourceforge.net]

Field Summary
 
Fields inherited from class net.sourceforge.mystique.infrastructure.persistence.JpaRepository
entityManager
 
Fields inherited from interface net.sourceforge.mystique.domain.repository.Repository
LARGE_RESULT, MEDIUM_RESULT, SMALL_RESULT
 
Constructor Summary
UserJpaRepository()
           
 
Method Summary
 java.util.List<User> findAll(int offset, int limit)
           
 User findByEmail(java.lang.String email)
           
 User findById(java.lang.Long id)
           
 void store(User user)
           
 
Methods inherited from class net.sourceforge.mystique.infrastructure.persistence.JpaRepository
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.mystique.domain.repository.SimpleRepository
remove
 

Constructor Detail

UserJpaRepository

public UserJpaRepository()
Method Detail

findById

@Transactional(readOnly=true)
public User findById(java.lang.Long id)
              throws RepositoryException
Specified by:
findById in interface SimpleRepository<User,java.lang.Long>
Throws:
RepositoryException

findAll

@Transactional(readOnly=true)
public java.util.List<User> findAll(int offset,
                                                  int limit)
                             throws RepositoryException
Specified by:
findAll in interface Repository<User,java.lang.Long>
Throws:
RepositoryException

findByEmail

@Transactional(readOnly=true)
public User findByEmail(java.lang.String email)
                 throws RepositoryException
Specified by:
findByEmail in interface UserRepository
Throws:
RepositoryException

store

@Transactional
public void store(User user)
           throws RepositoryException
Specified by:
store in interface SimpleRepository<User,java.lang.Long>
Throws:
RepositoryException


Copyright © 2010. All Rights Reserved.