Results 1 to 5 of 5

Thread: JobParametersBuilder - No add new int parameter

  1. #1
    Join Date
    Sep 2011
    Posts
    8

    Default JobParametersBuilder - No add new int parameter

    I was looking for a method that will add an int variable/parameter under JobParametersBuilder class but it seems this is not available. May I know the reason why there is no method to add an int parameter? Although I know there is work around on this one - convert string to int.

  2. #2
    Join Date
    Sep 2011
    Posts
    8

    Default

    Up..
    Need some response.

    Thanks

  3. #3

    Default

    JobParameter : Domain representation of a parameter to a batch job. Only the following types can be parameters: String, Long, Date, and Double.
    Thats why the builder don't provide int method.

  4. #4
    Join Date
    Sep 2011
    Posts
    8

    Default

    Quote Originally Posted by ticino View Post
    JobParameter : Domain representation of a parameter to a batch job. Only the following types can be parameters: String, Long, Date, and Double.
    Thats why the builder don't provide int method.
    Thanks for the reply ticono.

    "Domain representation of a parameter to a batch job" What does it mean? Please elaborate.

    If that is the case, how will you add an int paramater aside from the work around that I had mentioned.

  5. #5

    Default

    Quote Originally Posted by linoyabut View Post
    "Domain representation of a parameter to a batch job" What does it mean? Please elaborate.
    each job and its parameters are persisted in the Spring Batch Infrastructure tables, see e.g. the DB2 table definition

    Code:
    CREATE TABLE BATCH_JOB_PARAMS  (
    	JOB_INSTANCE_ID BIGINT NOT NULL ,
    	TYPE_CD VARCHAR(6) NOT NULL ,
    	KEY_NAME VARCHAR(100) NOT NULL , 
    	STRING_VAL VARCHAR(250) , 
    	DATE_VAL TIMESTAMP DEFAULT NULL ,
    	LONG_VAL BIGINT ,
    	DOUBLE_VAL DOUBLE PRECISION ,
    	constraint JOB_INST_PARAMS_FK foreign key (JOB_INSTANCE_ID)
    	references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
    ) ;
    there is no int (SMALLINT / INTEGER in db2) defined

    if you need it, pls create a JIRA Feature Request

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •