Class MappedRecordImpl

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map, jakarta.resource.cci.MappedRecord, jakarta.resource.cci.Record

    public class MappedRecordImpl
    extends java.lang.Object
    implements jakarta.resource.cci.MappedRecord
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      MappedRecordImpl()
      Public Constructor
      MappedRecordImpl​(java.lang.String newRecordName, java.lang.String newRecordDescription, java.util.HashMap newMap)
      Public Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears the record
      java.lang.Object clone()
      Makes a copy of this MappedRecord
      boolean containsKey​(java.lang.Object key)
      Determines if the record contains a specific key.
      boolean containsValue​(java.lang.Object value)
      Determines if the record contains a specific value.
      java.util.Set<java.util.Map.Entry<java.lang.String,​byte[]>> entrySet()
      Answers a Set of the mappings contained in this record.
      byte[] get​(java.lang.Object key)
      Returns the value that is mapped to the specified key.
      int getDataSize()
      Get the number of bytes of data currently stored.
      java.lang.String getRecordName()
      Get the current record name.
      java.lang.String getRecordShortDescription()
      Get the current description
      boolean isEmpty()
      Checks to see if the record is currently empty.
      java.util.Set<java.lang.String> keySet()
      Returns a Set view of the keys contained in this record.
      byte[] put​(java.lang.Object key, java.lang.Object value)
      Adds a mapping to the record.
      void putAll​(java.util.Map t)
      Copies all the mappings from the given Map to the current record.
      byte[] remove​(java.lang.Object key)
      Removes an mapping with a specific key from the record.
      void setRecordName​(java.lang.String name)
      Set the current record name.
      void setRecordShortDescription​(java.lang.String description)
      Set the current description
      int size()
      Returns the number of records that are in the record.
      java.util.Collection<byte[]> values()
      Returns a Collection of all the values in the record.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
      • Methods inherited from interface jakarta.resource.cci.Record

        equals, hashCode
    • Constructor Detail

      • MappedRecordImpl

        public MappedRecordImpl()
        Public Constructor
      • MappedRecordImpl

        public MappedRecordImpl​(java.lang.String newRecordName,
                                java.lang.String newRecordDescription,
                                java.util.HashMap newMap)
        Public Constructor
        Parameters:
        newRecordName - The record name for this Mapped Record.
        newRecordDescription - The short description for this Mapped Record.
        newMap - A Map filled with any values to prepopulate the Mapped Record with.
    • Method Detail

      • getRecordName

        public java.lang.String getRecordName()
        Get the current record name.
        Specified by:
        getRecordName in interface jakarta.resource.cci.Record
        Returns:
        The name of the record.
      • getRecordShortDescription

        public java.lang.String getRecordShortDescription()
        Get the current description
        Specified by:
        getRecordShortDescription in interface jakarta.resource.cci.Record
        Returns:
        The description of the record.
      • getDataSize

        public int getDataSize()
        Get the number of bytes of data currently stored.
        Returns:
        Number of bytes
      • setRecordName

        public void setRecordName​(java.lang.String name)
        Set the current record name.
        Specified by:
        setRecordName in interface jakarta.resource.cci.Record
        Parameters:
        name - The name of the record.
      • setRecordShortDescription

        public void setRecordShortDescription​(java.lang.String description)
        Set the current description
        Specified by:
        setRecordShortDescription in interface jakarta.resource.cci.Record
        Parameters:
        description - The description of the record.
      • clear

        public void clear()
        Clears the record
        Specified by:
        clear in interface java.util.Map
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Determines if the record contains a specific key.
        Specified by:
        containsKey in interface java.util.Map
        Parameters:
        key - The key to check for.
        Returns:
        True if the record contains the key.
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Determines if the record contains a specific value.
        Specified by:
        containsValue in interface java.util.Map
        Parameters:
        value - The value to check for.
        Returns:
        True if the record contains the value.
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​byte[]>> entrySet()
        Answers a Set of the mappings contained in this record.
        Specified by:
        entrySet in interface java.util.Map
        Returns:
        A Set of the mappings.
      • get

        public byte[] get​(java.lang.Object key)
        Returns the value that is mapped to the specified key.
        Specified by:
        get in interface java.util.Map
        Parameters:
        key - The key to use.
        Returns:
        The value which is mapped to the specified key.
      • isEmpty

        public boolean isEmpty()
        Checks to see if the record is currently empty.
        Specified by:
        isEmpty in interface java.util.Map
        Returns:
        True if the record is empty.
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Returns a Set view of the keys contained in this record.
        Specified by:
        keySet in interface java.util.Map
        Returns:
        A Set of the keys.
      • put

        public byte[] put​(java.lang.Object key,
                          java.lang.Object value)
        Adds a mapping to the record.
        Specified by:
        put in interface java.util.Map
        Parameters:
        key - The key.
        value - The value.
        Returns:
        The previous value for this mapping (or null if there was no previous mapping).
      • putAll

        public void putAll​(java.util.Map t)
        Copies all the mappings from the given Map to the current record.
        Specified by:
        putAll in interface java.util.Map
        Parameters:
        t - The Map to copy from
      • remove

        public byte[] remove​(java.lang.Object key)
        Removes an mapping with a specific key from the record.
        Specified by:
        remove in interface java.util.Map
        Parameters:
        key - The key of the mapping to be removed.
        Returns:
        The value of the removed mapping.
      • size

        public int size()
        Returns the number of records that are in the record.
        Specified by:
        size in interface java.util.Map
        Returns:
        The number of elements in the record.
      • values

        public java.util.Collection<byte[]> values()
        Returns a Collection of all the values in the record.
        Specified by:
        values in interface java.util.Map
        Returns:
        The collection of all the values.
      • clone

        public java.lang.Object clone()
        Makes a copy of this MappedRecord
        Specified by:
        clone in interface jakarta.resource.cci.Record
        Returns:
        A copy of this Mapped Record