|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.ibatis.support.SqlMapClientDaoSupport
org.domdrides.ibatis.repository.IbatisRepository<EntityType,IdType>
public class IbatisRepository<EntityType extends Entity<IdType>,IdType extends Serializable>
An iBATIS-based repository implementation
| Field Summary |
|---|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
IbatisRepository(Class<EntityType> entityClass)
|
|
| Method Summary | |
|---|---|
EntityType |
add(EntityType entity)
Adds the entity to this repository. |
boolean |
contains(EntityType entity)
Returns whether or not the entity is contained within the repository. |
String |
getAddId()
|
Set<EntityType> |
getAll()
Returns all entities in this repository as a set. |
EntityType |
getById(IdType id)
Returns the entity with the given id. |
String |
getGetAllId()
|
String |
getGetByIdId()
|
String |
getRemoveId()
|
String |
getSizeId()
|
String |
getUpdateId()
|
void |
remove(EntityType entity)
Removes the entity from this repository. |
void |
setAddId(String addId)
|
void |
setGetAllId(String getAllId)
|
void |
setGetByIdId(String getByIdId)
|
void |
setRemoveId(String removeId)
|
void |
setSizeId(String sizeId)
|
void |
setUpdateId(String updateId)
|
int |
size()
Returns the size of the repository. |
EntityType |
update(EntityType entity)
Updates an entity within this repository. |
| Methods inherited from class org.springframework.orm.ibatis.support.SqlMapClientDaoSupport |
|---|
checkDaoConfig, getDataSource, getSqlMapClient, getSqlMapClientTemplate, setDataSource, setSqlMapClient, setSqlMapClientTemplate |
| 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 |
|---|
public IbatisRepository(Class<EntityType> entityClass)
| Method Detail |
|---|
@Transactional public EntityType add(EntityType entity)
Repository
add in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>entity - the entity
@Transactional(readOnly=true) public boolean contains(EntityType entity)
Repository
contains in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>entity - the entity
@Transactional(readOnly=true) public Set<EntityType> getAll()
Repository
getAll in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>@Transactional(readOnly=true) public EntityType getById(IdType id)
Repository
getById in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>id - the id
@Transactional public void remove(EntityType entity)
Repository
remove in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>entity - the entity@Transactional public EntityType update(EntityType entity)
Repository
update in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>entity - the entity
@Transactional(readOnly=true) public int size()
Repository
size in interface Repository<EntityType extends Entity<IdType>,IdType extends Serializable>public String getSizeId()
public void setSizeId(String sizeId)
public String getAddId()
public void setAddId(String addId)
public String getGetAllId()
public void setGetAllId(String getAllId)
public String getGetByIdId()
public void setGetByIdId(String getByIdId)
public String getRemoveId()
public void setRemoveId(String removeId)
public String getUpdateId()
public void setUpdateId(String updateId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||