org.openxma.dsl.reference.dao
Interface AddressDao

All Superinterfaces:
org.openxma.dsl.platform.dao.EntityFactory<Address>, org.openxma.dsl.platform.dao.GenericDao<Address,java.lang.String>
All Known Implementing Classes:
AddressDaoImpl

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

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 AddressDao.

See Also:
AddressDao

Method Summary
 Address create()
          Factory method to create an empty AddressDao entity with an already assigned identifier.
 
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

Address create()
Factory method to create an empty AddressDao 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 AddressDao entity with an already assigned identifier.


Copyright © 2010. All Rights Reserved.