Transaction Webservice API

StorageProviderDataList extends DataList

Method Summary
PacketDataList addDataList(String name, DataList dataList)

Combines the given DataList with this one in a new DataList. Columns that match the names of this DataList are included and others are omited.

DataList applyFilter(DataListFilter filter)

Returns a new DataList with records from this list that match the filter.

PacketDataList bubble(String name, String idColumn, String idDelim, String countColumn, String xColumn, String yColumn, boolean relative)

Performs an aggregation on the data elements of this list and returns a list suitable for use in bubble charts.

String calcMD5()

Returns an MD5 checksum of the contents of this list.

PacketDataList collapse(String keyId, String[] keyColumns, String listColumn, String[] listColumns)

Reduces a list with duplicate data into a list with unique data adding a new serialized JSON column containing the duplicate information. See also tag c:expand.

PacketDataList copy(String name)

Creates a new PacketDataList from this DataList.

DataListFilter createAndFilter()

Creates an empty DataListFilter based on this DataList. Filter will return records matching all constraints.

DataListFilter createOrFilter()

Creates an empty DataListFilter based on this DataList. Filter will return records matching any constraints.

Payload createSublists(String prefix, int listSize)

Returns a Payload containing one or more lists named prefixN (starting with 1) with a list called prefix containing the names of the lists created.

DataRecord findRecord(DataListFilter filter)

Finds the first record matching the given filter. Returns null if no matching record found.

DataRecord findRecord(String column, String value)

Returns the first record whose column matches the given value.

PacketDataList flatten(String keyId)

Reduces a list with duplicate data into a list with unique data with later rows filling in empty values in prior rows that match the key.

PacketDataList flatten(String[] key, String countColumn)

Reduces a list with duplicate data into a list with unique data with later rows filling in empty values in prior rows that match the multi-value key. An optional countColumn can be created which represents the number of times the composite key was encountered.

int getColumnCount()

Returns the column count for this list

String[] getColumnNames()

Returns the columns of this DataList

DataList getColumns()

Returns the column names of this DataList as a DataList.

String getMarker()

Returns the marker, if any, used in paging.

String getName()

Returns the name of this list

DataRecord getRecord(int index)

Returns the record at the specified index

int getRecordCount()

Returns the number of records in this list

double getTotal(String column, double defaultValue)

Returns the total of the given column. If the value of the individual record cannot compute to a double, defaultValue is used.

int getTotalRecordCount(DataListFilter filter)

Returns the total count of records that match the DataListFilter.

boolean isReadOnly()

Returns true if this is a read-only list

PacketDataList joinDataList(String name, String joinColumn, DataList dataList)

Joins the DataList with this one into a new DataList that is joined by the joinColumn and that has the columns of both data lists.

PacketDataList mergeDataList(String name, DataList dataList, String indexColumn)

Merges the DataList with this one into a new DataList using an indexed column. All records in this list are kept but the values that match the index column are replaced by those in the supplied dataList. The index column should contain unique values representing a 1:1 relationship between the two lists.

PacketDataList pivot(String key, String pivot, String amt, String op)

Returns a new list with the key, the same name with columns specified by the pivot values, and the key+'Total' on the specified operation. The amt column must be numeric and maximum columns is 100.

  setName(String name)

Sets the name of this list.

PacketDataList split(String name, String[] columns)

Returns a new datalist containing only those columns specified.

PacketDataList sublist(String name, int start, int end)

Creates a new PacketDataList from this DataList with the range of records specified. Returns an empty list if no more records within the range.

String[] toArray(String columnName)

Returns the values of the specified column as an array. Throws exception if the column does not exist.

Data toData(String keyColumn, String valueColumn, boolean addNullValues)

Creates a Data object with keys coming from key column and values from value column. Overwrites any keys that are duplicated. Returns null if the keyColumn or valueColumn does not exist. If addNullValues is true then null values will be added as empty string.

File toFile(String fileName, String delim)

Creates csv/pipe/tab delimited file from data list. File will reflect current datalist state. Further modifications of datalist will not have effect on file contents. File limit is controlled by the max data export size of the activation key.

String toJSON(boolean compressDataList)

Returns contents as a JSON string.

String toJsonArray(boolean includeNull, Data typeMap)

Returns contents as a JSON Array string. An optional key map should have field name types defined as string, int, long, double, boolean, or date. This method is limited by the max export size of the activation key.

String toString()

Returns a description of this object.

Method Detail


PacketDataList addDataList(String name, DataList dataList)

Combines the given DataList with this one in a new DataList. Columns that match the names of this DataList are included and others are omited.

