public class HibernateUserDAO extends HibernatePersistentObjectDAO<User> implements UserDAO
UserDAO
entityClass, log, sessionFactory
Modifier and Type | Method and Description |
---|---|
int |
count()
Counts the total number of users
|
boolean |
delete(long userId)
This method deletes an entity.
|
boolean |
delete(long userId,
UserHistory transaction)
This method deletes the user object and insert a new user history entry.
|
List<User> |
findByLikeUserName(String username)
This method finds an User by username.
|
List<User> |
findByName(String name)
This method finds an User by name.
|
User |
findByUserName(String username)
This method finds an User by its username.
|
List<User> |
findByUserNameAndName(String username,
String name)
This method finds an User by username and name.
|
Map<String,Generic> |
findUserSettings(long userId,
String namePrefix)
Retrieves the settings for a user.
|
int |
getPasswordTtl() |
UserDocDAO |
getUserDocDAO() |
UserHistoryDAO |
getUserHistoryDAO() |
UserListenerManager |
getUserListenerManager() |
void |
initialize(User user)
Doesn't do anything by default
|
boolean |
isPasswordExpired(String username)
Is password expired.
|
void |
setGenericDAO(GenericDAO genericDAO) |
void |
setPasswordTtl(int passwordTtl) |
void |
setUserDocDAO(UserDocDAO userDocDAO) |
void |
setUserHistoryDAO(UserHistoryDAO userHistoryDAO) |
void |
setUserListenerManager(UserListenerManager userListenerManager) |
boolean |
store(User user)
This method persists the entity object.
|
boolean |
store(User user,
UserHistory transaction)
This method persists the user object and insert a new user history entry.
|
boolean |
validateUser(String username)
Validates an username only (the password content is not inspectged.
|
boolean |
validateUser(String username,
String password)
Validates an username and a password.
|
bulkUpdate, deleteAll, evict, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, flush, getConnection, getCurrentSession, getDbms, getSessionFactory, isHsql, isMySQL, isOracle, isSqlServer, jdbcUpdate, jdbcUpdate, merge, prepareQuery, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet, refresh, saveOrUpdate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bulkUpdate, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet
public boolean delete(long userId)
PersistentObjectDAO
delete
in interface PersistentObjectDAO<User>
delete
in class HibernatePersistentObjectDAO<User>
userId
- ID of the entity which should be deleted.PersistentObjectDAO.delete(long)
public List<User> findByName(String name)
UserDAO
findByName
in interface UserDAO
name
- The name of wanted User.UserDAO.findByName(java.lang.String)
public User findByUserName(String username)
UserDAO
findByUserName
in interface UserDAO
username
- username of wanted User.UserDAO.findByUserName(java.lang.String)
public List<User> findByLikeUserName(String username)
UserDAO
findByLikeUserName
in interface UserDAO
username
- The username of wanted User.UserDAO.findByUserName(java.lang.String)
public List<User> findByUserNameAndName(String username, String name)
UserDAO
findByUserNameAndName
in interface UserDAO
username
- The username of wanted user.name
- The name of wanted user.UserDAO.findByUserNameAndName(java.lang.String,
java.lang.String)
public boolean store(User user)
PersistentObjectDAO
store
in interface PersistentObjectDAO<User>
store
in class HibernatePersistentObjectDAO<User>
user
- entity to be stored.com.logicaldoc.core.security.dao.UserDAO#store(com.logicaldoc.core.security.User)
public boolean store(User user, UserHistory transaction)
UserDAO
public boolean validateUser(String username, String password)
UserDAO
validateUser
in interface UserDAO
username
- Username of the User to be validated.password
- Password of the User to be validated.UserDAO.validateUser(java.lang.String,
java.lang.String)
public boolean validateUser(String username)
UserDAO
validateUser
in interface UserDAO
username
- Username of the User to be validated.public int getPasswordTtl()
getPasswordTtl
in interface UserDAO
public void setPasswordTtl(int passwordTtl)
setPasswordTtl
in interface UserDAO
public boolean isPasswordExpired(String username)
UserDAO
isPasswordExpired
in interface UserDAO
username
- Username of the User to be validate.public int count()
UserDAO
public boolean delete(long userId, UserHistory transaction)
UserDAO
public UserHistoryDAO getUserHistoryDAO()
public void setUserHistoryDAO(UserHistoryDAO userHistoryDAO)
public UserDocDAO getUserDocDAO()
public void setUserDocDAO(UserDocDAO userDocDAO)
public void setUserListenerManager(UserListenerManager userListenerManager)
public UserListenerManager getUserListenerManager()
public void initialize(User user)
HibernatePersistentObjectDAO
initialize
in interface PersistentObjectDAO<User>
initialize
in class HibernatePersistentObjectDAO<User>
user
- The entity to be initialisedpublic Map<String,Generic> findUserSettings(long userId, String namePrefix)
UserDAO
findUserSettings
in interface UserDAO
userId
- Identifier of the usernamePrefix
- Name prefix of the property (optional)public void setGenericDAO(GenericDAO genericDAO)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.