db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JDO-658) JDOQL : Support for further methods (String, Enum, Date, JDOHelper)
Date Thu, 15 Sep 2011 09:34:08 GMT

    [ https://issues.apache.org/jira/browse/JDO-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105240#comment-13105240
] 

Andy Jefferson commented on JDO-658:
------------------------------------

Hi Michael, patch in general looks fine, and thanks for correcting my cut-paste javadocs;
couple of comments :-
1. String.trim seems to be testing against data in the datastore that doesn't need trimming
(i.e no whitespace present). Is there any sample with whitespace present?
2. Enum.ordinal : is effectively asking the JDO implementation to perform a query, in datastore,
of COLUMN_OF_ENUM_STORED_AS_STRING == {numericValue}. Obviously if the datastore had knowledge
of the possible ordinal-string mapping of an Enum then it would be doable (via a lookup table),
but in general this isn't the case. As a result DataNucleus only implements querying of "Enum.toString"
on an enum persisted as VARCHAR/CHAR, and "Enum.ordinal" on an enum persisted as INTEGER.

> JDOQL : Support for further methods (String, Enum, Date, JDOHelper)
> -------------------------------------------------------------------
>
>                 Key: JDO-658
>                 URL: https://issues.apache.org/jira/browse/JDO-658
>             Project: JDO
>          Issue Type: New Feature
>          Components: specification, tck
>    Affects Versions: JDO 3
>            Reporter: Andy Jefferson
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: JDO-658-mbo.patch, JDO-658.patch, jdohelper_getversion.patch
>
>
> Consider extending JDOQL in JDO3.1 to include a series of new methods, following the
contracts of existing Java classes
> String.charAt(int)
> String.startsWith(String, int)
> String.length()
> String.trim()
> Enum.ordinal()
> Enum.toString()
> The following are obviously deprecated in the JDK, but worth consideration
> Date.getHour()
> Date.getMinutes()
> Date.getSeconds()
> Date.getDay()
> Date.getMonth()
> Date.getYear()
> We already have JDOHelper.getObjectId(Object), so why not add
> JDOHelper.getVersion(Object)
> On a related topic JDO-633 has "List.get(int)".
> Note that all of these are already implemented in the RI.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message