IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.channel.smart.data.controller
Class ItemListDAO

java.lang.Object
  extended by com.ibm.btt.channel.smart.data.controller.ItemListDAO
All Implemented Interfaces:
IItemListDAO

public class ItemListDAO
extends java.lang.Object
implements IItemListDAO

A data access object (DAO) providing persistence and search support for ItemList entities. Transaction control of the save(), update() and delete() operations must be handled externally by senders of these methods or must be manually added to each of these methods for data to be persisted to the JPA datastore.

See Also:
com.ibm.btt.channel.smart.data.controller.ItemList

Field Summary
static java.lang.String DESCRIPTION
           
static java.lang.String NAME
           
static java.lang.String TYPE
           
 
Constructor Summary
ItemListDAO()
           
 
Method Summary
 void delete(ItemList entity)
          Delete a persistent ItemList entity.
 java.util.List<ItemList> findAll(int... rowStartIdxAndCount)
          Find all ItemList entities.
 java.util.List<ItemList> findByDescription(java.lang.Object description, int... rowStartIdxAndCount)
          find all ItemList entities with description
 ItemList findById(java.lang.String id)
          find ItemList entities with id
 java.util.List<ItemList> findByItemName(java.lang.Object itemName, int... rowStartIdxAndCount)
          find all ItemList entities with item name
 java.util.List<ItemList> findByProperty(java.lang.String propertyName, java.lang.Object value, int... rowStartIdxAndCount)
          Find all ItemList entities with a specific property value.
 java.util.List<ItemList> findByType(java.lang.Object type, int... rowStartIdxAndCount)
          find all ItemList entities with type
 void save(ItemList entity)
          Perform an initial save of a previously unsaved ItemList entity.
 ItemList update(ItemList entity)
          Persist a previously saved ItemList entity and return it or a copy of it to the sender.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
See Also:
Constant Field Values
Constructor Detail

ItemListDAO

public ItemListDAO()
Method Detail

save

public void save(ItemList entity)
Perform an initial save of a previously unsaved ItemList entity. All subsequent persist actions of this entity should use the #update() method. This operation must be performed within the a database transaction context for the entity's data to be permanently saved to the persistence store, i.e., database. This method uses the EntityManager#persist operation.
 EntityManagerHelper.beginTransaction();
 ItemListDAO.save(entity);
 EntityManagerHelper.commit();
 

Specified by:
save in interface IItemListDAO
Parameters:
entity - ItemList entity to persist
Throws:
java.lang.RuntimeException - when the operation fails

delete

public void delete(ItemList entity)
Delete a persistent ItemList entity. This operation must be performed within the a database transaction context for the entity's data to be permanently deleted from the persistence store, i.e., database. This method uses the EntityManager#delete operation.
 EntityManagerHelper.beginTransaction();
 ItemListDAO.delete(entity);
 EntityManagerHelper.commit();
 entity = null;
 

Specified by:
delete in interface IItemListDAO
Parameters:
entity - ItemList entity to delete
Throws:
java.lang.RuntimeException - when the operation fails

update

public ItemList update(ItemList entity)
Persist a previously saved ItemList entity and return it or a copy of it to the sender. A copy of the ItemList entity parameter is returned when the JPA persistence mechanism has not previously been tracking the updated entity. This operation must be performed within the a database transaction context for the entity's data to be permanently saved to the persistence store, i.e., database. This method uses the EntityManager#merge operation.
 EntityManagerHelper.beginTransaction();
 entity = ItemListDAO.update(entity);
 EntityManagerHelper.commit();
 

Specified by:
update in interface IItemListDAO
Parameters:
entity - ItemList entity to update
Returns:
ItemList the persisted ItemList entity instance, may not be the same
Throws:
java.lang.RuntimeException - if the operation fails

findById

public ItemList findById(java.lang.String id)
find ItemList entities with id

Specified by:
findById in interface IItemListDAO
Parameters:
String - id
Returns:
ItemList

findByType

public java.util.List<ItemList> findByType(java.lang.Object type,
                                           int... rowStartIdxAndCount)
find all ItemList entities with type

Specified by:
findByType in interface IItemListDAO
Parameters:
Object - type
int... - rowStartIdxAndCount
Returns:
List

findByProperty

public java.util.List<ItemList> findByProperty(java.lang.String propertyName,
                                               java.lang.Object value,
                                               int... rowStartIdxAndCount)
Find all ItemList entities with a specific property value.

Specified by:
findByProperty in interface IItemListDAO
Parameters:
propertyName - the name of the ItemList property to query
value - the property value to match
rowStartIdxAndCount - Optional int varargs. rowStartIdxAndCount[0] specifies the the row index in the query result-set to begin collecting the results. rowStartIdxAndCount[1] specifies the the maximum number of results to return.
Returns:
List found by query

findByItemName

public java.util.List<ItemList> findByItemName(java.lang.Object itemName,
                                               int... rowStartIdxAndCount)
find all ItemList entities with item name

Specified by:
findByItemName in interface IItemListDAO
Parameters:
ObjectitemName -
int... - rowStartIdxAndCount
Returns:
List

findByDescription

public java.util.List<ItemList> findByDescription(java.lang.Object description,
                                                  int... rowStartIdxAndCount)
find all ItemList entities with description

Specified by:
findByDescription in interface IItemListDAO
Parameters:
Object - description
int... - rowStartIdxAndCount
Returns:
List

findAll

public java.util.List<ItemList> findAll(int... rowStartIdxAndCount)
Find all ItemList entities.

Specified by:
findAll in interface IItemListDAO
Parameters:
final - int... rowStartIdxAndCount
Returns:
List

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011