Class TypedAssociation

  • All Implemented Interfaces:

    public class TypedAssociation
    extends Association

    Purpose: Generic association object. This can be used to map hashtable/map containers where the key and value are non-typed primitives.

    James Sutherland
    TOPLink/Java 3.0
    • Field Detail

      • keyType

        protected Class keyType
      • valueType

        protected Class valueType
    • Constructor Detail

      • TypedAssociation

        public TypedAssociation()
        Default constructor.
      • TypedAssociation

        public TypedAssociation​(Object key,
                                Object value)
        PUBLIC: Create an association.
    • Method Detail

      • getKeyType

        public Class getKeyType()
        PUBLIC: Return the class of the key.
      • getValueType

        public Class getValueType()
        PUBLIC: Return the class of the value.
      • postBuild

        public void postBuild​(DescriptorEvent event)
        INTERNAL: Handler for the descriptor post build event. Convert the key and values to their appropriate type.
      • setKeyType

        public void setKeyType​(Class keyType)
        PUBLIC: Set the class of the key.
      • setValueType

        public void setValueType​(Class valueType)
        PUBLIC: Set the class of the value.