org.openxma.dsl.reference.dao.impl
Class AbstractSupplierDaoImpl

java.lang.Object
  extended by org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Supplier,java.lang.String>
      extended by org.openxma.dsl.reference.dao.impl.AbstractSupplierDaoImpl
All Implemented Interfaces:
org.openxma.dsl.platform.dao.EntityFactory<Supplier>, org.openxma.dsl.platform.dao.FinderExecutor<Supplier>, org.openxma.dsl.platform.dao.GenericDao<Supplier,java.lang.String>, BaseSupplierDao, SupplierDao
Direct Known Subclasses:
SupplierDaoImpl

public abstract class AbstractSupplierDaoImpl
extends org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Supplier,java.lang.String>
implements SupplierDao

See Also:
SupplierDao

Field Summary
 
Fields inherited from class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl
argumentTypeFactory, dataFieldMaxValueIncrementer, logger, namingStrategy, sessionFactory, type
 
Constructor Summary
AbstractSupplierDaoImpl()
           
 
Method Summary
 Supplier create()
          Factory method to create an empty SupplierDao entity with an already assigned identifier.
 Supplier create(java.lang.String companyName)
          Factory method to create an empty SupplierDao taking all not null attributes.
 Supplier createAndSave(java.lang.String companyName)
          Factory method to create and save an empty SupplierDao taking all not null attributes.
 Supplier createEntity(java.lang.Object context)
           
 Supplier loadBySupplierKey(java.lang.String companyName)
          Return the persistent instance of the Supplier entity class with the given natural identifier 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

AbstractSupplierDaoImpl

public AbstractSupplierDaoImpl()
Method Detail

setSessionFactory

public void setSessionFactory(@Qualifier(value="default")
                              org.hibernate.SessionFactory sessionFactory)
Overrides:
setSessionFactory in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Supplier,java.lang.String>
Parameters:
sessionFactory - the sessionFactory to set

setDataFieldMaxValueIncrementer

public void setDataFieldMaxValueIncrementer(@Qualifier(value="default")
                                            org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer dataFieldMaxValueIncrementer)
Overrides:
setDataFieldMaxValueIncrementer in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Supplier,java.lang.String>
Parameters:
dataFieldMaxValueIncrementer - the dataFieldMaxValueIncrementer to set

createEntity

public Supplier createEntity(java.lang.Object context)
Specified by:
createEntity in interface org.openxma.dsl.platform.dao.EntityFactory<Supplier>
Parameters:
context - the context for the object creation
Returns:
an instance of the entity matching the given name

create

public Supplier create()
Description copied from interface: BaseSupplierDao
Factory method to create an empty SupplierDao 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.

Specified by:
create in interface BaseSupplierDao
Overrides:
create in class org.openxma.dsl.platform.dao.impl.GenericDaoHibernateImpl<Supplier,java.lang.String>
Returns:
a new (non managed), empty SupplierDao entity with an already assigned identifier.

create

public Supplier create(java.lang.String companyName)
Description copied from interface: BaseSupplierDao
Factory method to create an empty SupplierDao taking all not null attributes.

Specified by:
create in interface BaseSupplierDao
Returns:
a new, transient (i.e. is not associated with a persistence context and has no persistent representation in the database) SupplierDao entity with the given natural identifier and not null attributes set.

createAndSave

public Supplier createAndSave(java.lang.String companyName)
Description copied from interface: BaseSupplierDao
Factory method to create and save an empty SupplierDao taking all not null attributes.

Specified by:
createAndSave in interface BaseSupplierDao
Returns:
a new, transient (i.e. is not associated with a persistence context and has no persistent representation in the database) SupplierDao entity with the given natural identifier and not null attributes set.

loadBySupplierKey

public Supplier loadBySupplierKey(java.lang.String companyName)
Description copied from interface: BaseSupplierDao
Return the persistent instance of the Supplier entity class with the given natural identifier or null if not found.

Specified by:
loadBySupplierKey in interface BaseSupplierDao
Returns:
the persistent Supplier instance, or null if not found


Copyright © 2010. All Rights Reserved.