You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by Alain <al...@gmail.com> on 2022/04/28 10:17:36 UTC

How to change EdmDate default type

In our implementation we need to support java.sql.Date and java.util.Date
as default types and would like to determine such default types when
building the CSDL.

Given that this is a primitive type, and that a lot of logic and code path,
think ABNF, depends on this, we don't want to go with a non-primitive type
with all the consequences, like function parameter specification, etc.

In EdmDate#internalValueOfString code is there to support a number of
default types to support such a case, but the class is final and there is
no setter for the default type, and even if there was, it is unclear where
and how it could be changed. Making the class non final would also break
things as primitive expect the type to be part of the EdmPrimitiveTypeKind
and use its factory.

So, what is the correct approach here? How is this supported right now? And
if not, what is your suggestion, including if needed to patch the codebase.

Thanks
Alain