Package org.netxms.client.mt
Class MappingTable
- java.lang.Object
-
- org.netxms.client.mt.MappingTable
-
public class MappingTable extends Object
Mapping table
-
-
Field Summary
Fields Modifier and Type Field Description protected List<MappingTableEntry>dataprotected Stringdescriptionprotected intflagsprotected UUIDguidprotected Map<String,String>hashMapprotected intidprotected Stringnamestatic intNUMERIC_KEYSFlag which indicates that mapping table contain numeric keys.
-
Constructor Summary
Constructors Constructor Description MappingTable(String name, String description)Create new empty mapping table with ID 0.MappingTable(org.netxms.base.NXCPMessage msg)Create mapping table object from NXCP message
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuildHash()Build has for fast lookupvoidfillMessage(org.netxms.base.NXCPMessage msg)Fill NXCP message with table's dataList<MappingTableEntry>getData()StringgetDescription()intgetFlags()UUIDgetGuid()intgetId()StringgetName()Stringlookup(String key)Lookup value in mapping tablevoidsetDescription(String description)voidsetFlags(int flags)voidsetName(String name)
-
-
-
Field Detail
-
NUMERIC_KEYS
public static final int NUMERIC_KEYS
Flag which indicates that mapping table contain numeric keys.- See Also:
- Constant Field Values
-
id
protected int id
-
guid
protected UUID guid
-
name
protected String name
-
description
protected String description
-
flags
protected int flags
-
data
protected List<MappingTableEntry> data
-
-
Constructor Detail
-
MappingTable
public MappingTable(String name, String description)
Create new empty mapping table with ID 0.- Parameters:
name-description-
-
MappingTable
public MappingTable(org.netxms.base.NXCPMessage msg)
Create mapping table object from NXCP message- Parameters:
msg- NXCP message
-
-
Method Detail
-
fillMessage
public void fillMessage(org.netxms.base.NXCPMessage msg)
Fill NXCP message with table's data- Parameters:
msg- NXCP message
-
lookup
public String lookup(String key)
Lookup value in mapping table- Parameters:
key- key value- Returns:
- value for given key
-
buildHash
public void buildHash()
Build has for fast lookup
-
getName
public final String getName()
- Returns:
- the name
-
setName
public final void setName(String name)
- Parameters:
name- the name to set
-
getDescription
public final String getDescription()
- Returns:
- the description
-
setDescription
public final void setDescription(String description)
- Parameters:
description- the description to set
-
getFlags
public final int getFlags()
- Returns:
- the flags
-
setFlags
public final void setFlags(int flags)
- Parameters:
flags- the flags to set
-
getId
public final int getId()
- Returns:
- the id
-
getData
public final List<MappingTableEntry> getData()
- Returns:
- the data
-
getGuid
public UUID getGuid()
- Returns:
- the guid
-
-