You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2011/05/29 19:47:47 UTC
[jira] [Created] (TORQUE-160) Criteria should not inherit from
hashtable
Criteria should not inherit from hashtable
------------------------------------------
Key: TORQUE-160
URL: https://issues.apache.org/jira/browse/TORQUE-160
Project: Torque
Issue Type: Improvement
Reporter: Thomas Fox
The reasons for suggesting this are:
- Criteria is not a logical specialisation of a Hash map.
- To retain current signatures and comply with java5 generics, Criteria would have to be declared as HashMap<String, Object>, while technically it is a HashMap<String, Criteria.Criterion>
- the current "put" method does not follow the contract of a Map's put method:
Criteria.put() returns the Criteria itself, whereas Map.put() returns the value which previously had the passed key.
Also, if you put() an object into a criteria and then get() the same key, you do not receive the object you put() but a Criteria.Criterion containing the object you put in. This is also not the behaviour expected by a map.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Closed] (TORQUE-160) Criteria should not inherit from
hashtable
Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Fox closed TORQUE-160.
-----------------------------
> Criteria should not inherit from hashtable
> ------------------------------------------
>
> Key: TORQUE-160
> URL: https://issues.apache.org/jira/browse/TORQUE-160
> Project: Torque
> Issue Type: Improvement
> Reporter: Thomas Fox
> Assignee: Thomas Fox
> Fix For: 4.0-beta1
>
>
> The reasons for suggesting this are:
> - Criteria is not a logical specialisation of a Hash map.
> - To retain current signatures and comply with java5 generics, Criteria would have to be declared as HashMap<String, Object>, while technically it is a HashMap<String, Criteria.Criterion>
> - the current "put" method does not follow the contract of a Map's put method:
> Criteria.put() returns the Criteria itself, whereas Map.put() returns the value which previously had the passed key.
> Also, if you put() an object into a criteria and then get() the same key, you do not receive the object you put() but a Criteria.Criterion containing the object you put in. This is also not the behaviour expected by a map.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Assigned] (TORQUE-160) Criteria should not inherit from
hashtable
Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Fox reassigned TORQUE-160:
---------------------------------
Assignee: Thomas Fox
> Criteria should not inherit from hashtable
> ------------------------------------------
>
> Key: TORQUE-160
> URL: https://issues.apache.org/jira/browse/TORQUE-160
> Project: Torque
> Issue Type: Improvement
> Reporter: Thomas Fox
> Assignee: Thomas Fox
> Fix For: 4.0
>
>
> The reasons for suggesting this are:
> - Criteria is not a logical specialisation of a Hash map.
> - To retain current signatures and comply with java5 generics, Criteria would have to be declared as HashMap<String, Object>, while technically it is a HashMap<String, Criteria.Criterion>
> - the current "put" method does not follow the contract of a Map's put method:
> Criteria.put() returns the Criteria itself, whereas Map.put() returns the value which previously had the passed key.
> Also, if you put() an object into a criteria and then get() the same key, you do not receive the object you put() but a Criteria.Criterion containing the object you put in. This is also not the behaviour expected by a map.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org
[jira] [Resolved] (TORQUE-160) Criteria should not inherit from
hashtable
Posted by "Thomas Fox (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TORQUE-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Fox resolved TORQUE-160.
-------------------------------
Resolution: Fixed
Fix Version/s: 4.0
> Criteria should not inherit from hashtable
> ------------------------------------------
>
> Key: TORQUE-160
> URL: https://issues.apache.org/jira/browse/TORQUE-160
> Project: Torque
> Issue Type: Improvement
> Reporter: Thomas Fox
> Assignee: Thomas Fox
> Fix For: 4.0
>
>
> The reasons for suggesting this are:
> - Criteria is not a logical specialisation of a Hash map.
> - To retain current signatures and comply with java5 generics, Criteria would have to be declared as HashMap<String, Object>, while technically it is a HashMap<String, Criteria.Criterion>
> - the current "put" method does not follow the contract of a Map's put method:
> Criteria.put() returns the Criteria itself, whereas Map.put() returns the value which previously had the passed key.
> Also, if you put() an object into a criteria and then get() the same key, you do not receive the object you put() but a Criteria.Criterion containing the object you put in. This is also not the behaviour expected by a map.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org