1. Torque
  2. TORQUE-160

Criteria should not inherit from hashtable


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta1
    • Component/s: None
    • Labels:


      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.


        Thomas Fox created issue -
        Thomas Fox made changes -
        Field Original Value New Value
        Assignee Thomas Fox [ tfischer ]
        Thomas Fox made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0 [ 12312102 ]
        Resolution Fixed [ 1 ]
        Thomas Fox made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        12s 1 Thomas Fox 29/May/11 17:47
        Resolved Resolved Closed Closed
        483d 13h 18m 1 Thomas Fox 24/Sep/12 07:06


          • Assignee:
            Thomas Fox
            Thomas Fox
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: