public class HibernateUserDocDAO extends HibernatePersistentObjectDAO<UserDoc> implements UserDocDAO
UserDocDAO
entityClass, log, sessionFactory
Constructor and Description |
---|
HibernateUserDocDAO() |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(long docId,
long userId)
This method deletes an userdoc by the alternate key.
|
boolean |
deleteByDocId(long docId)
This method deletes all userdocs by the document id.
|
boolean |
deleteByUserId(long userId)
This method deletes all userdocs by the user id.
|
boolean |
exists(long docId,
long userId)
Check if an userdoc exists.
|
List<UserDoc> |
findByDocId(long docId)
Selects all userdocs for a given doc.
|
UserDoc |
findByMinDate(long userId)
Selects the oldest userdoc for a given user.
|
List<UserDoc> |
findByUserId(long userId)
Selects all userdocs for a given user.
|
int |
getCount(long userId)
Select the count of userdocs for an user.
|
boolean |
store(UserDoc userdoc)
This method persists the entity object.
|
bulkUpdate, delete, deleteAll, evict, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, flush, getConnection, getCurrentSession, getDbms, getSessionFactory, initialize, 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, delete, deleteAll, findAll, findAllIds, findById, findByQuery, findByWhere, findByWhere, findIdsByWhere, findIdsByWhere, getDbms, initialize, jdbcUpdate, jdbcUpdate, query, queryForInt, queryForList, queryForList, queryForLong, queryForRowSet
public boolean delete(long docId, long userId)
UserDocDAO
delete
in interface UserDocDAO
com.logicaldoc.core.security.dao.UserDocDAO#delete(long,
java.lang.String)
public boolean exists(long docId, long userId)
UserDocDAO
exists
in interface UserDocDAO
docId
- ID of the documentpublic UserDoc findByMinDate(long userId)
UserDocDAO
findByMinDate
in interface UserDocDAO
public List<UserDoc> findByUserId(long userId)
UserDocDAO
findByUserId
in interface UserDocDAO
public int getCount(long userId)
UserDocDAO
getCount
in interface UserDocDAO
public boolean store(UserDoc userdoc)
PersistentObjectDAO
store
in interface PersistentObjectDAO<UserDoc>
store
in class HibernatePersistentObjectDAO<UserDoc>
userdoc
- entity to be stored.public boolean deleteByDocId(long docId)
UserDocDAO
deleteByDocId
in interface UserDocDAO
UserDocDAO.deleteByDocId(long)
public List<UserDoc> findByDocId(long docId)
UserDocDAO
findByDocId
in interface UserDocDAO
UserDocDAO.findByDocId(long)
public boolean deleteByUserId(long userId)
UserDocDAO
deleteByUserId
in interface UserDocDAO
Copyright © 2008-2014 Logical Objects. All Rights Reserved.