|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Customer,java.lang.String>
org.openxma.dsl.reference.dao.impl.CustomerDaoImpl
@Repository(value="customerDao") public class CustomerDaoImpl
CustomerDao| Field Summary |
|---|
| Fields inherited from class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl |
|---|
argumentTypeFactory, dataFieldMaxValueIncrementer, logger, namingStrategy, sessionFactory, type |
| Fields inherited from interface org.openxma.dsl.reference.dao.CustomerDao |
|---|
LAST_NAME_ASC |
| Constructor Summary | |
|---|---|
CustomerDaoImpl()
|
|
| Method Summary | |
|---|---|
Customer |
create()
Factory method to create an empty CustomerDao entity with an already assigned identifier. |
Customer |
create(Address invoiceAddress,
Address deliveryAddress,
java.lang.String customerFirstName,
java.lang.String customerLastName,
java.lang.String emailAddress,
java.util.Date customerBirthDate)
Factory method to create an empty CustomerDao taking all not null attributes. |
Customer |
createAndSave(Address invoiceAddress,
Address deliveryAddress,
java.lang.String customerFirstName,
java.lang.String customerLastName,
java.lang.String emailAddress,
java.util.Date customerBirthDate)
Factory method to create and save an empty CustomerDao taking all not null attributes. |
Customer |
createEntity(java.lang.Object context)
|
java.util.List<Customer> |
findAllByEmailAdressOrBirthDate(java.lang.String emailAddress,
java.util.Date birthDate)
Execute a query based on the given attributes. |
java.util.List<Customer> |
findAllByFirstNameAndLastName(java.lang.String firstName,
java.lang.String lastName)
Execute a query based on the given attributes. |
java.util.List<Customer> |
findAllByLastNameJoinOrdersDate(java.lang.String lastName,
java.util.Date ordersPlacementDate)
Execute a query based on the given attributes. |
Customer |
findByFirstOrLastNameJoinOrder(java.lang.String firstName,
java.lang.String lastName,
StateAndDateQuery stateAndDateQuery)
Execute a query based on the given attributes. |
java.util.List<Customer> |
findByNamedQueryCustomerLastName(java.lang.String lastName)
|
Customer |
loadByCustomerNk(java.lang.String customerFirstName,
java.lang.String customerLastName,
java.util.Date customerBirthDate)
Return the persistent instance of the Customer entity class with the given natural identifier or null if not found. |
Customer |
loadByCustomerUkEmail(java.lang.String emailAddress)
Return the persistent instance of the Customer entity class with the given unique-key or null if not found. |
void |
setDataFieldMaxValueIncrementer(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
|
| Methods inherited from class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl |
|---|
applyPagingParameters, delete, delete, evict, executeFinder, find, findAll, findByExample, get, iterateFinder, load, merge, read, refresh, saveOrUpdate, setArgumentTypeFactory, setNamingStrategy, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openxma.dsl.platform.dao.GenericDao |
|---|
delete, delete, evict, find, findAll, findByExample, get, load, merge, refresh, saveOrUpdate, update |
| Constructor Detail |
|---|
public CustomerDaoImpl()
| Method Detail |
|---|
public void setSessionFactory(@Qualifier(value="default")
org.hibernate.SessionFactory sessionFactory)
setSessionFactory in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Customer,java.lang.String>sessionFactory - the sessionFactory to set
public void setDataFieldMaxValueIncrementer(@Qualifier(value="default")
org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)
setDataFieldMaxValueIncrementer in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Customer,java.lang.String>dataFieldMaxValueIncrementer - the dataFieldMaxValueIncrementer to setpublic Customer createEntity(java.lang.Object context)
createEntity in interface org.openxma.dsl.platform.dao.EntityFactory<Customer>context - the context for the object creation
public Customer create()
CustomerDaoCustomerDao entity with an already assigned identifier.
The advantage of this approach, coupled with the fact that we're using the id for equals,
is that equality test's are immediately possible and therefore independent from the persistence state
of the entity. This in contrast to other solutions where auto generated Keys are used
which must wait until the object is persisted or differentiate between transient and managed states.
create in interface CustomerDaocreate in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Customer,java.lang.String>CustomerDao entity with an already assigned identifier.
public Customer create(Address invoiceAddress,
Address deliveryAddress,
java.lang.String customerFirstName,
java.lang.String customerLastName,
java.lang.String emailAddress,
java.util.Date customerBirthDate)
CustomerDaoCustomerDao taking all not null attributes.
create in interface CustomerDaoCustomerDao entity with the given natural identifier and not null attributes set.
public Customer createAndSave(Address invoiceAddress,
Address deliveryAddress,
java.lang.String customerFirstName,
java.lang.String customerLastName,
java.lang.String emailAddress,
java.util.Date customerBirthDate)
CustomerDaoCustomerDao taking all not null attributes.
createAndSave in interface CustomerDaoCustomerDao entity with the given natural identifier and not null attributes set.
public Customer loadByCustomerNk(java.lang.String customerFirstName,
java.lang.String customerLastName,
java.util.Date customerBirthDate)
CustomerDaonull if not found.
loadByCustomerNk in interface CustomerDaonull if not foundpublic Customer loadByCustomerUkEmail(java.lang.String emailAddress)
CustomerDaonull if not found.
loadByCustomerUkEmail in interface CustomerDaonull if not found
public java.util.List<Customer> findAllByFirstNameAndLastName(java.lang.String firstName,
java.lang.String lastName)
CustomerDao
findAllByFirstNameAndLastName in interface CustomerDaoList containing 0 or more persistent Customer instances
public java.util.List<Customer> findAllByEmailAdressOrBirthDate(java.lang.String emailAddress,
java.util.Date birthDate)
CustomerDao
findAllByEmailAdressOrBirthDate in interface CustomerDaoList containing 0 or more persistent Customer instances
public Customer findByFirstOrLastNameJoinOrder(java.lang.String firstName,
java.lang.String lastName,
StateAndDateQuery stateAndDateQuery)
CustomerDao
findByFirstOrLastNameJoinOrder in interface CustomerDaonull if not found
public java.util.List<Customer> findAllByLastNameJoinOrdersDate(java.lang.String lastName,
java.util.Date ordersPlacementDate)
CustomerDao
findAllByLastNameJoinOrdersDate in interface CustomerDaoList containing 0 or more persistent Customer instancespublic java.util.List<Customer> findByNamedQueryCustomerLastName(java.lang.String lastName)
findByNamedQueryCustomerLastName in interface CustomerDaoList containing 0 or more persistent instances
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||