org.openxma.dsl.reference.dao
Interface ProductImageDao

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

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

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

See Also:
ProductImageDao

Method Summary
 ProductImage create()
          Factory method to create an empty ProductImageDao entity with an already assigned identifier.
 ProductImage create(Product product, java.lang.String name, java.lang.String fileName)
          Factory method to create an empty ProductImageDao taking all not null attributes.
 ProductImage createAndSave(Product product, java.lang.String name, java.lang.String fileName)
          Factory method to create and save an empty ProductImageDao taking all not null attributes.
 
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

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

create

ProductImage create(Product product,
                    java.lang.String name,
                    java.lang.String fileName)
Factory method to create an empty ProductImageDao taking all not null attributes.

Parameters:
product -
name -
fileName -
Returns:
a new, transient (i.e. is not associated with a persistence context and has no persistent representation in the database) ProductImageDao entity with the given natural identifier and not null attributes set.

createAndSave

ProductImage createAndSave(Product product,
                           java.lang.String name,
                           java.lang.String fileName)
Factory method to create and save an empty ProductImageDao taking all not null attributes.

Parameters:
product -
name -
fileName -
Returns:
a new, transient (i.e. is not associated with a persistence context and has no persistent representation in the database) ProductImageDao entity with the given natural identifier and not null attributes set.


Copyright © 2010. All Rights Reserved.