@PermitAll public class JpaPersonDao extends com.whitestein.lsps.common.jpa.AbstractJpaBasicDao<Person,String> implements PersonDao
PersonDao
DAO interface.Constructor and Description |
---|
JpaPersonDao()
Creates new instance.
|
JpaPersonDao(javax.persistence.EntityManager em,
RoleNameDao roleNameDao)
Creates new instance of
JpaPersonDao . |
Modifier and Type | Method and Description |
---|---|
boolean |
checkActivePersonWithLoginExists(String login)
Check if active person with given loginName exists.
|
Collection<Person> |
findAll()
Returns a collection of all
Person instances that exist in the
persistent storage or an empty collection if there is no such instance. |
QueryResult<Person> |
findAll(PersonCriteria criteria)
Returns a result of the query specified by given
personCriteria . |
Person |
findByLoginName(String login)
Returns person with the login name.
|
Collection<Person> |
findForSecuirityRole(SecurityRole securityRole)
Returns all persons that save assigned the security role.
|
Collection<String> |
findLikeId(String pattern)
Returns all ids matching the pattern.
|
protected javax.persistence.EntityManager |
getEntityManager() |
void |
removeDetail(PersonDetail personDetail)
Removes a person detail.
|
clear, contains, findById, findById, findByIds, flush, getColName, getEntityClass, getEntityName, getReferenceById, merge, persist, refresh, refresh, remove, setEntityClass, setLockMode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JpaPersonDao()
public JpaPersonDao(javax.persistence.EntityManager em, RoleNameDao roleNameDao)
JpaPersonDao
.em
- the entity managerroleNameDao
- the role name daoprotected javax.persistence.EntityManager getEntityManager()
public void removeDetail(PersonDetail personDetail)
PersonDao
removeDetail
in interface PersonDao
public Person findByLoginName(String login)
PersonDao
findByLoginName
in interface PersonDao
public boolean checkActivePersonWithLoginExists(String login)
PersonDao
checkActivePersonWithLoginExists
in interface PersonDao
login
- of the personpublic Collection<String> findLikeId(String pattern)
PersonDao
findLikeId
in interface PersonDao
public Collection<Person> findAll()
PersonDao
Person
instances that exist in the
persistent storage or an empty collection if there is no such instance.public QueryResult<Person> findAll(PersonCriteria criteria)
PersonDao
personCriteria
.public Collection<Person> findForSecuirityRole(SecurityRole securityRole)
PersonDao
findForSecuirityRole
in interface PersonDao
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.