Class MappedRecordImpl

java.lang.Object
com.ibm.websphere.ola.MappedRecordImpl
All Implemented Interfaces:
Serializable, Cloneable, Map, jakarta.resource.cci.MappedRecord, jakarta.resource.cci.Record

public class MappedRecordImpl extends Object implements jakarta.resource.cci.MappedRecord
See Also:
  • Constructor Details

    • MappedRecordImpl

      public MappedRecordImpl()
      Public Constructor
    • MappedRecordImpl

      public MappedRecordImpl(String newRecordName, String newRecordDescription, 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 Details

    • getRecordName

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

      public 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(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(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 Map
    • containsKey

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

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

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

      public byte[] get(Object key)
      Returns the value that is mapped to the specified key.
      Specified by:
      get in interface 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 Map
      Returns:
      True if the record is empty.
    • keySet

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

      public byte[] put(Object key, Object value)
      Adds a mapping to the record.
      Specified by:
      put in interface 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(Map t)
      Copies all the mappings from the given Map to the current record.
      Specified by:
      putAll in interface Map
      Parameters:
      t - The Map to copy from
    • remove

      public byte[] remove(Object key)
      Removes an mapping with a specific key from the record.
      Specified by:
      remove in interface 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 Map
      Returns:
      The number of elements in the record.
    • values

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

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