Commit Graph

320 Commits

Author SHA1 Message Date
Michael Bolz ec603917e5 [OLINGO-1408] Minor change to fix tests 2019-11-25 21:28:36 +01:00
Michael Bolz 302f991e5b [OLINGO-1408] Applied code formatter 2019-11-25 20:49:09 +01:00
Adrian Görler 932af8fb5d [OLINGO-1408] Support new date time API (#57)
* Fix usage of Calendar in tests

The tests use Calendar instances. For some test cases the time zone of a
Calendar instance is changed and then passed to the valueToString
method.

Unfortunately after just changing the time zone the Calendar only
changes the time zone but not the value of the calculated fields like
YEAR, MONTH, ... . These fields are recalculated only if they are read
by get(YEAR), get(MONTH), ... . The implementation of valueToString
clones the Calendar instance before fields are computed resulting in
a corrupt clone.

This change

1) makes sure that the test the fields in the Calendar instances used
   in the tests are computed
2) makes sure that the valueToString method triggers a computation of
the fields before cloning the Calendar

* Support types of new Date/Time API

The types of the new Date/Time API can now be used as property values.

The following mappings are now supported

EdmDateTimeOffset
- java.time.Instant
- java.time.ZonedDateTime
- java.util.Calendar
- java.util.Date
- java.sql.Timestamp
- java.lang.Long

EdmDate
- java.time.LocalDate
- java.sql.Date

EdmTimeOfDay
- java.time.LocalTime
- java.sql.Time

Only these mappings capture the semantics correctly.

For legacy reasons also supported are the following mappings are still
supported:

EdmDate
- java.util.Calendar (date component in the TZ of the calendar)
- java.util.Date     (date component in UTC)
- java.sql.Timestamp (date component in UTC)
- java.lang.Long     (date component in UTC)

EdmTimeOfDay
- java.util.Calendar (time component in the TZ of the calendar)
- java.util.Date     (time component in UTC)
- java.sql.Timestamp (time component in UTC)
- java.lang.Long     (time component in UTC)

For legacy reasons the default mapping types are unchanged (and remain
semantically incorrect):

EdmDateTimeOffset -> java.sql.Timestamp
EdmDate           -> java.util.Calendar
EdmTimeOfDay      -> java.util.Calendar

* Allow additional (but semantically wrong) conversions