Parameters:

Returns:  PacketDataList

Since: 01-19-2009

top

DataList applyFilter(DataListFilter filter)

Returns a new DataList with records from this list that match the filter.

Parameters:

Returns:  DataList

Since: 01-19-2009

top

PacketDataList bubble(String name, String idColumn, String idDelim, String countColumn, String xColumn, String yColumn, boolean relative)

Performs an aggregation on the data elements of this list and returns a list suitable for use in bubble charts.

Parameters:

  • String   name  - Name of the list to be returned. Required parameter.
  • String   idColumn  - Name of the column in this list that contains labels.
  • String   idDelim  - Delimiter to use if you specify an idColumn. Default is comma [,]..
  • String   countColumn  - Name of column to store the count. This column cannot already exist in the DataList.. Required parameter.
  • String   xColumn  - Name of the column in the DataList containing numbers to analyze for the X-Axis. Required parameter.
  • String   yColumn  - Name of the column in the DataList containing numbers to analyze for the Y-Axis. Required parameter.
  • boolean   relative  - If true, all buckets will be relative to the maximum entry of each column. Otherwise all buckets are relative to the sum of all values in the columns. Default is false.. Required parameter.

Returns:  PacketDataList

Since: 07-01-2011

top

String calcMD5()

Returns an MD5 checksum of the contents of this list.

Returns:  String

Since: 05-15-2014

top

PacketDataList collapse(String keyId, String[] keyColumns, String listColumn, String[] listColumns)

Reduces a list with duplicate data into a list with unique data adding a new serialized JSON column containing the duplicate information. See also tag c:expand.

Parameters:

  • String   keyId Required parameter.
  • String[]   keyColumns Required parameter.
  • String   listColumn Required parameter.
  • String[]   listColumns Required parameter.

Returns:  PacketDataList

Since: 03-28-2019

top

PacketDataList copy(String name)

Creates a new PacketDataList from this DataList.

Parameters:

  • String   name

Returns:  PacketDataList

Since: 11-19-2009

top

DataListFilter createAndFilter()

Creates an empty DataListFilter based on this DataList. Filter will return records matching all constraints.

Returns:  DataListFilter

Since: 01-13-2009

top

DataListFilter createOrFilter()

Creates an empty DataListFilter based on this DataList. Filter will return records matching any constraints.

Returns:  DataListFilter

Since: 01-13-2009

top

Payload createSublists(String prefix, int listSize)

Returns a Payload containing one or more lists named prefixN (starting with 1) with a list called prefix containing the names of the lists created.

Parameters:

  • String   prefix  - Prefix name for all sublists and index list.. Required parameter.
  • int   listSize  - How many records to include in each sub list.. Required parameter.

Returns:  Payload

Since: 05-15-2014

top

DataRecord findRecord(DataListFilter filter)

Finds the first record matching the given filter. Returns null if no matching record found.

Parameters:

Returns:  DataRecord

Since: 09-11-2009

top

DataRecord findRecord(String column, String value)

Returns the first record whose column matches the given value.

Parameters:

  • String   column
  • String   value

Returns:  DataRecord

Since: 04-28-2009

top

PacketDataList flatten(String keyId)

Reduces a list with duplicate data into a list with unique data with later rows filling in empty values in prior rows that match the key.

Parameters:

  • String   keyId Required parameter.

Returns:  PacketDataList

Since: 08-07-2019

top

PacketDataList flatten(String[] key, String countColumn)

Reduces a list with duplicate data into a list with unique data with later rows filling in empty values in prior rows that match the multi-value key. An optional countColumn can be created which represents the number of times the composite key was encountered.

Parameters:

  • String[]   key Required parameter.
  • String   countColumn

Returns:  PacketDataList

Since: 06-29-2023

top

int getColumnCount()

Returns the column count for this list

Returns:  int

Since: 07-11-2008

top

String[] getColumnNames()

Returns the columns of this DataList

Returns:  String[]

Since: 01-19-2009

top

DataList getColumns()

Returns the column names of this DataList as a DataList.

Returns:  DataList


DataList Name: columns
DataList Fields: name

Since: 02-16-2011

top

String getMarker()

Returns the marker, if any, used in paging.

Returns:  String

Since: 09-19-2016

top

String getName()

Returns the name of this list

Returns:  String

Since: 07-11-2008

top

DataRecord getRecord(int index)

Returns the record at the specified index

Parameters:

  • int   index

Returns:  DataRecord

Since: 07-11-2008

top

int getRecordCount()

