com.siebel.rf.offline.data.batch
Class BatchFactory

java.lang.Object
  |
  +--com.siebel.rf.offline.branch.datastore.PersistedFactory
        |
        +--com.siebel.rf.offline.data.batch.BatchFactory

public class BatchFactory
extends PersistedFactory

The BatchFactory class


Constructor Summary
BatchFactory()
           
 
Method Summary
static java.util.Collection findByCompanyCodeAndBranchCodeAndCashBoxIdAndBatchStatus(java.lang.String companyCode, java.lang.String branchCode, java.lang.String cashBoxId, java.lang.String batchStatus)
          Returns collection of Batch
static java.util.Collection findByCompanyCodeAndBranchCodeAndCashBoxIdAndDocumentTypeAndCurrencyAndBatchStatus(java.lang.String companyCode, java.lang.String branchCode, java.lang.String cashBoxId, java.lang.String documentType, java.lang.String currency, java.lang.String batchStatus)
          Returns collection of Batch
static java.util.Collection findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchId(java.lang.String companyCode, java.lang.String branchCode, java.lang.String userId, java.lang.String batchDate, java.lang.String batchId)
          Returns collection of Batch
static java.util.Collection findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchStatus(java.lang.String companyCode, java.lang.String branchCode, java.lang.String userId, java.lang.String batchDate, java.lang.String batchStatus)
          Returns collection of Batch
static java.util.Collection findByCompanyCodeBranchCodeUserIdBatchDateAndAmount(java.lang.String companyCode, java.lang.String branchCode, java.lang.String userId, java.lang.String batchDate, double batchAmount)
          Returns collection of Batch
static Batch findByPrimaryKey(java.lang.String companyCode, java.lang.String branchCode, java.lang.String batchId, java.lang.String batchDate, java.lang.String cashBoxId)
          Returns Batch
static Batch getBatch(java.lang.String companyCode, java.lang.String branchCode, java.lang.String batchId, java.lang.String batchDate, java.lang.String cashBoxId)
          Returns Batch
static void purgeProcessedData()
          deletes the processed data
static Persisted store(Persisted persisted)
          Updates the Batch
 
Methods inherited from class com.siebel.rf.offline.branch.datastore.PersistedFactory
remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchFactory

public BatchFactory()
Method Detail

findByPrimaryKey

public static Batch findByPrimaryKey(java.lang.String companyCode,
                                     java.lang.String branchCode,
                                     java.lang.String batchId,
                                     java.lang.String batchDate,
                                     java.lang.String cashBoxId)
                              throws FinderException
Returns Batch
Parameters:
companyCode - String
branchCode - String
batchId - String
batchDate - String
cashBoxId - String
Returns:
the Batch based on primary key attributes
Throws:
FinderException - This exception is thrown if batch not found

findByCompanyCodeAndBranchCodeAndCashBoxIdAndBatchStatus

public static java.util.Collection findByCompanyCodeAndBranchCodeAndCashBoxIdAndBatchStatus(java.lang.String companyCode,
                                                                                            java.lang.String branchCode,
                                                                                            java.lang.String cashBoxId,
                                                                                            java.lang.String batchStatus)
Returns collection of Batch
Parameters:
companyCode - String
branchCode - String
cashBoxId - String
batchStatus - String
Returns:
the collection of Batch based on companyCode, branchCode, cashBoxId and batchStatus

findByCompanyCodeAndBranchCodeAndCashBoxIdAndDocumentTypeAndCurrencyAndBatchStatus

public static java.util.Collection findByCompanyCodeAndBranchCodeAndCashBoxIdAndDocumentTypeAndCurrencyAndBatchStatus(java.lang.String companyCode,
                                                                                                                      java.lang.String branchCode,
                                                                                                                      java.lang.String cashBoxId,
                                                                                                                      java.lang.String documentType,
                                                                                                                      java.lang.String currency,
                                                                                                                      java.lang.String batchStatus)
Returns collection of Batch
Parameters:
companyCode - String
brahchCode - String
cashBoxId - String
documentType - String
currency - String
batchStatus - String
Returns:
the collection of Batch based on companyCode, branchCode, cashBoxId, documentType, currency and batchStatus

findByCompanyCodeBranchCodeUserIdBatchDateAndAmount

public static java.util.Collection findByCompanyCodeBranchCodeUserIdBatchDateAndAmount(java.lang.String companyCode,
                                                                                       java.lang.String branchCode,
                                                                                       java.lang.String userId,
                                                                                       java.lang.String batchDate,
                                                                                       double batchAmount)
Returns collection of Batch
Parameters:
companyCode - String
branchCode - String
userId - String
batchDate - String
batchAmount - double
Returns:
the collection of Batch based on companyCode, branchCode, userId, batchDate and batchAmount

findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchStatus

public static java.util.Collection findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchStatus(java.lang.String companyCode,
                                                                                                     java.lang.String branchCode,
                                                                                                     java.lang.String userId,
                                                                                                     java.lang.String batchDate,
                                                                                                     java.lang.String batchStatus)
Returns collection of Batch
Parameters:
companyCode - String
branchCode - String
userId - String
batchDate - String
batchStatus - String
Returns:
the collection of Batch based on companyCode, branchCode, userId, batchDate and batchStatus

findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchId

public static java.util.Collection findByCompanyCodeAndBranchCodeAndUserIdAndBatchDateAndBatchId(java.lang.String companyCode,
                                                                                                 java.lang.String branchCode,
                                                                                                 java.lang.String userId,
                                                                                                 java.lang.String batchDate,
                                                                                                 java.lang.String batchId)
Returns collection of Batch
Parameters:
companyCode - String
branchCode - String
userId - String
batchDate - String
batchId - String
Returns:
the collection of Batch based on companyCode, branchCode, userId, batchDate and batchId

getBatch

public static Batch getBatch(java.lang.String companyCode,
                             java.lang.String branchCode,
                             java.lang.String batchId,
                             java.lang.String batchDate,
                             java.lang.String cashBoxId)
                      throws com.bankframe.ejb.ProcessingErrorException
Returns Batch
Parameters:
companyCode - String
branchCode - String
batchId - String
batchDate - String
cashBoxId - String
Returns:
an instance of the Batch
Throws:
com.bankframe.ejb.ProcessingErrorException - This exception is thrown if processing fails

store

public static Persisted store(Persisted persisted)
                       throws com.bankframe.validation.ValidationException
Updates the Batch
Parameters:
persisted - Persisted
Returns:
Batch
Throws:
com.bankframe.ejb.ProcessingErrorException - This exception is thrown if processing fails

purgeProcessedData

public static void purgeProcessedData()
deletes the processed data