se.vgregion.dao.domain.patterns.repository.db.jpa
Class DefaultJpaRepository<T extends Entity<T,Long>>

java.lang.Object
  extended by se.vgregion.dao.domain.patterns.repository.db.jpa.AbstractJpaRepository<T,Long,Long>
      extended by se.vgregion.dao.domain.patterns.repository.db.jpa.DefaultJpaRepository<T>
All Implemented Interfaces:
DatabaseRepository<T,Long,Long>, JpaRepository<T,Long,Long>, Repository<T,Long>

public abstract class DefaultJpaRepository<T extends Entity<T,Long>>
extends AbstractJpaRepository<T,Long,Long>

A convenient implementation of JpaRepository where Entity ID and database primary key(PK) are equal and of type Long. Use this when PK=ID=Long to get find(ID) and remove(ID) implemented.

Author:
Anders Asplund - Callista Enterprise

Field Summary
 
Fields inherited from class se.vgregion.dao.domain.patterns.repository.db.jpa.AbstractJpaRepository
entityManager, type
 
Constructor Summary
DefaultJpaRepository()
           
 
Method Summary
 T find(Long id)
          
 void remove(Long id)
          
 
Methods inherited from class se.vgregion.dao.domain.patterns.repository.db.jpa.AbstractJpaRepository
clear, contains, findAll, findByNamedQuery, findByNamedQuery, findByPrimaryKey, findInstanceByNamedQuery, findInstanceByNamedQuery, flush, merge, persist, refresh, remove, removeByPrimaryKey, setType, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultJpaRepository

public DefaultJpaRepository()
Method Detail

find

public T find(Long id)

Specified by:
find in interface Repository<T extends Entity<T,Long>,Long>
Overrides:
find in class AbstractJpaRepository<T extends Entity<T,Long>,Long,Long>

remove

public void remove(Long id)

Specified by:
remove in interface Repository<T extends Entity<T,Long>,Long>
Overrides:
remove in class AbstractJpaRepository<T extends Entity<T,Long>,Long,Long>


Copyright © 2010. All Rights Reserved.