User API

DataSet extends DataView

Other API in Package

Web

Internal Tunnel

Internal Web

Tunnel

Method Summary
Payload analyze(boolean updateIndexes)

This method analyzes columns and indexes for the Pal, Runtime, and Storage components of this DataSet. If updateIndexes is true, this method will force an update on index information which may lock the DataSet for an extended period of time, therefore you should not call this method on peak usage times or repeatedly.

int bulkDelete(DataViewFilter filter)

Performs bulk delete of all the records matching filter criteria and returns the number of records deleted. The maximum number of records deleted depends on the page size of the filter. Returns -1 if error.

int bulkDelete(String[] list)

Performs bulk delete of the dataset records with primary key ids matching list values. Array limit is 1000.

boolean bulkInsert(DataList list)

Performs bulk insert of datalist into the dataset

boolean bulkInsert(DataList list, boolean insertPk)

Performs bulk insert of datalist into the dataset. If primary key value is present in the list it will insert it into the dataset. Duplicates will cause this method to return false and may result in partial commits. Use c.getError() to interpret failures.

int bulkUpdate(DataViewFilter filter, String column, String value)

Performs bulk update of all records that match the filter, setting the value of the specified column.

AnalyticDataViewFilter createAnalyticFilter()

Returns a new AnalyticSet with no columns selected.

AnalyticDataViewFilter createAnalyticFilter(String[] columns)

Returns a new AnalyticSet with the columns to be selected.

DataViewFilter createFilter()

Returns a new DataViewFilter.

DataSetRecord createRecord()

Creates a new, empty record.

DataSetRecord createRecord(String palId)

Creates a new, empty record.

  deleteRecord(String id)

Deletes the record identified by id.

int deleteRecords(String column, String value)

Deletes matching records.

int encryptColumn(String column)

Encrypts the values in the specified column and returns the number or rows modified. This may have to be called multiple times to repair all rows (max 1000 rows per call). The specified column must be of type Encrypt. This is a utility method to be used when DataSet modifications have resulted in unencrypted columns. This method returns 0 when no more unencrypted records are found.

DataSetRecord findRecord(DataViewFilter filter)

Finds the first record matching the criteria of the filter. Don't use filter.selectColumn(s) when using this method.

DataViewRecord findRecord(DataViewFilter filter)

Finds the first record matching the criteria of the filter. Don't use filter.selectColumn(s) when using this method.

DataSetRecord findRecord(String column, String value)

Finds the first record matching the criteria of column and value.

DataList getColumns()

Returns a read-only DataList containing column information.

DataList getIndexes()

Returns a read-only DataList containing index information for this DataSet.

String getName()

Returns the name of this DataSet.

DataSetRecord getRecord(String id)

Returns the record identified by id.

DataViewList getRecords()

Creates a default filter and returns the first 100 records.

DataViewList getRecords(DataViewFilter filter)

Returns records that match the filter criteria. If filter is null, a default filter is created.

DataViewList getRecords(DataViewFilter filter, String name)

Returns records that match the filter criteria and sets the name of the list. Filter can be null.

double getStorageSize(boolean includeFileStorage)

Returns the size of the DataSet in MB.

int getTotalRecordCount(DataViewFilter filter)

Returns the total count of records that match the DataFilter. Returns total count ignoring pageSize.

DataSetResult insert(Data data)

Creates a new record from the Data. If validation fails for any reason, no record is created.

String insertRecord(DataSetRecord record)

Inserts (persists) this new record. Returns the id of the inserted record.

boolean isEmpty()

Returns true if this dataset has no records.

  setClean(boolean clean)

This will attempt to clean all data that could cause an insert or update failure. This may include truncating length, lowering precision on decimal fields, and removing non ASCII characters.

  setDateFormat(String filter)

Sets the date pattern for displaying dates.

  setDateTimeFormat(String filter)

Sets the date pattern for displaying dates with time.

String toString()

Returns a description of this object.

boolean transfer(DataSet target)

Transfers all records in this dataset to the target dataset. The two datasets must have the same structure and the target dataset should typically be empty to avoid key violations. Not supported for datasets with files.

boolean truncate()

Deletes all records in this dataset. Before calling this method you must manually delete any rows that contain remote files.

