Package org.netxms.client.mt
Class MappingTable
java.lang.Object
org.netxms.client.mt.MappingTable
Mapping table
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<MappingTableEntry>protected Stringprotected intprotected UUIDprotected intprotected Stringstatic final intFlag which indicates that mapping table contain numeric keys. -
Constructor Summary
ConstructorsConstructorDescriptionMappingTable(String name, String description) Create new empty mapping table with ID 0.MappingTable(NXCPMessage msg) Create mapping table object from NXCP messageMappingTable(MappingTable src) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidBuild has for fast lookupvoidfillMessage(NXCPMessage msg) Fill NXCP message with table's datafinal List<MappingTableEntry>getData()final Stringfinal intgetFlags()getGuid()final intgetId()final StringgetName()Lookup value in mapping tablefinal voidsetDescription(String description) final voidsetFlags(int flags) final void
-
Field Details
-
NUMERIC_KEYS
public static final int NUMERIC_KEYSFlag which indicates that mapping table contain numeric keys.- See Also:
-
id
protected int id -
guid
-
name
-
description
-
flags
protected int flags -
data
-
hashMap
-
-
Constructor Details
-
MappingTable
Create new empty mapping table with ID 0.- Parameters:
name- mapping table namedescription- mapping table description
-
MappingTable
Create mapping table object from NXCP message- Parameters:
msg- NXCP message
-
MappingTable
Copy constructor- Parameters:
src- source mapping table
-
-
Method Details
-
fillMessage
Fill NXCP message with table's data- Parameters:
msg- NXCP message
-
lookup
Lookup value in mapping table- Parameters:
key- key value- Returns:
- value for given key
-
buildHash
public void buildHash()Build has for fast lookup -
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- 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
- Returns:
- the data
-
getGuid
- Returns:
- the guid
-