Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Java 8 Dates for Job Parameters #1035

Closed
spring-projects-issues opened this issue Jan 16, 2017 · 4 comments
Closed

Support Java 8 Dates for Job Parameters #1035

spring-projects-issues opened this issue Jan 16, 2017 · 4 comments

Comments

@spring-projects-issues
Copy link
Collaborator

Philippe Marschall opened BATCH-2569 and commented

It would be cool if JobParameter would support the Java 8 Date and Time API. Since the value on the table is of SQL type TIMESTAMP the corresponding type would be LocalDateTime.
Unfortunately due the design of the JobParameter class with a single #getValue() method doing this would break backward compatibility.
One way to avoid this would be a. new getLocalDate() method.


No further details from BATCH-2569

@fmbenhassine fmbenhassine added this to the 5.0.0-M1 milestone Jan 5, 2021
@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label Jan 5, 2021
@fmbenhassine fmbenhassine modified the milestones: 5.0.0-M1, 5.0.0 Jan 21, 2021
@parikshitdutta
Copy link
Contributor

Hi @benas, Please assign me the task, I am starting work on this one.

@fmbenhassine
Copy link
Contributor

Hi @parikshitdutta ,

Thank you for your offer to help.

Since the value on the table is of SQL type TIMESTAMP the corresponding type would be LocalDateTime

We have a feature request to use timezone aware datatypes (see #871), so I'm not sure LocalDateTime would be the right datatype to use if we decide to implement #871. I did not evaluate the impact of such a change yet, so I would like to take some time to think about the best design choices for this feature.

Please note that we did not start working on v5 yet, we just assigned a few issues we think should be addressed in a major version to the v5.0.0 milestone.

@parikshitdutta
Copy link
Contributor

parikshitdutta commented Mar 23, 2021

Thanks @benas for sharing the information.
I will look forward to your finding before taking this task.

@fmbenhassine fmbenhassine modified the milestones: 5.0.0, 5.0.0-M6 Aug 31, 2022
@fmbenhassine fmbenhassine modified the milestones: 5.0.0-M6, 5.0.0-M7 Sep 21, 2022
fmbenhassine added a commit to fmbenhassine/spring-batch that referenced this issue Oct 4, 2022
This commit also changes the way job parameters
are parsed and persisted.

NB: This commit should ideally have been split
into two change sets. But the changes are tightly
related that is was not possible to separate them.

Related to:

* spring-projects#3960
* spring-projects#2122
* spring-projects#1035
* spring-projects#1983
fmbenhassine added a commit to fmbenhassine/spring-batch that referenced this issue Oct 4, 2022
This commit also changes the way job parameters
are parsed and persisted.

NB: This commit should ideally have been split
into two change sets. But the changes are tightly
related that is was not possible to separate them.

Related to:

* spring-projects#3960
* spring-projects#2122
* spring-projects#1035
* spring-projects#1983
fmbenhassine added a commit to fmbenhassine/spring-batch that referenced this issue Oct 4, 2022
This commit also changes the way job parameters
are parsed and persisted.

NB: This commit should ideally have been split
into two change sets. But the changes are tightly
related that is was not possible to separate them.

Related to:

* spring-projects#3960
* spring-projects#2122
* spring-projects#1035
* spring-projects#1983
fmbenhassine added a commit that referenced this issue Oct 4, 2022
This commit also changes the way job parameters
are parsed and persisted.

NB: This commit should ideally have been split
into two change sets. But the changes are tightly
related that is was not possible to separate them.

Related to:

* #3960
* #2122
* #1035
* #1983
@fmbenhassine fmbenhassine changed the title Support Java 8 Dates for Job Parameters [BATCH-2569] Support Java 8 Dates for Job Parameters Oct 5, 2022
@fmbenhassine
Copy link
Contributor

We have a feature request to use timezone aware datatypes (see #871), so I'm not sure LocalDateTime would be the right datatype to use if we decide to implement #871. I did not evaluate the impact of such a change yet, so I would like to take some time to think about the best design choices for this feature.

I will look forward to your finding before taking this task.

@parikshitdutta The impact of #871 was evaluated and the feature was deferred to a future version, see the rationale behind this decision in #871 (comment) and #1014 (comment). Hence, the type of timestamp fields was changed to java.time.LocalDateTime for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants