Database implementation of IJobInstanceDao. Uses sequences (via IDataFieldMaxValueIncrementer abstraction) to create all primary keys before inserting a new row. Objects are checked to ensure all mandatory fields to be stored are not null. If any are found to be null, an ArgumentException will be thrown. More...
Public Member Functions | |
JobInstance | CreateJobInstance (string jobName, JobParameters jobParameters) |
Creates a job instance with given name and parameters. A job instance with the same name and parameters should not already exist. More... | |
JobInstance | GetJobInstance (string jobName, JobParameters jobParameters) |
JobInstance | GetJobInstance (long instanceId) |
JobInstance | GetJobInstance (JobExecution jobExecution) |
IList< JobInstance > | GetJobInstances (string jobName, int start, int count) |
Fetches a list of of job instances ordered by descending primary key. More... | |
IList< string > | GetJobNames () |
| |
int | GetJobInstanceCount (string jobName) |
Public Member Functions inherited from Summer.Batch.Core.Repository.Dao.AbstractDbBatchMetadataDao | |
virtual void | AfterPropertiesSet () |
Checks that DbOperator has been correctly set. More... | |
Properties | |
IDataFieldMaxValueIncrementer | JobIncrementer [set] |
The data field incrementer for job instance ids. More... | |
Properties inherited from Summer.Batch.Core.Repository.Dao.AbstractDbBatchMetadataDao | |
string | TablePrefix [get, set] |
The prefix for the batch persistence tables in the database. Default value is "BATCH_". More... | |
DbOperator | DbOperator [get, set] |
The database operator used for persistence. More... | |
IPlaceholderGetter | PlaceholderGetter [get, set] |
The parameter helper used to create parameter placeholders in queries. More... | |
Additional Inherited Members | |
Public Attributes inherited from Summer.Batch.Core.Repository.Dao.AbstractDbBatchMetadataDao | |
const string | TablePrefixSetting = "TablePrefix" |
The name of the setting for the table prefix. More... | |
const string | DefaultTablePrefix = "BATCH_" |
Default table prefix constant. More... | |
const int | DefaultExitMessageLength = 2500 |
Default exit message length constant. More... | |
Protected Member Functions inherited from Summer.Batch.Core.Repository.Dao.AbstractDbBatchMetadataDao | |
string | InsertTablePrefix (string query) |
Inserts the table prefix in the specified query. It uses the string.Format(string,object) syntax, and expect the prefix to be the parameter 0 ( More... | |
Static Protected Attributes inherited from Summer.Batch.Core.Repository.Dao.AbstractDbBatchMetadataDao | |
static readonly TransactionOptions | TransactionOptions |
The default transaction options for transaction scopes in the DAOs. More... | |
Detailed Description
Database implementation of IJobInstanceDao. Uses sequences (via IDataFieldMaxValueIncrementer abstraction) to create all primary keys before inserting a new row. Objects are checked to ensure all mandatory fields to be stored are not null. If any are found to be null, an ArgumentException will be thrown.
Member Function Documentation
JobInstance Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.CreateJobInstance | ( | string | jobName, |
JobParameters | jobParameters | ||
) |
Creates a job instance with given name and parameters. A job instance with the same name and parameters should not already exist.
- Parameters
-
jobName the job name jobParameters job parameters
- Returns
- a new persisted job instance
summary> Returns the job instance for the given job name and parameters.
- Parameters
-
jobName a job name jobParameters job parameters
- Returns
- the job instance with the given name and parameters or
null
if it does not exist
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
JobInstance Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.GetJobInstance | ( | string | jobName, |
JobParameters | jobParameters | ||
) |
- Parameters
-
jobName a job name jobParameters job parameters
- Returns
- the job instance with the given name and parameters or
null
if it does not exist
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
JobInstance Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.GetJobInstance | ( | long | instanceId | ) |
- Parameters
-
instanceId an id
- Returns
- the job instance with the given id or
null
if it does not exist
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
JobInstance Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.GetJobInstance | ( | JobExecution | jobExecution | ) |
- Parameters
-
jobExecution a job execution
- Returns
- the job instance for the given job execution or
null
if it does not exist
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
int Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.GetJobInstanceCount | ( | string | jobName | ) |
- Parameters
-
jobName a job name
- Returns
- the number of job instances for the given job name
- Exceptions
-
Summer.Batch.Core.Launch.NoSuchJobException if there are no job instances for this job name.
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
IList<JobInstance> Summer.Batch.Core.Repository.Dao.DbJobInstanceDao.GetJobInstances | ( | string | jobName, |
int | start, | ||
int | count | ||
) |
Fetches a list of of job instances ordered by descending primary key.
- Parameters
-
jobName the name of a job start the index of the first instance to return count the number of instances to return
- Returns
- a list containing the requested job instances
Implements Summer.Batch.Core.Repository.Dao.IJobInstanceDao.
Property Documentation
|
set |
The data field incrementer for job instance ids.
The documentation for this class was generated from the following file:
- Summer.Batch.Core/Core/Repository/Dao/DbJobInstanceDao.cs