Announcement Announcement Module
Collapse
No announcement yet.
JobParametersBuilder - No add new int parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Up..
    Need some response.

    Thanks

    Comment


    • #3
      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.

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment

          Working...
          X