net.sourceforge.mystique.infrastructure.persistence
Class ComponentJpaRepository

java.lang.Object
  extended by net.sourceforge.mystique.infrastructure.persistence.JpaRepository<Component,java.lang.Long>
      extended by net.sourceforge.mystique.infrastructure.persistence.ComponentJpaRepository
All Implemented Interfaces:
ComponentRepository, SimpleRepository<Component,java.lang.Long>

@Repository
public class ComponentJpaRepository
extends JpaRepository<Component,java.lang.Long>
implements ComponentRepository

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

Field Summary
 
Fields inherited from class net.sourceforge.mystique.infrastructure.persistence.JpaRepository
entityManager
 
Constructor Summary
ComponentJpaRepository()
           
 
Method Summary
 Component findById(java.lang.Long id)
           
 java.util.List<Component> findByProject(Project project, int offset, int limit)
           
 Component findByProjectAndName(Project project, java.lang.String name)
           
 void store(Component component)
           
 
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

ComponentJpaRepository

public ComponentJpaRepository()
Method Detail

findById

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

findByProject

@Transactional(readOnly=true)
public java.util.List<Component> findByProject(Project project,
                                                             int offset,
                                                             int limit)
                                        throws RepositoryException
Specified by:
findByProject in interface ComponentRepository
Throws:
RepositoryException

findByProjectAndName

@Transactional(readOnly=true)
public Component findByProjectAndName(Project project,
                                                    java.lang.String name)
                               throws RepositoryException
Specified by:
findByProjectAndName in interface ComponentRepository
Throws:
RepositoryException

store

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


Copyright © 2010. All Rights Reserved.