date time handling - STEMLab/geotools GitHub Wiki
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
java.sql.TimeStamp
java.sql.Time
java.sql.Date
Data Input
Property Binding
Data Ouput
java.util.Date
java.util.Calendar
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.