|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openwms.core.integration.jpa.AbstractGenericJpaDao<User,Long>
org.openwms.core.integration.jpa.UserDaoImpl
@Transactional(propagation=MANDATORY) @Repository(value="userDao") public class UserDaoImpl
An UserDaoImpl is an extension of a AbstractGenericJpaDao
about
functionality regarding User
s. The stereotype annotation
Repository
marks this class as DAO in the architecture and enables
exception translation and component scanning. It can be injected by name
"userDao".
All methods have to be invoked within an active transaction context.
AbstractGenericJpaDao
,
UserDao
Field Summary | |
---|---|
static String |
COMPONENT_NAME
Springs component name. |
Fields inherited from class org.openwms.core.integration.jpa.AbstractGenericJpaDao |
---|
logger |
Fields inherited from interface org.openwms.core.integration.GenericDao |
---|
FIND_ALL, FIND_BY_ID |
Constructor Summary | |
---|---|
UserDaoImpl()
|
Method Summary | |
---|---|
List<User> |
findAll()
Find all entities and return them as a List . |
User |
findByNameAndPassword(UserPassword userPassword)
Find an User by his userName and password. |
protected String |
getFindAllQuery()
Returns the name of the NamedQuery to find all Entity
classes. |
protected String |
getFindByUniqueIdQuery()
Returns the name of the NamedQuery to find an Entity by the
business key. |
void |
persist(User user)
Persist a transient entity. |
void |
remove(User user)
Removes an already persistent entity. |
User |
save(User user)
Synchronize an entity with the persistence layer and return it. |
Methods inherited from class org.openwms.core.integration.jpa.AbstractGenericJpaDao |
---|
beforeUpdate, findById, findByNamedParameters, findByPositionalParameters, findByUniqueId, getEm, getPersistentClass, setPersistentClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openwms.core.integration.GenericDao |
---|
findById, findByNamedParameters, findByPositionalParameters, findByUniqueId, setPersistentClass |
Field Detail |
---|
public static final String COMPONENT_NAME
Constructor Detail |
---|
public UserDaoImpl()
Method Detail |
---|
protected String getFindAllQuery()
AbstractGenericJpaDao
NamedQuery
to find all Entity
classes.
getFindAllQuery
in class AbstractGenericJpaDao<User,Long>
AbstractGenericJpaDao.getFindAllQuery()
protected String getFindByUniqueIdQuery()
AbstractGenericJpaDao
NamedQuery
to find an Entity by the
business key.
getFindByUniqueIdQuery
in class AbstractGenericJpaDao<User,Long>
AbstractGenericJpaDao.getFindByUniqueIdQuery()
public List<User> findAll()
AbstractGenericJpaDao
List
.
findAll
in interface GenericDao<User,Long>
findAll
in class AbstractGenericJpaDao<User,Long>
User
sAbstractGenericJpaDao.findAll()
public void persist(User user)
null
no
action is performed.
persist
in interface GenericDao<User,Long>
persist
in class AbstractGenericJpaDao<User,Long>
user
- Entity instance to be persistedpublic User save(User user)
null
no
action is performed.
save
in interface GenericDao<User,Long>
save
in class AbstractGenericJpaDao<User,Long>
user
- Entity instance to be synchronized with the persistence layer
public void remove(User user)
null
no
action is performed.
remove
in interface GenericDao<User,Long>
remove
in class AbstractGenericJpaDao<User,Long>
user
- Entity instance to be removedpublic User findByNameAndPassword(UserPassword userPassword)
User
by his userName and password.
findByNameAndPassword
in interface UserDao
userPassword
- Stores the userName and password.
User
if found, otherwise might be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |