Package com.ibm.websphere.ola
Class MappedRecordImpl
- java.lang.Object
-
- com.ibm.websphere.ola.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
-
-
Constructor Summary
Constructors Constructor Description MappedRecordImpl()Public ConstructorMappedRecordImpl(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 voidclear()Clears the recordjava.lang.Objectclone()Makes a copy of this MappedRecordbooleancontainsKey(java.lang.Object key)Determines if the record contains a specific key.booleancontainsValue(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.intgetDataSize()Get the number of bytes of data currently stored.java.lang.StringgetRecordName()Get the current record name.java.lang.StringgetRecordShortDescription()Get the current descriptionbooleanisEmpty()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.voidputAll(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.voidsetRecordName(java.lang.String name)Set the current record name.voidsetRecordShortDescription(java.lang.String description)Set the current descriptionintsize()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
-
-
-
-
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:
getRecordNamein interfacejakarta.resource.cci.Record- Returns:
- The name of the record.
-
getRecordShortDescription
public java.lang.String getRecordShortDescription()
Get the current description- Specified by:
getRecordShortDescriptionin interfacejakarta.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:
setRecordNamein interfacejakarta.resource.cci.Record- Parameters:
name- The name of the record.
-
setRecordShortDescription
public void setRecordShortDescription(java.lang.String description)
Set the current description- Specified by:
setRecordShortDescriptionin interfacejakarta.resource.cci.Record- Parameters:
description- The description of the record.
-
clear
public void clear()
Clears the record- Specified by:
clearin interfacejava.util.Map
-
containsKey
public boolean containsKey(java.lang.Object key)
Determines if the record contains a specific key.- Specified by:
containsKeyin interfacejava.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:
containsValuein interfacejava.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:
entrySetin interfacejava.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:
getin interfacejava.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:
isEmptyin interfacejava.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:
keySetin interfacejava.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:
putin interfacejava.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:
putAllin interfacejava.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:
removein interfacejava.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:
sizein interfacejava.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:
valuesin interfacejava.util.Map- Returns:
- The collection of all the values.
-
clone
public java.lang.Object clone()
Makes a copy of this MappedRecord- Specified by:
clonein interfacejakarta.resource.cci.Record- Returns:
- A copy of this Mapped Record
-
-