|
||||||||||
| 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<Product,ProductId>
org.openxma.dsl.reference.dao.impl.ProductDaoImpl
@Repository(value="productDao") public class ProductDaoImpl
ProductDao| Field Summary |
|---|
| Fields inherited from class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl |
|---|
argumentTypeFactory, dataFieldMaxValueIncrementer, logger, namingStrategy, sessionFactory, type |
| Constructor Summary | |
|---|---|
ProductDaoImpl()
|
|
| Method Summary | |
|---|---|
Product |
create()
Factory method to create an empty ProductDao entity with an already assigned identifier. |
Product |
create(Supplier supplier,
java.lang.String name,
java.lang.Integer unitPrice)
Factory method to create an empty ProductDao taking all not null attributes. |
Product |
createAndSave(Supplier supplier,
java.lang.String name,
java.lang.Integer unitPrice)
Factory method to create and save an empty ProductDao taking all not null attributes. |
Product |
createEntity(java.lang.Object context)
|
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 ProductDaoImpl()
| Method Detail |
|---|
public void setSessionFactory(@Qualifier(value="default")
org.hibernate.SessionFactory sessionFactory)
setSessionFactory in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Product,ProductId>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<Product,ProductId>dataFieldMaxValueIncrementer - the dataFieldMaxValueIncrementer to setpublic Product createEntity(java.lang.Object context)
createEntity in interface org.openxma.dsl.platform.dao.EntityFactory<Product>context - the context for the object creation
public Product create()
ProductDaoProductDao 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 ProductDaocreate in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Product,ProductId>ProductDao entity with an already assigned identifier.
public Product create(Supplier supplier,
java.lang.String name,
java.lang.Integer unitPrice)
ProductDaoProductDao taking all not null attributes.
create in interface ProductDaoProductDao entity with the given natural identifier and not null attributes set.
public Product createAndSave(Supplier supplier,
java.lang.String name,
java.lang.Integer unitPrice)
ProductDaoProductDao taking all not null attributes.
createAndSave in interface ProductDaoProductDao entity with the given natural identifier and not null attributes set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||