public class PropertiesRecord extends Record
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_PROPERTIES |
Constructor and Description |
---|
PropertiesRecord()
Construct a record with a default ID
|
PropertiesRecord(java.lang.String id)
Create a PropertiesRecord with a specific ID
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String name,
java.lang.String value)
Add a name,value pair to the record
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Return a list of properties in this record
|
java.lang.String |
getProperty(java.lang.String name)
Return the value of the property stored in this record
|
Record |
parse(com.ibm.json.java.JSONObject jsonObj)
Create the record from JSON.
|
com.ibm.json.java.JSONObject |
toJSON()
Returns the record in JSON format.
|
public static final java.lang.String PROP_PROPERTIES
public PropertiesRecord()
public PropertiesRecord(java.lang.String id)
id
- the record idpublic void addProperty(java.lang.String name, java.lang.String value)
name
- name of the propertyvalue
- value of the propertypublic java.lang.String getProperty(java.lang.String name)
name
- the name of the property to be retrievedpublic java.util.Map<java.lang.String,java.lang.String> getProperties()
public com.ibm.json.java.JSONObject toJSON()
<IBM Copyright © 2018 IBM Corp. All Rights Reserved.