DataSetResult update(Data data)

Updates the record, the Data object must contain the target record id. If validation fails for any reason, no record is updated.

boolean updateRecord(DataSetRecord record)

Updates (persists) changes made to the record. Returns false if the record is read only.

ValidityCheck validate(Data data)

Validates the data against the DataSet validation rules and returns the result.

Method Detail


Payload analyze(boolean updateIndexes)

This method analyzes columns and indexes for the Pal, Runtime, and Storage components of this DataSet. If updateIndexes is true, this method will force an update on index information which may lock the DataSet for an extended period of time, therefore you should not call this method on peak usage times or repeatedly.

Parameters:

  • boolean   updateIndexes

Returns:  Payload

Since: 12-06-2018

top

int bulkDelete(DataViewFilter filter)

Performs bulk delete of all the records matching filter criteria and returns the number of records deleted. The maximum number of records deleted depends on the page size of the filter. Returns -1 if error.

Parameters:

Returns:  int

Since: 12-17-2009

top

int bulkDelete(String[] list)

Performs bulk delete of the dataset records with primary key ids matching list values. Array limit is 1000.

Parameters:

  • String[]   list Required parameter.

Returns:  int

Since: 12-17-2009

top

boolean bulkInsert(DataList list)

Performs bulk insert of datalist into the dataset

Parameters:

Returns:  boolean

Since: 12-17-2009

top

boolean bulkInsert(DataList list, boolean insertPk)

Performs bulk insert of datalist into the dataset. If primary key value is present in the list it will insert it into the dataset. Duplicates will cause this method to return false and may result in partial commits. Use c.getError() to interpret failures.

Parameters:

  • DataList   list Required parameter.
  • boolean   insertPk  - Insert primary key.

Returns:  boolean

Since: 07-26-2012

top

int bulkUpdate(DataViewFilter filter, String column, String value)

Performs bulk update of all records that match the filter, setting the value of the specified column.

Parameters:

  • DataViewFilter   filter Required parameter.
  • String   column Required parameter.
  • String   value

Returns:  int

Since: 01-06-2010

top

AnalyticDataViewFilter createAnalyticFilter()

Returns a new AnalyticSet with no columns selected.

Returns:  AnalyticDataViewFilter

Since: 07-10-2008

top

AnalyticDataViewFilter createAnalyticFilter(String[] columns)

Returns a new AnalyticSet with the columns to be selected.

Parameters:

  • String[]   columns

Returns:  AnalyticDataViewFilter

Since: 06-04-2008

top

DataViewFilter createFilter()

Returns a new DataViewFilter.

Returns:  DataViewFilter

Since: 06-04-2008

top

DataSetRecord createRecord()

Creates a new, empty record.

Returns:  DataSetRecord

Since: 06-04-2008

top

DataSetRecord createRecord(String palId)

Creates a new, empty record.

Parameters:

  • String   palId Required parameter.

Returns:  DataSetRecord

Since: 10-20-2009

top

deleteRecord(String id)

Deletes the record identified by id.

Parameters:

  • String   id Required parameter.

Since: 06-04-2008

top

int deleteRecords(String column, String value)

Deletes matching records.

Parameters:

  • String   column Required parameter.
  • String   value Required parameter.

Returns:  int

Since: 06-19-2019

top

int encryptColumn(String column)

Encrypts the values in the specified column and returns the number or rows modified. This may have to be called multiple times to repair all rows (max 1000 rows per call). The specified column must be of type Encrypt. This is a utility method to be used when DataSet modifications have resulted in unencrypted columns. This method returns 0 when no more unencrypted records are found.

Parameters:

  • String   column Required parameter.

Returns:  int

Since: 09-29-2010

top

DataSetRecord findRecord(DataViewFilter filter)

Finds the first record matching the criteria of the filter. Don't use filter.selectColumn(s) when using this method.

Parameters:

Returns:  DataSetRecord

Since: 07-30-2008

top

DataViewRecord findRecord(DataViewFilter filter)

Finds the first record matching the criteria of the filter. Don't use filter.selectColumn(s) when using this method.

Parameters:

Returns:  DataViewRecord

Since: 07-30-2008

top

DataSetRecord findRecord(String column, String value)

