Package com.netrics.likeit

## Class NetricsMappedRecord

- java.lang.Object
- - com.netrics.likeit.NetricsBaseRecord
  - - com.netrics.likeit.NetricsRecord
    - - com.netrics.likeit.NetricsMappedRecord

- All Implemented Interfaces:
    `java.io.Serializable`
  Direct Known Subclasses:
    `NetricsSearchResult`

      public class NetricsMappedRecord
      extends NetricsRecord

  A NetricsMappedRecord inherits from a NetricsRecord, and has additional functionality which allows the user to access the fields of the record by field name or number.
  See Also:
    `NetricsServerInterface.recget(java.lang.String, java.lang.String[])`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.netrics.likeit.NetricsRecord

      `NetricsRecord.ChildType`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getAttribute​(java.lang.String field_name, java.lang.String attr_name)` | Return an attribute value for a particular field and attribute.
    `java.lang.String[]` | `getAttrNames​(java.lang.String field_name)` | Return a list of attribute names for a field.
    `java.lang.String` | `getField​(int fieldNo)` | Returns the contents of a field in the record.
    `java.lang.String` | `getField​(java.lang.String fieldName)` | Returns the contents of a field in the record.
    `java.lang.String[]` | `getFieldNames()` | Returns an array of Strings which are the names of the fields of the source table for the record.
    `int[]` | `getFieldTypes()` | Returns an array of integers which are the types of the fields of the source table for the record.

    - ### Methods inherited from class com.netrics.likeit.NetricsBaseRecord

      `compare, getAttribute, getAttrNames, getAttrValues, getFields, getKey, getParentKey, numBytes, toString`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getFieldNames

          public java.lang.String[] getFieldNames()

      Returns an array of Strings which are the names of the fields of the source table for the record.
      Returns:
        The names of the table's fields

    - #### getFieldTypes

          public int[] getFieldTypes()

      Returns an array of integers which are the types of the fields of the source table for the record.
      Returns:
        The types of the table's fields

    - #### getField

          public java.lang.String getField​(java.lang.String fieldName)
                                    throws NetricsException

      Returns the contents of a field in the record.
      Parameters:
        `fieldName` - The name of the field for which to return its data
      Returns:
        The contents of the field
      Throws:
        `NetricsException` - if teh name is invalid or the names are not mapped.

    - #### getField

          public java.lang.String getField​(int fieldNo)

      Returns the contents of a field in the record.
      Parameters:
        `fieldNo` - The number of the field (0 based) to be returned
      Returns:
        The contents of the field

    - #### getAttrNames

          public java.lang.String[] getAttrNames​(java.lang.String field_name)
                                          throws NetricsException

      Return a list of attribute names for a field.
      This returns a list of the names of all of the attributes in a particular named field. If the field can't be parsed as a Variable Attributes set null is returned. If there is no such named field an exception is thrown.
      Parameters:
        `field_name` - The name of the field.
      Returns:
        An array of attribute names in the original order, null if this is not a Variable Attributes field.
      Throws:
        `NetricsException` - thrown if no field with the given name exists.

    - #### getAttribute

          public java.lang.String getAttribute​(java.lang.String field_name,
                                               java.lang.String attr_name)
                                        throws NetricsException

      Return an attribute value for a particular field and attribute.
      This returns the value of a named attribute for a named field. If there is no such named field an exception is thrown. If the field can't be parsed as a Variable Attributes set or the set does not contain an attribute with the given name null is returned.
      Parameters:
        `field_name` - The name of the field.
        `attr_name` - The name of the attribute.
      Returns:
        The attribute value, null if this is not a Variable Attributes field or it contains no such attribute.
      Throws:
        `NetricsException` - thrown if no field with the given name exists.