IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.channel.smart.data.controller
Interface IBehaviorLogDAO

All Known Implementing Classes:
BehaviorLogDAO

public interface IBehaviorLogDAO

Interface for BehaviorLogDAO.


Method Summary
 void delete(BehaviorLog entity)
          Delete a persistent BehaviorLog entity.
 java.util.List<BehaviorLog> findAll(int... rowStartIdxAndCount)
          Find all BehaviorLog entities.
 java.util.List<BehaviorLog> findByBehaviorType(java.lang.Object behaviorType, int... rowStartIdxAndCount)
          find all behavior entities with behaviorType
 BehaviorLog findById(java.lang.String id)
          find the BehaviorLog entities by id
 java.util.List<BehaviorLog> findByProperty(java.lang.String propertyName, java.lang.Object value, int... rowStartIdxAndCount)
          Find all BehaviorLog entities with a specific property value.
 java.util.List<BehaviorLog> findByUserId(java.lang.Object userId, int... rowStartIdxAndCount)
          find all behavior entities with userId
 void save(BehaviorLog entity)
          Perform an initial save of a previously unsaved BehaviorLog entity.
 BehaviorLog update(BehaviorLog entity)
          Persist a previously saved BehaviorLog entity and return it or a copy of it to the sender.
 

Method Detail

save

void save(BehaviorLog entity)
Perform an initial save of a previously unsaved BehaviorLog 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();
 IBehaviorLogDAO.save(entity);
 EntityManagerHelper.commit();
 

Parameters:
entity - BehaviorLog entity to persist
Throws:
java.lang.RuntimeException - when the operation fails

delete

void delete(BehaviorLog entity)
Delete a persistent BehaviorLog 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();
 IBehaviorLogDAO.delete(entity);
 EntityManagerHelper.commit();
 entity = null;
 

Parameters:
entity - BehaviorLog entity to delete
Throws:
java.lang.RuntimeException - when the operation fails

update

BehaviorLog update(BehaviorLog entity)
Persist a previously saved BehaviorLog entity and return it or a copy of it to the sender. A copy of the BehaviorLog 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 = IBehaviorLogDAO.update(entity);
 EntityManagerHelper.commit();
 

Parameters:
entity - BehaviorLog entity to update
Returns:
BehaviorLog the persisted BehaviorLog entity instance, may not be the same
Throws:
java.lang.RuntimeException - if the operation fails

findById

BehaviorLog findById(java.lang.String id)
find the BehaviorLog entities by id

Parameters:
String - id
Returns:
BehaviorLog

findByProperty

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

Parameters:
propertyName - the name of the BehaviorLog 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 count of results to return.
Returns:
List found by query

findByUserId

java.util.List<BehaviorLog> findByUserId(java.lang.Object userId,
                                         int... rowStartIdxAndCount)
find all behavior entities with userId

Parameters:
Object - userId
int... - rowStartIdxAndCount
Returns:
List

findByBehaviorType

java.util.List<BehaviorLog> findByBehaviorType(java.lang.Object behaviorType,
                                               int... rowStartIdxAndCount)
find all behavior entities with behaviorType

Parameters:
Object - userId
int... - rowStartIdxAndCount
Returns:
List

findAll

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

Parameters:
int... - rowStartIdxAndCount
Returns:
List

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011