Finds the first record matching the criteria of column and value.

Parameters:

  • String   column Required parameter.
  • String   value Required parameter.

Returns:  DataSetRecord

Since: 03-19-2019

top

DataList getColumns()

Returns a read-only DataList containing column information.

Returns:  DataList


DataList Name: columns
DataList Fields: name, type, length, default, notNull, notEmpty, validation, description

Since: 06-04-2008

top

DataList getIndexes()

Returns a read-only DataList containing index information for this DataSet.

Returns:  DataList


DataList Name: indexes
DataList Fields: name, indexedColumns

Since: 10-08-2013

top

String getName()

Returns the name of this DataSet.

Returns:  String

Since: 06-04-2008

top

DataSetRecord getRecord(String id)

Returns the record identified by id.

Parameters:

  • String   id Required parameter.

Returns:  DataSetRecord

Since: 06-04-2008

top

DataViewList getRecords()

Creates a default filter and returns the first 100 records.

Returns:  DataViewList

Since: 09-29-2010

top

DataViewList getRecords(DataViewFilter filter)

Returns records that match the filter criteria. If filter is null, a default filter is created.

Parameters:

Returns:  DataViewList

Since: 06-04-2008

top

DataViewList getRecords(DataViewFilter filter, String name)

Returns records that match the filter criteria and sets the name of the list. Filter can be null.

Parameters:

Returns:  DataViewList

Since: 10-28-2009

top

double getStorageSize(boolean includeFileStorage)

Returns the size of the DataSet in MB.

Parameters:

  • boolean   includeFileStorage  - If this DataSet has file columns, true will include the storage of these files.. Required parameter.

Returns:  double

Since: 10-29-2010

top

int getTotalRecordCount(DataViewFilter filter)

Returns the total count of records that match the DataFilter. Returns total count ignoring pageSize.

Parameters:

Returns:  int

Since: 10-09-2008

top

DataSetResult insert(Data data)

Creates a new record from the Data. If validation fails for any reason, no record is created.

Parameters:

  • Data   data  - Data contains all required information for an initial insert. Required parameter.

Returns:  DataSetResult

Since: 08-04-2012

top

String insertRecord(DataSetRecord record)

Inserts (persists) this new record. Returns the id of the inserted record.

Parameters:

Returns:  String

Since: 06-04-2008

top

boolean isEmpty()

Returns true if this dataset has no records.

Returns:  boolean

Since: 03-06-2019

top

setClean(boolean clean)

This will attempt to clean all data that could cause an insert or update failure. This may include truncating length, lowering precision on decimal fields, and removing non ASCII characters.

Parameters:

  • boolean   clean  - true means enable data cleaning. Required parameter.

Since: 06-15-2022

top

setDateFormat(String filter)

Sets the date pattern for displaying dates.

Parameters:

  • String   filter

Since: 01-19-2009

top

setDateTimeFormat(String filter)

Sets the date pattern for displaying dates with time.

Parameters:

  • String   filter

Since: 11-10-2011

top

String toString()

Returns a description of this object.

Returns:  String

Since: 06-04-2008

top

boolean transfer(DataSet target)

Transfers all records in this dataset to the target dataset. The two datasets must have the same structure and the target dataset should typically be empty to avoid key violations. Not supported for datasets with files.

Parameters:

  • DataSet   target Required parameter.

Returns:  boolean

Since: 11-24-2020

top

boolean truncate()

Deletes all records in this dataset. Before calling this method you must manually delete any rows that contain remote files.

Returns:  boolean

Since: 11-24-2020

top

DataSetResult update(Data data)

Updates the record, the Data object must contain the target record id. If validation fails for any reason, no record is updated.

Parameters:

  • Data   data  - Data contains all required information for the update. Required parameter.

Returns:  DataSetResult

Since: 08-04-2012

top

boolean updateRecord(DataSetRecord record)

Updates (persists) changes made to the record. Returns false if the record is read only.

Parameters:

Returns:  boolean

Since: 06-04-2008

top

ValidityCheck validate(Data data)

Validates the data against the DataSet validation rules and returns the result.

Parameters:

  • Data   data  - Data contains all required information for an initial insert. Required parameter.

Returns:  ValidityCheck

Since: 08-04-2012

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