EdmDate -> java.util.Date, java.sql.Timestamp
EdmTimeOfDay -> java.util.Date, java.sql.Timestamp
2019-11-25 19:32:58 +01:00
Ian Allen f4a6baeaee OLINGO-1400 - remove duplicate call to provider.getEntityContainer() in EdmProviderImpl.createEntityContainer 2019-09-26 10:38:44 -03:00
ramya vasanth 6c2103ccd4 [OLINGO-1391]Code Improvements 2019-09-13 14:28:48 +05:30
ramya vasanth 510b213cd6 [OLINGO-1393]Validate the values for a Decimal data type as per latest spec 2019-09-09 10:51:15 +05:30
ramya vasanth 405fb76088 [OLINGO-1375]OData V4: EntitySet in function Import need not be prefixed with namespace 2019-06-27 14:26:41 +05:30
ramya vasanth aca474ff64 [OLINGO-1368]OData V4: Support In Operator in filters 2019-06-17 14:23:36 +05:30
ramya vasanth 0c7460a2a2 Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/olingo-odata4.git 2019-05-15 11:30:24 +05:30
ramya vasanth c41d10e8dc [OLINGO-1062] Code improvements for support of annotations 2019-05-15 11:29:01 +05:30
Dirk Mahler 7ff8ffdf37 OLINGO-1357 use s map to cache EdmPrimitiveTypeKind values for lookup 2019-05-13 14:13:40 +02:00
mibo 24fed9b1b6 [OLINGO-1330] cache name in getName() 2019-05-10 17:59:17 +02:00
mibo e35f36abc5 [OLINGO-1352] Set 4.7.0-SNAPSHOT as development version 2019-05-05 08:12:19 +02:00
mibo 6e0a5cb43a [OLINGO-1352] Set version to 4.6.0 for release 2019-05-05 07:27:37 +02:00
mibo 68181b9676 [OLINGO-1352] Set version to 4.6.0-RC01 2019-05-01 06:56:06 +02:00
Archana Rai fb2d21d703 [OLINGO-1296] EdmDateTimeOffSet precision validation 2018-09-26 13:52:49 +05:30
shawkins ebdf0d3e3a OLINGO-1294 adding polygon support for multiple interior rings 2018-09-21 17:36:02 -04:00
Archana Rai 8cbe468c2a [OLINGO-1062]Cannot consume Odata Reference Services with Annotations 2018-08-20 11:31:08 +05:30
Christian Amend 0f39306541 [OLINGO-1284] Set next 4.6.0-SNAPSHOT development version 2018-08-13 15:26:45 +02:00
Christian Amend 7290f7ea4d [OLINGO-1284] Set 4.5.0 release version 2018-08-13 15:25:07 +02:00
Christian Amend cde4f0723f [OLINGO-1284] Set 4.5.0-RC01 version 2018-08-06 14:28:45 +02:00
Ramesh Reddy f0188a6ecb OLINGO-1150: The precision and scale checks are being made on exponential form than the denormalized form 2018-06-21 13:56:19 -05:00
Ramesh Reddy 1012bcb248 OLINGO-1150: allowing support to read decimal values presented in the exponential form 2018-01-19 11:03:46 -06:00
Archana Rai 1ce51fd4ec [OLINGO-1202]Bound function scenarios, samples and tests 2017-11-13 16:07:34 +05:30
ramya vasanth 8f40d49c46 [OLINGO-1191]Code improvements 2017-10-24 11:15:15 +05:30
Archana Rai 96223df38d [OLINGO-1191]Code improvements 2017-10-24 10:52:54 +05:30
Christian Amend 4cae638ff5 [OLINGO-1171] Set next 4.5.0-SNAPSHOT version 2017-09-01 15:35:37 +02:00
Christian Amend 9858f1d04c [OLINGO-1171] Set 4.4.0 release version 2017-09-01 15:15:49 +02:00
Christian Amend b98eb1fc6c [OLINGO-1171] Set 4.4.0-RC01 version 2017-08-29 09:58:49 +02:00
ramya vasanth d4f1b73875 [OLINGO-1159] Enhancements to Bound Actions in V4 2017-08-09 15:56:52 +05:30
Archana Rai 8130360d7c [OLINGO-1100]Get related binding target returns wrong entity set 2017-06-22 16:27:39 +05:30
ramya vasanth 8f1a079faf [OLINGO-1062] Cannot consume Term defined in external vocabulary 2017-06-21 13:27:06 +05:30
Archana Rai 2dc14d6764 Revert "[OLINGO-1062]Cannot consume Term defined in external Vocabulary"
This reverts commit ce4bc57a84.
2017-06-21 11:13:56 +05:30
ramya vasanth ce4bc57a84 [OLINGO-1062]Cannot consume Term defined in external Vocabulary 2017-06-21 10:59:27 +05:30
Archana Rai 01c6aa1592 Cross Service EDM
Change-Id: I14ed9771c85e576c33d51ed3ea05e6323c20c51a
Signed-off-by: Archana Rai <archana.rai@sap.com>
Signed-off-by: Christian Amend <christian.amend@sap.com>
2016-12-13 10:10:22 +01:00
Christian Amend 59e53d6bca [OLINGO-1023] Set next 4.4.0-SNAPSHOT version 2016-09-19 14:16:21 +02:00
Christian Amend 31401845a7 [OLINGO-1023] Set 4.3.0 release version 2016-09-19 13:46:34 +02:00
Christian Amend 8515b48dd5 [OLINGO-1023] Set 4.3.0-RC01 version 2016-09-15 14:28:27 +02:00
Christian Amend c0f1b997ef [OLINGO-993] Set SNAPSHOT version again 2016-07-29 11:16:16 +02:00
Christian Amend d7a2b65d94 i[OLINGO-993] Set beta version 2016-07-29 10:55:32 +02:00
Klaus Straubinger 61b2f72a38 [OLINGO-935] content-type parameter values are case insensitive
Signed-off-by: Christian Amend <christian.amend@sap.com>
2016-07-25 11:09:38 +02:00
Klaus Straubinger 77423380bb [OLINGO-935] better type determination for client serializer + clean-up
Signed-off-by: Christian Amend <christian.amend@sap.com>
2016-07-14 10:41:10 +02:00
Ramesh Reddy 3c0225c9da OLINGO-567: Support for odata.metadata=full 2016-06-26 07:50:39 -07:00
Christian Amend 43feffc48f [OLINGO-936] Preserve Stacktrace 2016-04-28 14:02:51 +02:00
Christian Amend 3baa3993ea [OLINGO-922] Set next 4.3.0-SNAPSHOT version 2016-04-05 14:11:24 +02:00
Christian Amend 88fbe2f66e [OLINGO-922] Set 4.2.0 release version 2016-04-04 15:59:59 +02:00
Christian Amend bfeab37b1b [OLINGO-922] Set release candidate version 4.2.0-RC01 2016-03-31 16:56:03 +02:00
mibo 3190d00fd1 [OLINGO-852] Fixed Apache analysis issues 2016-03-25 05:33:34 +01:00
Klaus Straubinger 9381ecfa56 [OLINGO-864] use local timezone for technical service
Signed-off-by: Christian Amend <christian.amend@sap.com>
2016-03-01 15:38:05 +01:00
Michael Bolz a44f38d70d [OLINGO-832] Added javadoc and minor code clean up 2016-02-25 21:30:23 +01:00