You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Florent Guillaume (JIRA)" <ji...@apache.org> on 2010/10/10 21:57:31 UTC
[jira] Created: (CMIS-259) Simplify value vs multi-value management
in high-level API
Simplify value vs multi-value management in high-level API
----------------------------------------------------------
Key: CMIS-259
URL: https://issues.apache.org/jira/browse/CMIS-259
Project: Chemistry
Issue Type: Improvement
Affects Versions: 0.1.0-incubating
Reporter: Florent Guillaume
Assignee: Florent Guillaume
Fix For: 0.2.0-incubating
This part of the high-level API is hard to use:
<T> T getPropertyValue(String id);
<T> List<T> getPropertyMultivalue(String id);
Because the caller has two call two different methods depending on the type when in the end he just wants an object.
Same problem for setters:
<T> void setProperty(String id, T value);
<T> void setPropertyMultivalue(String id, List<T> value);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CMIS-259) Simplify value vs multi-value
management in high-level API
Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florent Guillaume resolved CMIS-259.
------------------------------------
Resolution: Fixed
Done in http://svn.apache.org/viewcvs?view=rev&rev=1006347
> Simplify value vs multi-value management in high-level API
> ----------------------------------------------------------
>
> Key: CMIS-259
> URL: https://issues.apache.org/jira/browse/CMIS-259
> Project: Chemistry
> Issue Type: Improvement
> Affects Versions: 0.1.0-incubating
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Fix For: 0.2.0-incubating
>
>
> This part of the high-level API is hard to use:
> <T> T getPropertyValue(String id);
> <T> List<T> getPropertyMultivalue(String id);
> Because the caller has two call two different methods depending on the type when in the end he just wants an object.
> Same problem for setters:
> <T> void setProperty(String id, T value);
> <T> void setPropertyMultivalue(String id, List<T> value);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CMIS-259) Simplify value vs multi-value
management in high-level API
Posted by "Florent Guillaume (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919652#action_12919652 ]
Florent Guillaume commented on CMIS-259:
----------------------------------------
Replace the two getters with:
<T> T getPropertyValue(String id);
Which returns a single value for a single-valued property, and a list for a multi-valued property.
Replace the two setters with:
<T> void setProperty(String id, Object value);
The <T> being used internally in the implementation to help casting.
Also add to Property<T> a method:
<U> U getValue();
That would do the same (we cannot use <T> here).
The internal ObjectFactory.createPropertyMultivalue method is also simplified along similar lines. The PersistentPropertyImpl constructor is changed also to always take a list.
> Simplify value vs multi-value management in high-level API
> ----------------------------------------------------------
>
> Key: CMIS-259
> URL: https://issues.apache.org/jira/browse/CMIS-259
> Project: Chemistry
> Issue Type: Improvement
> Affects Versions: 0.1.0-incubating
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Fix For: 0.2.0-incubating
>
>
> This part of the high-level API is hard to use:
> <T> T getPropertyValue(String id);
> <T> List<T> getPropertyMultivalue(String id);
> Because the caller has two call two different methods depending on the type when in the end he just wants an object.
> Same problem for setters:
> <T> void setProperty(String id, T value);
> <T> void setPropertyMultivalue(String id, List<T> value);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.