com.isomorphic.velocity

## Class ResponseDataWrapper

- java.lang.Object
- - com.isomorphic.velocity.ResponseDataWrapper

- All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.List

      public class ResponseDataWrapper
      extends java.lang.Object
      implements java.util.List

  This class is a wrapper over a DSResponse data object, that enables Velocity code to treat a multi-valued data object (a List or array), as either a list or a single object.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `get(java.lang.Integer index)`
    `java.lang.Object` | `get(java.lang.String propertyName)`
    `java.lang.Object` | `getLast()`
    `java.lang.Object` | `last()`

- - ### Method Detail

    - #### get

          public java.lang.Object get(java.lang.String propertyName)
                               throws java.lang.Exception

      Parameters:
        `propertyName` - The name of the property to return
      Returns:
        The value of the requested property from the response's data member (if the response's data member is a single object), or from the first entry of the response's data member (if the data member is a List or array of objects). The "data member", must be a Map or Javabean, or a List or array of Maps or Javabeans. Properties are extracted from beans in line with the ordinary Javabeans convention that property "foo" is obtained by calling method getFoo()
      Throws:
        `java.lang.Exception`

    - #### get

          public java.lang.Object get(java.lang.Integer index)
                               throws java.lang.Exception

      Parameters:
        `index` - The index of the object to return
      Returns:
        The entry of the response's data member indicated by the index. If the response's data member is not a List or an array, an Exception is thrown
      Throws:
        `java.lang.Exception`

    - #### getLast

          public java.lang.Object getLast()
                                   throws java.lang.Exception

      Returns:
        The last entry of the response's data member, if the data member is a List or array. If the response's data member is not a List or an array, an Exception is thrown
      Throws:
        `java.lang.Exception`

    - #### last

          public java.lang.Object last()
                                throws java.lang.Exception

      Returns:
        The last entry of the response's data member, if the data member is a List or array. If the response's data member is not a List or an array, an Exception is thrown
      Throws:
        `java.lang.Exception`