org.domdrides.jpa.repository
Class JpaRepository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
java.lang.Object
org.domdrides.jpa.repository.JpaRepository<EntityType,IdType>
- All Implemented Interfaces:
- org.domdrides.repository.PageableRepository<EntityType,IdType>, org.domdrides.repository.Repository<EntityType,IdType>
@Repository
public abstract class JpaRepository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
- extends Object
- implements org.domdrides.repository.PageableRepository<EntityType,IdType>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JpaRepository
protected JpaRepository(Class<EntityType> entityClass)
list
@Transactional(readOnly=true)
public List<EntityType> list(int first,
int max,
String sortProperty,
boolean ascending)
- Specified by:
list
in interface org.domdrides.repository.PageableRepository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
add
@Transactional
public EntityType add(EntityType entity)
- Specified by:
add
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
contains
@Transactional(readOnly=true)
public boolean contains(EntityType entity)
- Specified by:
contains
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
getAll
@Transactional(readOnly=true)
public Set<EntityType> getAll()
- Specified by:
getAll
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
getById
@Transactional(readOnly=true)
public EntityType getById(IdType id)
- Specified by:
getById
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
remove
@Transactional
public void remove(EntityType entity)
- Specified by:
remove
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
size
@Transactional(readOnly=true)
public int size()
- Specified by:
size
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
update
@Transactional
public EntityType update(EntityType entity)
- Specified by:
update
in interface org.domdrides.repository.Repository<EntityType extends org.domdrides.entity.Entity<IdType>,IdType extends Serializable>
getEntityClass
protected Class<EntityType> getEntityClass()
getEntityManager
protected javax.persistence.EntityManager getEntityManager()
Copyright © 2013. All Rights Reserved.