org.synyx.hades.sample.dao
Interface UserDao

All Superinterfaces:
GenericDao<User,java.lang.Long>, UserDaoCustom

public interface UserDao
extends GenericDao<User,java.lang.Long>, UserDaoCustom

DAO interface for User instances. Provides basic CRUD operations due to the extension of GenericDao. Includes custom implemented functionality by extending UserDaoCustom.

Author:
Oliver Gierke - gierke@synyx.de

Method Summary
 java.util.List<User> findByFirstname(java.lang.String firstname)
          Returns all users with the given firstname.
 java.util.List<User> findByLastname(java.lang.String lastname)
          Find all users with the given lastname.
 User findByTheUsersName(java.lang.String username)
          Find the user with the given username.
 
Methods inherited from interface org.synyx.hades.dao.GenericDao
count, delete, delete, deleteAll, exists, flush, readAll, readAll, readAll, readByPrimaryKey, save, save, saveAndFlush
 
Methods inherited from interface org.synyx.hades.sample.dao.UserDaoCustom
myCustomBatchOperation
 

Method Detail

findByTheUsersName

User findByTheUsersName(java.lang.String username)
Find the user with the given username. This method will be translated into a query using the NamedQuery annotation at the User class.

Parameters:
lastname -
Returns:

findByLastname

java.util.List<User> findByLastname(java.lang.String lastname)
Find all users with the given lastname. This method will be translated into a query by constructing it directly from the method name as there is no other query declared.

Parameters:
lastname -
Returns:

findByFirstname

@Query(value="from User u where u.firstname = ?")
java.util.List<User> findByFirstname(java.lang.String firstname)
Returns all users with the given firstname. This method will be translated into a query using the one declared in the Query annotation declared one.

Parameters:
firstname -
Returns:


Copyright © 2009-2010 Synyx GmbH & Co. KG. All Rights Reserved.