org.domdrides.jpa.repository
Class JpaRepository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.jpa.support.JpaDaoSupport
          extended by org.domdrides.jpa.repository.JpaRepository<EntityType,IdType>
All Implemented Interfaces:
Repository<EntityType,IdType>, org.springframework.beans.factory.InitializingBean

public abstract class JpaRepository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>
extends org.springframework.orm.jpa.support.JpaDaoSupport
implements Repository<EntityType,IdType>


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
protected JpaRepository(java.lang.Class<EntityType> entityClass)
           
 
Method Summary
 EntityType add(EntityType entity)
           
 boolean contains(EntityType entity)
           
 java.util.Set<EntityType> getAll()
           
 EntityType getById(IdType id)
           
 void remove(EntityType entity)
           
 EntityType update(EntityType entity)
           
 
Methods inherited from class org.springframework.orm.jpa.support.JpaDaoSupport
checkDaoConfig, createJpaTemplate, createJpaTemplate, getJpaTemplate, setEntityManager, setEntityManagerFactory, setJpaTemplate
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JpaRepository

protected JpaRepository(java.lang.Class<EntityType> entityClass)
Method Detail

add

public EntityType add(EntityType entity)
Specified by:
add in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

contains

public boolean contains(EntityType entity)
Specified by:
contains in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

getAll

public java.util.Set<EntityType> getAll()
Specified by:
getAll in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

getById

public EntityType getById(IdType id)
Specified by:
getById in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

remove

public void remove(EntityType entity)
Specified by:
remove in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>

update

public EntityType update(EntityType entity)
Specified by:
update in interface Repository<EntityType extends Entity<IdType>,IdType extends java.io.Serializable>


Copyright © 2008. All Rights Reserved.