java.lang.Object |
↳ |
vars.jpa.DAO |
|
↳ |
vars.jpa.UserAccountDAOImpl |
Class Overview
Created by IntelliJ IDEA.
User: brian
Date: Aug 19, 2009
Time: 3:09:01 PM
To change this template use File | Settings | File Templates.
Summary
[Expand]
Inherited Methods |
From class
vars.jpa.DAO
void
|
close()
Closes the associated entityManger if it's open.
|
void
|
commit()
|
void
|
endTransaction()
Close any open transaction used on the current thread.
|
boolean
|
equalInDatastore(Object thisObj, Object thatObj)
True if the to objects represent the same object in the datastore.
|
<T>
T
|
find(T object)
Retrieves the object from the datastore.
|
List
|
findByNamedQuery(String name)
Executes a named query that does not take any parameters
|
List
|
findByNamedQuery(String name, Map<String, Object> namedParameters)
Executes a named query using a map of named parameters
|
<T>
T
|
findByPrimaryKey(Class<T> clazz, Object primaryKey)
|
EntityManager
|
getEntityManager()
|
boolean
|
isPersistent(Object entity)
Checks to see if the given object is persisted in the database
|
void
|
loadLazyRelations(Object entity)
Many one-to-many relations are lazy loaded in JPA.
|
<T>
T
|
merge(T entity)
Update an object in the database and bring it into the current transaction
|
void
|
persist(Object entity)
Insert an object into the database
|
void
|
remove(Object entity)
|
void
|
startTransaction()
Start a database transaction.
|
static
Map<String, Object>
|
toParameterMap(Object... args)
The findByNamedQuery method needs a Map of parameters.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0)
|
final
void
|
wait(long arg0, int arg1)
|
|
From interface
vars.DAO
abstract
void
|
close()
|
abstract
void
|
commit()
|
abstract
void
|
endTransaction()
|
abstract
boolean
|
equalInDatastore(Object thisObj, Object thatObj)
True if the to objects represent the same object in the datastore.
|
abstract
<T>
T
|
find(T object)
Retrieves the object from the datastore.
|
abstract
List
|
findByNamedQuery(String name)
Executes a named query that does not take any parameters
|
abstract
List
|
findByNamedQuery(String name, Map<String, Object> namedParameters)
Executes a named query using a map of named parameters
|
abstract
<T>
T
|
findByPrimaryKey(Class<T> clazz, Object primaryKey)
|
abstract
EntityManager
|
getEntityManager()
|
abstract
boolean
|
isPersistent(Object entity)
Checks to see if the given object is persisted in the databas
|
abstract
void
|
loadLazyRelations(Object entity)
Many one-to-many relations are lazy loaded in JPA.
|
abstract
<T>
T
|
merge(T object)
|
abstract
void
|
persist(Object object)
|
abstract
void
|
remove(Object object)
|
abstract
void
|
startTransaction()
|
|
From interface
vars.UserAccountDAO
|
From interface
vars.jpa.EntityManagerAspect
|
Public Constructors
public
UserAccountDAOImpl
(EntityManager entityManager)
Public Methods
public
Collection<UserAccount>
findAllByFirstName
(String firstName)
public
Collection<UserAccount>
findAllByLastName
(String lastName)
public
Collection<UserAccount>
findAllByRole
(String role)
public
UserAccount
findByUserName
(String userName)
Search for the matching username
Parameters
userName
| The username to search for |
Returns
- the match, or null if no match is found