Returns the number of records in this list

Returns:  int

Since: 07-11-2008

top

double getTotal(String column, double defaultValue)

Returns the total of the given column. If the value of the individual record cannot compute to a double, defaultValue is used.

Parameters:

  • String   column
  • double   defaultValue

Returns:  double

Since: 09-23-2008

top

int getTotalRecordCount(DataListFilter filter)

Returns the total count of records that match the DataListFilter.

Parameters:

Returns:  int

Since: 03-25-2009

top

boolean isReadOnly()

Returns true if this is a read-only list

Returns:  boolean

Since: 08-16-2007

top

PacketDataList joinDataList(String name, String joinColumn, DataList dataList)

Joins the DataList with this one into a new DataList that is joined by the joinColumn and that has the columns of both data lists.

Parameters:

  • String   name
  • String   joinColumn
  • DataList   dataList

Returns:  PacketDataList

Since: 03-03-2009

top

PacketDataList mergeDataList(String name, DataList dataList, String indexColumn)

Merges the DataList with this one into a new DataList using an indexed column. All records in this list are kept but the values that match the index column are replaced by those in the supplied dataList. The index column should contain unique values representing a 1:1 relationship between the two lists.

Parameters:

  • String   name
  • DataList   dataList
  • String   indexColumn

Returns:  PacketDataList

Since: 01-19-2009

top

PacketDataList pivot(String key, String pivot, String amt, String op)

Returns a new list with the key, the same name with columns specified by the pivot values, and the key+'Total' on the specified operation. The amt column must be numeric and maximum columns is 100.

Parameters:

  • String   key Required parameter.
  • String   pivot Required parameter.
  • String   amt Required parameter.
  • String   op Required parameter. Allowed values: sum, avg, max, min, count.

Returns:  PacketDataList

Since: 10-30-2019

top

setName(String name)

Sets the name of this list.

Parameters:

  • String   name

Since: 07-11-2008

top

PacketDataList split(String name, String[] columns)

Returns a new datalist containing only those columns specified.

Parameters:

  • String   name  - Name of the new datalist. Required parameter.
  • String[]   columns  - Name of the columns to include in the new list.. Required parameter.

Returns:  PacketDataList

Since: 06-01-2021

top

PacketDataList sublist(String name, int start, int end)

Creates a new PacketDataList from this DataList with the range of records specified. Returns an empty list if no more records within the range.

Parameters:

  • String   name  - Name of new datalist.. Required parameter.
  • int   start  - Start record, 1 based, inclusive.. Required parameter.
  • int   end  - End record, 1 based, inclusive.. Required parameter.

Returns:  PacketDataList

Since: 01-20-2011

top

String[] toArray(String columnName)

Returns the values of the specified column as an array. Throws exception if the column does not exist.

Parameters:

  • String   columnName Required parameter.

Returns:  String[]

Since: 06-05-2013

top

Data toData(String keyColumn, String valueColumn, boolean addNullValues)

Creates a Data object with keys coming from key column and values from value column. Overwrites any keys that are duplicated. Returns null if the keyColumn or valueColumn does not exist. If addNullValues is true then null values will be added as empty string.

Parameters:

  • String   keyColumn
  • String   valueColumn
  • boolean   addNullValues

Returns:  Data

Since: 10-06-2009

top

File toFile(String fileName, String delim)

Creates csv/pipe/tab delimited file from data list. File will reflect current datalist state. Further modifications of datalist will not have effect on file contents. File limit is controlled by the max data export size of the activation key.

Parameters:

  • String   fileName  - File name. Name should have either csv,txt,tsv or dat extension, otherwise csv extension will be automatically appended. Required parameter. Maximum allowed size of parameter: 64
  • String   delim Required parameter. Allowed values: csv, pipe, tab.

Returns:  File

Since: 11-02-2010

top

String toJSON(boolean compressDataList)

Returns contents as a JSON string.

Parameters:

  • boolean   compressDataList Required parameter.

Returns:  String

Since: 08-30-2010

top

String toJsonArray(boolean includeNull, Data typeMap)

Returns contents as a JSON Array string. An optional key map should have field name types defined as string, int, long, double, boolean, or date. This method is limited by the max export size of the activation key.

Parameters:

  • boolean   includeNull Required parameter.
  • Data   typeMap

Returns:  String

Since: 09-16-2020

top

String toString()

Returns a description of this object.

Returns:  String

Since: 09-19-2016

top
Copyright © 2006 - 2024, ContractPal, Inc. All rights reserved. API Date: Dec 03, 2024 10:24 AM