org.openxma.dsl.reference.dao
Interface BaseSupplierDao

All Superinterfaces:
org.openxma.dsl.platform.dao.EntityFactory<Supplier>, org.openxma.dsl.platform.dao.GenericDao<Supplier,java.lang.String>
All Known Subinterfaces:
SupplierDao
All Known Implementing Classes:
AbstractSupplierDaoImpl, SupplierDaoImpl

public interface BaseSupplierDao
extends org.openxma.dsl.platform.dao.GenericDao<Supplier,java.lang.String>, org.openxma.dsl.platform.dao.EntityFactory<Supplier>

Represents a Data Access Object, as defined in the Core J2EE Pattern Catalog (see http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html), to abstract and encapsulate all access to entity SupplierDao.

See Also:
SupplierDao

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 loadBySupplierKey(java.lang.String companyName)
          Return the persistent instance of the Supplier entity class with the given natural identifier or null if not found.
 
Methods inherited from interface org.openxma.dsl.platform.dao.GenericDao
delete, delete, evict, find, findAll, findByExample, get, load, merge, refresh, saveOrUpdate, update
 
Methods inherited from interface org.openxma.dsl.platform.dao.EntityFactory
createEntity
 

Method Detail

create

Supplier create()
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.

Returns:
a new (non managed), empty SupplierDao entity with an already assigned identifier.

create

Supplier create(java.lang.String companyName)
Factory method to create an empty SupplierDao taking all not null attributes.

Parameters:
companyName -
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

Supplier createAndSave(java.lang.String companyName)
Factory method to create and save an empty SupplierDao taking all not null attributes.

Parameters:
companyName -
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

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.

Parameters:
companyName -
Returns:
the persistent Supplier instance, or null if not found


Copyright © 2010. All Rights Reserved.