Skip to content
Jody Garnett edited this page Apr 11, 2015 · 2 revisions

Problem: Mapping to Java Date is not specific enough
Solution: Map to java.sql classes
**Scope: **Update DataStore implementations; SQL DataStores should be easy

Data Input

Property Binding

Data Ouput

xs:dateTime

java.sql.TimeStamp

xs:dateTime

xs:date

java.sql.Time

xs:date

xs:time

java.sql.Date

xs:time

Data Input

Property Binding

Data Ouput

java.util.Date

xs:dateTime

java.util.Calendar

xs:datetime

As you can see this fix still allows the use of Date and calendar; even though they are to vague to be useful in many situations. This fix simply
adds the option of the java.sql classes in order to let people be more specific. java.util.Date and java.util.Calendar are accepted as inputs
into the datastores, but when the feature type is datastore generated, a specific java.sql type should be used.

Please note that converstions should be defined between:

  • java.util.Date and java.sql.Time, java.sql.Date, java.sql.TimeStamp
  • java.util.Calendar and java.sql.Time, java.sql.Date, java.sql.TimeStamp

The use of converstions will let existing client code work with java.util.Date.

Clone this wiki locally