com.ibm.dbb.build.report.records

Class PropertiesRecord



  • public class PropertiesRecord
    extends Record
    A basic record containing a list of name,value pairs
    • Constructor Summary

      Constructors 
      Constructor and Description
      PropertiesRecord()
      Construct a record with a default ID
      PropertiesRecord(java.lang.String id)
      Create a PropertiesRecord with a specific ID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • PropertiesRecord

        public PropertiesRecord()
        Construct a record with a default ID
      • PropertiesRecord

        public PropertiesRecord(java.lang.String id)
        Create a PropertiesRecord with a specific ID
        Parameters:
        id - the record id
    • Method Detail

      • addProperty

        public void addProperty(java.lang.String name,
                                java.lang.String value)
        Add a name,value pair to the record
        Parameters:
        name - name of the property
        value - value of the property
      • getProperty

        public java.lang.String getProperty(java.lang.String name)
        Return the value of the property stored in this record
        Parameters:
        name - the name of the property to be retrieved
        Returns:
        the value of the property
      • getProperties

        public java.util.Map<java.lang.String,java.lang.String> getProperties()
        Return a list of properties in this record
        Returns:
        the list of properties in this record
      • toJSON

        public com.ibm.json.java.JSONObject toJSON()
        Returns the record in JSON format.
        Overrides:
        toJSON in class Record
        Returns:
        the JSON format of this record.
      • parse

        public Record parse(com.ibm.json.java.JSONObject jsonObj)
        Create the record from JSON.
        Overrides:
        parse in class Record
        Parameters:
        jsonObj - The object in JSON to be parsed.
        Returns:
        the record representing by the supplied JSON contents.

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.