Class ProjectionParams

All Implemented Interfaces:
Serializable, Cloneable, Iterable<String>, Collection<String>, List<String>, RandomAccess

public class ProjectionParams extends ArrayList<String>
Defines projection parameters with list if fields to include into query results.

The parameters support two formats: dot format and nested format.

The dot format is the standard way to define included fields and subfields using dot object notation: "field1,field2.field21,field2.field22.field221"

As alternative the nested format offers a more compact representation: "field1,field2(field21,field22(field221))"

### Example ###

 
 FilterParams filter = FilterParams.fromTuples("type", "Type1");
 PagingParams paging = new PagingParams(0, 100);
 ProjectionParams projection = ProjectionParams.fromString("field1,field2(field21,field22)")
 
 myDataClient.getDataByFilter(filter, paging, projection);
 
 
See Also:
  • Constructor Details

    • ProjectionParams

      public ProjectionParams()
    • ProjectionParams

      public ProjectionParams(String[] values)
      Creates a new instance of the projection parameters and assigns its value.
      Parameters:
      values - (optional) values to initialize this object.
    • ProjectionParams

      public ProjectionParams(AnyValueArray array)
      Creates a new instance of the projection parameters and assigns its value.
      Parameters:
      array - (optional) values to initialize this object.
  • Method Details

    • fromValue

      public static ProjectionParams fromValue(Object value)
      Converts specified value into ProjectionParams.
      Parameters:
      value - value to be converted
      Returns:
      a newly created ProjectionParams.
      See Also:
    • fromValues

      public static ProjectionParams fromValues(String... values)
      Parses comma-separated list of projection fields.
      Parameters:
      values - one or more comma-separated lists of projection fields
      Returns:
      a newly created ProjectionParams.
    • fromValues

      public static ProjectionParams fromValues(char delimiter, String... values)
      Parses comma-separated list of projection fields.
      Parameters:
      delimiter - a certain type of delimiter
      values - one or more comma-separated lists of projection fields
      Returns:
      a newly created ProjectionParams.
    • toString

      public String toString()
      Gets a string representation of the object. The result is a comma-separated list of projection fields "field1,field2.field21,field2.field22.field221"
      Overrides:
      toString in class AbstractCollection<String>
      Returns:
      a string representation of the object.