edu.uoc.tfc.dbmodel.security
Class UserDaoBase

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by edu.uoc.tfc.dbmodel.security.UserDaoBase
All Implemented Interfaces:
UserDao, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
UserDaoImpl

public abstract class UserDaoBase
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements UserDao

Base Spring DAO Class: is able to create, update, remove, load, and find objects of type edu.uoc.tfc.dbmodel.security.User.

See Also:
User

Field Summary
 
Fields inherited from interface edu.uoc.tfc.dbmodel.security.UserDao
TRANSFORM_NONE, TRANSFORM_USERVO
 
Constructor Summary
UserDaoBase()
           
 
Method Summary
 User create(java.lang.Boolean active, java.lang.String adress, java.lang.String nom, java.lang.String password, java.lang.String primerCognom, Role rol, java.lang.String segonCognom, java.lang.String userId)
           Creates a new edu.uoc.tfc.dbmodel.security.User instance from only required properties (attributes and association ends) and adds it to the persistent store.
 java.util.Collection create(java.util.Collection entities)
          Creates a new instance of edu.uoc.tfc.dbmodel.security.User and adds from the passed in entities collection
 java.lang.Object create(int transform, java.lang.Boolean active, java.lang.String adress, java.lang.String nom, java.lang.String password, java.lang.String primerCognom, Role rol, java.lang.String segonCognom, java.lang.String userId)
           Does the same thing as UserDao.create(java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String) with an additional flag called transform.
 java.util.Collection create(int transform, java.util.Collection entities)
           Does the same thing as UserDao.create(edu.uoc.tfc.dbmodel.security.User) with an additional flag called transform.
 java.lang.Object create(int transform, java.lang.String userId, java.lang.String password, java.lang.String adress, java.lang.Boolean active, java.lang.String nom, java.lang.String primerCognom, java.lang.String segonCognom)
           Does the same thing as UserDao.create(java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String) with an additional flag called transform.
 java.lang.Object create(int transform, User user)
           Does the same thing as UserDao.create(edu.uoc.tfc.dbmodel.security.User) with an additional flag called transform.
 User create(java.lang.String userId, java.lang.String password, java.lang.String adress, java.lang.Boolean active, java.lang.String nom, java.lang.String primerCognom, java.lang.String segonCognom)
           Creates a new edu.uoc.tfc.dbmodel.security.User instance from all attributes and adds it to the persistent store.
 User create(User user)
          Creates an instance of edu.uoc.tfc.dbmodel.security.User and adds it to the persistent store.
 java.lang.Object findUserByUserId(int transform, java.lang.String userId)
           Does the same thing as UserDao.findUserByUserId(java.lang.String) with an additional flag called transform.
 java.lang.Object findUserByUserId(int transform, java.lang.String queryString, java.lang.String userId)
           Does the same thing as UserDao.findUserByUserId(int, java.lang.String) with an additional argument called queryString.
 User findUserByUserId(java.lang.String userId)
           Cerca un usuari a partir de l'identificador
 User findUserByUserId(java.lang.String queryString, java.lang.String userId)
           Does the same thing as UserDao.findUserByUserId(java.lang.String) with an additional argument called queryString.
 java.util.Collection findUsersByCriteria(CriteriaUserVO criteriaUser)
           Cerca un conjunt d'usuaris a partir d'un criteri de cerca
 java.util.Collection findUsersByCriteria(int transform, CriteriaUserVO criteriaUser)
           Does the same thing as UserDao.findUsersByCriteria(edu.uoc.tfc.dto.security.CriteriaUserVO) with an additional flag called transform.
 java.util.Collection findUsersByCriteria(int transform, int pageNumber, int pageSize, CriteriaUserVO criteriaUser)
           Does the same thing as #findUsersByCriteria(int, String, edu.uoc.tfc.dto.security.CriteriaUserVO) with an additional two arguments called pageNumber and pageSize.
 java.lang.Object load(int transform, java.lang.Long id)
           Does the same thing as UserDao.load(java.lang.Long) with an additional flag called transform.
 User load(java.lang.Long id)
          Loads an instance of edu.uoc.tfc.dbmodel.security.User from the persistent store.
 java.util.Collection loadAll()
          Loads all entities of type User.
 java.util.Collection loadAll(int transform)
           Does the same thing as UserDao.loadAll() with an additional flag called transform.
 java.util.Collection loadAll(int pageNumber, int pageSize)
           Does the same thing as UserDao.loadAll() with an additional two arguments called pageNumber and pageSize.
 java.util.Collection loadAll(int transform, int pageNumber, int pageSize)
           Does the same thing as UserDao.loadAll(int) with an additional two arguments called pageNumber and pageSize.
 void remove(java.util.Collection entities)
          Removes all entities in the given entities collection.
 void remove(java.lang.Long id)
          Removes the instance of edu.uoc.tfc.dbmodel.security.User having the given identifier from the persistent store.
 void remove(User user)
          Removes the instance of edu.uoc.tfc.dbmodel.security.User from the persistent store.
 PaginationResult search(int transform, int pageNumber, int pageSize, Search search)
          Does the same thing as {@link #search(int, edu.uoc.tfc.Search) but with an additional two flags called pageNumber and pageSize.
 PaginationResult search(int pageNumber, int pageSize, Search search)
          Does the same thing as {@link #search(edu.uoc.tfc.Search) but with an additional two flags called pageNumber and pageSize.
 java.util.Set search(int transform, Search search)
          Does the same thing as UserDao.search(edu.uoc.tfc.Search) but with an additional flag called transform.
 java.util.Set search(Search search)
          Performs a search using the parameters specified in the given search object.
 void toEntities(java.util.Collection results)
          Transforms the given results to a collection of com.lighthousepmg.plz.domain.messaging.persistence.CommunicationCategory instances (this is useful when the returned results contains a row of data and you want just entities only).
 UserVO toUserVO(User entity)
          Converts this DAO's entity to an object of type UserVO.
 void toUserVO(User source, UserVO target)
          Copies the fields of the specified entity to the target value object.
 UserVO[] toUserVOArray(java.util.Collection entities)
          Converts this DAO's entity to an array of instances of type UserVO.
 void toUserVOCollection(java.util.Collection entities)
          Converts this DAO's entity to a Collection of instances of type UserVO.
 void update(java.util.Collection entities)
          Updates all instances in the entities collection in the persistent store.
 void update(User user)
          Updates the user instance in the persistent store.
 void userVOToEntity(UserVO source, User target, boolean copyIfNull)
          Copies the fields of UserVO to the specified entity.
 void userVOToEntityCollection(java.util.Collection instances)
          Converts a Collection of instances of type UserVO to this DAO's entity.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.uoc.tfc.dbmodel.security.UserDao
userVOToEntity
 

Constructor Detail

UserDaoBase

public UserDaoBase()
Method Detail

load

public java.lang.Object load(int transform,
                             java.lang.Long id)
Description copied from interface: UserDao

Does the same thing as UserDao.load(java.lang.Long) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined in this class then the result WILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
load in interface UserDao
id - the identifier of the entity to load.
Returns:
either the entity or the object transformed from the entity.
See Also:
UserDao.load(int, java.lang.Long)

load

public User load(java.lang.Long id)
Description copied from interface: UserDao
Loads an instance of edu.uoc.tfc.dbmodel.security.User from the persistent store.

Specified by:
load in interface UserDao
See Also:
UserDao.load(java.lang.Long)

loadAll

public java.util.Collection loadAll()
Description copied from interface: UserDao
Loads all entities of type User.

Specified by:
loadAll in interface UserDao
Returns:
the loaded entities.
See Also:
UserDao.loadAll()

loadAll

public java.util.Collection loadAll(int transform)
Description copied from interface: UserDao

Does the same thing as UserDao.loadAll() with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined here then the result WILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
loadAll in interface UserDao
Parameters:
transform - the flag indicating what transformation to use.
Returns:
the loaded entities.
See Also:
UserDao.loadAll(int)

loadAll

public java.util.Collection loadAll(int pageNumber,
                                    int pageSize)
Description copied from interface: UserDao

Does the same thing as UserDao.loadAll() with an additional two arguments called pageNumber and pageSize. The pageNumber argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the page retrieved.

Specified by:
loadAll in interface UserDao
Parameters:
pageNumber - the page number to retrieve when paging results.
pageSize - the size of the page to retrieve when paging results.
Returns:
the loaded entities.
See Also:
UserDao.loadAll(int, int)

loadAll

public java.util.Collection loadAll(int transform,
                                    int pageNumber,
                                    int pageSize)
Description copied from interface: UserDao

Does the same thing as UserDao.loadAll(int) with an additional two arguments called pageNumber and pageSize. The pageNumber argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the page retrieved.

Specified by:
loadAll in interface UserDao
Parameters:
transform - the flag indicating what transformation to use.
pageNumber - the page number to retrieve when paging results.
pageSize - the size of the page to retrieve when paging results.
Returns:
the loaded entities.
See Also:
UserDao.loadAll(int, int, int)

create

public User create(User user)
Description copied from interface: UserDao
Creates an instance of edu.uoc.tfc.dbmodel.security.User and adds it to the persistent store.

Specified by:
create in interface UserDao
See Also:
UserDao.create(edu.uoc.tfc.dbmodel.security.User)

create

public java.lang.Object create(int transform,
                               User user)
Description copied from interface: UserDao

Does the same thing as UserDao.create(edu.uoc.tfc.dbmodel.security.User) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined here then the result WILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
create in interface UserDao
See Also:
UserDao.create(int transform, edu.uoc.tfc.dbmodel.security.User)

create

public java.util.Collection create(java.util.Collection entities)
Description copied from interface: UserDao
Creates a new instance of edu.uoc.tfc.dbmodel.security.User and adds from the passed in entities collection

Specified by:
create in interface UserDao
Parameters:
entities - the collection of edu.uoc.tfc.dbmodel.security.User instances to create.
Returns:
the created instances.
See Also:
UserDao.create(java.util.Collection)

create

public java.util.Collection create(int transform,
                                   java.util.Collection entities)
Description copied from interface: UserDao

Does the same thing as UserDao.create(edu.uoc.tfc.dbmodel.security.User) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined here then the result WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
create in interface UserDao
See Also:
UserDao.create(int, java.util.Collection)

create

public User create(java.lang.String userId,
                   java.lang.String password,
                   java.lang.String adress,
                   java.lang.Boolean active,
                   java.lang.String nom,
                   java.lang.String primerCognom,
                   java.lang.String segonCognom)
Description copied from interface: UserDao

Creates a new edu.uoc.tfc.dbmodel.security.User instance from all attributes and adds it to the persistent store.

Specified by:
create in interface UserDao
See Also:
UserDao.create(java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String)

create

public java.lang.Object create(int transform,
                               java.lang.String userId,
                               java.lang.String password,
                               java.lang.String adress,
                               java.lang.Boolean active,
                               java.lang.String nom,
                               java.lang.String primerCognom,
                               java.lang.String segonCognom)
Description copied from interface: UserDao

Does the same thing as UserDao.create(java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined here then the result WILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
create in interface UserDao
See Also:
UserDao.create(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String)

create

public User create(java.lang.Boolean active,
                   java.lang.String adress,
                   java.lang.String nom,
                   java.lang.String password,
                   java.lang.String primerCognom,
                   Role rol,
                   java.lang.String segonCognom,
                   java.lang.String userId)
Description copied from interface: UserDao

Creates a new edu.uoc.tfc.dbmodel.security.User instance from only required properties (attributes and association ends) and adds it to the persistent store.

Specified by:
create in interface UserDao
See Also:
UserDao.create(java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, edu.uoc.tfc.dbmodel.security.Role, java.lang.String, java.lang.String)

create

public java.lang.Object create(int transform,
                               java.lang.Boolean active,
                               java.lang.String adress,
                               java.lang.String nom,
                               java.lang.String password,
                               java.lang.String primerCognom,
                               Role rol,
                               java.lang.String segonCognom,
                               java.lang.String userId)
Description copied from interface: UserDao

Does the same thing as UserDao.create(java.lang.String, java.lang.String, java.lang.String, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then the returned entity will NOT be transformed. If this flag is any of the other constants defined here then the result WILL BE passed through an operation which can optionally transform the entity (into a value object for example). By default, transformation does not occur.

Specified by:
create in interface UserDao
See Also:
UserDao.create(int, java.lang.Boolean, java.lang.String, java.lang.String, java.lang.String, java.lang.String, edu.uoc.tfc.dbmodel.security.Role, java.lang.String, java.lang.String)

update

public void update(User user)
Description copied from interface: UserDao
Updates the user instance in the persistent store.

Specified by:
update in interface UserDao
See Also:
UserDao.update(edu.uoc.tfc.dbmodel.security.User)

update

public void update(java.util.Collection entities)
Description copied from interface: UserDao
Updates all instances in the entities collection in the persistent store.

Specified by:
update in interface UserDao
See Also:
UserDao.update(java.util.Collection)

remove

public void remove(User user)
Description copied from interface: UserDao
Removes the instance of edu.uoc.tfc.dbmodel.security.User from the persistent store.

Specified by:
remove in interface UserDao
See Also:
UserDao.remove(edu.uoc.tfc.dbmodel.security.User)

remove

public void remove(java.lang.Long id)
Description copied from interface: UserDao
Removes the instance of edu.uoc.tfc.dbmodel.security.User having the given identifier from the persistent store.

Specified by:
remove in interface UserDao
See Also:
UserDao.remove(java.lang.Long)

remove

public void remove(java.util.Collection entities)
Description copied from interface: UserDao
Removes all entities in the given entities collection.

Specified by:
remove in interface UserDao
See Also:
UserDao.remove(java.util.Collection)

findUsersByCriteria

public java.util.Collection findUsersByCriteria(CriteriaUserVO criteriaUser)
Description copied from interface: UserDao

Cerca un conjunt d'usuaris a partir d'un criteri de cerca

Specified by:
findUsersByCriteria in interface UserDao
See Also:
UserDao.findUsersByCriteria(edu.uoc.tfc.dto.security.CriteriaUserVO)

findUsersByCriteria

public java.util.Collection findUsersByCriteria(int transform,
                                                CriteriaUserVO criteriaUser)
Description copied from interface: UserDao

Does the same thing as UserDao.findUsersByCriteria(edu.uoc.tfc.dto.security.CriteriaUserVO) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then finder results will NOT be transformed during retrieval. If this flag is any of the other constants defined here then finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
findUsersByCriteria in interface UserDao
See Also:
UserDao.findUsersByCriteria(int, edu.uoc.tfc.dto.security.CriteriaUserVO)

findUsersByCriteria

public java.util.Collection findUsersByCriteria(int transform,
                                                int pageNumber,
                                                int pageSize,
                                                CriteriaUserVO criteriaUser)
Description copied from interface: UserDao

Does the same thing as #findUsersByCriteria(int, String, edu.uoc.tfc.dto.security.CriteriaUserVO) with an additional two arguments called pageNumber and pageSize. The pageNumber argument allows you to specify the page number when you are paging the results and the pageSize allows you to specify the size of the page retrieved.

Specified by:
findUsersByCriteria in interface UserDao
See Also:
edu.uoc.tfc.dbmodel.security.UserDao#findUsersByCriteria(int, java.lang.String, int, int, edu.uoc.tfc.dto.security.CriteriaUserVO)

findUserByUserId

public User findUserByUserId(java.lang.String userId)
Description copied from interface: UserDao

Cerca un usuari a partir de l'identificador

Specified by:
findUserByUserId in interface UserDao
See Also:
UserDao.findUserByUserId(java.lang.String)

findUserByUserId

public java.lang.Object findUserByUserId(int transform,
                                         java.lang.String userId)
Description copied from interface: UserDao

Does the same thing as UserDao.findUserByUserId(java.lang.String) with an additional flag called transform. If this flag is set to TRANSFORM_NONE then finder results will NOT be transformed during retrieval. If this flag is any of the other constants defined here then finder results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
findUserByUserId in interface UserDao
See Also:
UserDao.findUserByUserId(int, java.lang.String)

findUserByUserId

public User findUserByUserId(java.lang.String queryString,
                             java.lang.String userId)
Description copied from interface: UserDao

Does the same thing as UserDao.findUserByUserId(java.lang.String) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UserDao.findUserByUserId(java.lang.String).

Specified by:
findUserByUserId in interface UserDao
See Also:
UserDao.findUserByUserId(java.lang.String, java.lang.String)

findUserByUserId

public java.lang.Object findUserByUserId(int transform,
                                         java.lang.String queryString,
                                         java.lang.String userId)
Description copied from interface: UserDao

Does the same thing as UserDao.findUserByUserId(int, java.lang.String) with an additional argument called queryString. This queryString argument allows you to override the query string defined in UserDao.findUserByUserId(int, java.lang.String userId).

Specified by:
findUserByUserId in interface UserDao
See Also:
UserDao.findUserByUserId(int, java.lang.String, java.lang.String)

toEntities

public void toEntities(java.util.Collection results)
Description copied from interface: UserDao
Transforms the given results to a collection of com.lighthousepmg.plz.domain.messaging.persistence.CommunicationCategory instances (this is useful when the returned results contains a row of data and you want just entities only).

Specified by:
toEntities in interface UserDao
See Also:
UserDao.toEntities(java.util.Collection)

toUserVOCollection

public final void toUserVOCollection(java.util.Collection entities)
Description copied from interface: UserDao
Converts this DAO's entity to a Collection of instances of type UserVO.

Specified by:
toUserVOCollection in interface UserDao
See Also:
UserDao.toUserVOCollection(java.util.Collection)

toUserVOArray

public final UserVO[] toUserVOArray(java.util.Collection entities)
Description copied from interface: UserDao
Converts this DAO's entity to an array of instances of type UserVO.

Specified by:
toUserVOArray in interface UserDao
See Also:
UserDao.toUserVOArray(java.util.Collection)

userVOToEntityCollection

public final void userVOToEntityCollection(java.util.Collection instances)
Description copied from interface: UserDao
Converts a Collection of instances of type UserVO to this DAO's entity.

Specified by:
userVOToEntityCollection in interface UserDao
See Also:
UserDao.userVOToEntityCollection(java.util.Collection)

toUserVO

public void toUserVO(User source,
                     UserVO target)
Description copied from interface: UserDao
Copies the fields of the specified entity to the target value object. This method is similar to toUserVO(), but it does not handle any attributes in the target value object that are "read-only" (as those do not have setter methods exposed).

Specified by:
toUserVO in interface UserDao
See Also:
UserDao.toUserVO(edu.uoc.tfc.dbmodel.security.User, edu.uoc.tfc.dto.security.UserVO)

toUserVO

public UserVO toUserVO(User entity)
Description copied from interface: UserDao
Converts this DAO's entity to an object of type UserVO.

Specified by:
toUserVO in interface UserDao
See Also:
UserDao.toUserVO(edu.uoc.tfc.dbmodel.security.User)

userVOToEntity

public void userVOToEntity(UserVO source,
                           User target,
                           boolean copyIfNull)
Description copied from interface: UserDao
Copies the fields of UserVO to the specified entity.

Specified by:
userVOToEntity in interface UserDao
copyIfNull - If FALSE, the value object's field will not be copied to the entity if the value is NULL. If TRUE, it will be copied regardless of its value.
See Also:
edu.uoc.tfc.dbmodel.security.UserDao#userVOToEntity(edu.uoc.tfc.dto.security.UserVO, edu.uoc.tfc.dbmodel.security.User)

search

public PaginationResult search(int transform,
                               int pageNumber,
                               int pageSize,
                               Search search)
Description copied from interface: UserDao
Does the same thing as {@link #search(int, edu.uoc.tfc.Search) but with an additional two flags called pageNumber and pageSize. These flags allow you to limit your data to a specified page number and size.

Specified by:
search in interface UserDao
Parameters:
transform - the transformation flag.
pageNumber - the page number in the data to retrieve
pageSize - the size of the page to retrieve.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search wrapped in a PaginationResult instance.
See Also:
UserDao.search(int, int, int, edu.uoc.tfc.Search)

search

public PaginationResult search(int pageNumber,
                               int pageSize,
                               Search search)
Description copied from interface: UserDao
Does the same thing as {@link #search(edu.uoc.tfc.Search) but with an additional two flags called pageNumber and pageSize. These flags allow you to limit your data to a specified page number and size.

Specified by:
search in interface UserDao
Parameters:
pageNumber - the page number in the data to retrieve
pageSize - the size of the page to retrieve.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search wrapped in a PaginationResult instance.
See Also:
UserDao.search(int, int, edu.uoc.tfc.Search)

search

public java.util.Set search(int transform,
                            Search search)
Description copied from interface: UserDao
Does the same thing as UserDao.search(edu.uoc.tfc.Search) but with an additional flag called transform. If this flag is set to TRANSFORM_NONE then finder results will NOT be transformed during retrieval. If this flag is any of the other constants defined here then results WILL BE passed through an operation which can optionally transform the entities (into value objects for example). By default, transformation does not occur.

Specified by:
search in interface UserDao
Parameters:
transform - the transformation flag.
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search.
See Also:
UserDao.search(int, edu.uoc.tfc.Search)

search

public java.util.Set search(Search search)
Description copied from interface: UserDao
Performs a search using the parameters specified in the given search object.

Specified by:
search in interface UserDao
Parameters:
search - the search object which provides the search parameters and pagination specification.
Returns:
any found results from the search.
See Also:
UserDao.search(edu.uoc.tfc.Search)