Interface DataDescriptor

All Known Implementing Classes:
BaseDataDescriptor, InMemoryDataDescriptor, JPADataDescriptor, SQLDataDescriptor

public interface DataDescriptor

The DataDescriptor class

In the DataDescriptor class, the data structure and related display and editing interfaces, filters, and data accesses can be specified. With these parameters an editing or display interfaces can be created easily, since the JBStrap data handling components can all be built from DataDescriptor. Furthermore, the DataDescriptor supports both synchronous and asynchronous data handling operations.

A DataDescriptor in the JBStrap framework can be created through code, instantiating this class and specifying the parameters, or based on an XML file. The XML files are read automatically by the framework on the system startup, and creates the classes, and adds the DataDescriptors to the framework, so these DataDescriptors can be accessed at any point in the application. The XML files must be located in the directory specified in the DATADESCRIPTOR_DIR JBStrap parameter.

If a DataDescriptor is created through code, (eg. based on data from a database), then the created DataDescriptor objects have to be added to the framework, by using the addDataDescriptor() method.
A previously added DataDescriptor can be queried from the framework, by using the getDataDescriptor() method.

If the DataDescriptor is parameterized in the XML file, then the file extension must be .ds.xml. The DataDescriptor parameters must be in the datadescriptor tags.
The possible DataDescriptor tag attributes:

Attribute nameDescriptionDefault
nameThe unique DataDescriptor name. This parameter must be specified. The name specified here is used to get the DataDescriptor from the framework. null
dataClassThe POJO class/entity containing the DataDescriptor data. If using a JPA DataDescriptor, the type of the created JPA entity (through which the data will flow from the DataDescriptor to the component) can be specified here.null
connectorTypeThe data connector type.JPA

The datadescriptor tag's possible elements, that have to be specified in the tags within the tags:
  • Tag name
  • DescriptionDefault
    typeThe access type. The parameter's values can be found in the AccessType enumPRIVATE
    readThe roles that grant read access to the DataDescriptor. The "*" character can be used as a wildcard. The roles must be separated by a comma (","). *
    writeThe roles that grant write access to the DataDescriptor. The "*" character can be used as a wildcard. The roles must be separated by a comma (","). *

    A DataDescriptor, that every user can read and write, regardless if they are signed in or not:
     <access>
            <type>Public</type>
     </access>
    A DataDescriptor that every logged in user can read, but only certain users (users with the "ADMIN" role, or a role that contains the "POWER" prefix) can write.
     <access>
            <type>Private</type>
            <read>*</read>
            <write>ADMIN,POWER*</write>
     </access>
  • defaultFilterCriteria
    This parameter is used to specify the default filter criteria used with the DataDescriptor. The user cannot turn this off, or modify it. If the DataDescriptor is displayed on a list interface and the user can filter the data, the filter set by the user will be applied to the data that was already filtered by the default filter.
    For example, if we only want the data displayed that are stored in the field called "column1", and start with "A", it looks like this:
     <defaultFilterCriteria>Criteria("column1",LIKE,"A")</defaultFilterCriteria>
     
  • column
    This tag can be used multiple times within the DataDescriptor. The individual columns of the DataDescriptor can be defined and set with the help of this tag. For more information about the DataDescriptor column parameters, see the DataDescriptorColumn class.
Since:
4.0
Author:
JBStrap
See Also:
  • Method Details

    • getName

      String getName()
      Gets the name of the DataDescriptor
      Returns:
      The name of the DataDescriptor
    • addColumn

      Adds column data to the DataDescriptor
      Parameters:
      column - The data descriptor column object, that contains the data of the column
      Returns:
      The DataDescriptor
      Throws:
      NullPointerException - If the column was specified as null
    • addColumns

      DataDescriptor addColumns(DataDescriptorColumn... columns)
      Adds multiple columns to the DataDescriptor
      Parameters:
      columns - The columns to be added to the DataDescriptor
      Returns:
      The DataDescriptor
      Throws:
      NullPointerException - If the columns were specified as null
    • getColumns

      Gets the data of the DataDescriptor columns
      Returns:
      A collecton containing the data of the DataDescriptor columns. It will return null, if the DataDescriptor has no columns.
    • getColumn

      DataDescriptorColumn getColumn(String name)
      Gets the specified column from the DataDescriptor
      Parameters:
      name - The name of the column
      Returns:
      The DataDescriptor column with the specified name, or null if not found
    • getRead

      List<String> getRead()
      Gets a list of roles that have read access to the DataDescriptor. If a "*" character is used when specifying roles, it will also appear on the list.
      Returns:
      A list of role names that have read access to the DataDescriptor
    • setRead

      DataDescriptor setRead(List<String> read)
      Sets the specified roles to have read access to the DataDescriptor.
      Parameters:
      read - A list of role names, that will have read access. The "*" character can be used as a wildcard.
      Returns:
      The DataDescriptor
    • getWrite

      List<String> getWrite()
      Gets a list of roles that have write access to the DataDescriptor. If a "*" character is used when specifying roles, it will also appear on the list.
      Returns:
      A list of role names that have write access to the DataDescriptor
    • setWrite

      DataDescriptor setWrite(List<String> write)
      Sets the specified roles to have write access to the DataDescriptor.
      Parameters:
      write - A list of role names, that will have write access. The "*" character can be used as a wildcard.
      Returns:
      The DataDescriptor
    • getAccess

      AccessType getAccess()
      Gets the DataDescriptor access type
      Returns:
      The DataDescriptor access type
    • setAccess

      DataDescriptor setAccess(AccessType access)
      Sets the DataDescriptor access type
      Parameters:
      access - The DataDescriptor access type. The parameter values can be found in the AccessType enum.
      Returns:
      The DataDescriptor
    • getPrimaryKeyNames

      List<String> getPrimaryKeyNames()
      Gets a list, containing the names of the columns, which contain the primary keys.
      Returns:
      A list of column names, that contain the DataDescriptor primary keys. If the DataDescriptor contains no primary key, it will return with null
    • getPrimaryKeyName

      String getPrimaryKeyName()
      Gets the name of the column, which contains the primary keys. (Only usable if the DataDescriptor only has one primary key column.)
      Returns:
      The name of the column, which contains the primary keys. If the DataDescriptor has no primary key, it will return with null If the DataDescriptor contains multiple primary key columns, it will return with the name of the first column.
    • copy

      Creates a copy of the DataDescriptor
      Returns:
      A new DataDescriptor, that is a perfect copy of the DataDescriptor
    • getDefaultFilterCriteria

      Criteria getDefaultFilterCriteria()
      Gets the default filter criteria assigned to the DataDescriptor
      Returns:
      The default filter criteria assigned to the DataDescriptor or null, if none was assigned
    • setDefaultFilterCriteria

      DataDescriptor setDefaultFilterCriteria(Criteria criteria)
      Sets the default filter criteria, that will be used by the DatDescriptor
      Parameters:
      criteria - The default filter criteria. If null, no filter criteria will be set to the DataDescriptor
      Returns:
      The DataDescriptor
    • isFilterable

      boolean isFilterable()
      Determines if the user can filter the DataDescriptor
      Returns:
      If true, the user can filter the DataDescriptor, otherwise false
    • addParam

      DataDescriptor addParam(String name, Object value)
      Adds a parameter to the DataDescriptor.
      Parameters:
      name - The name of the parameter to be added to the DataDescriptor. If the parameter name is already used on the DataDescriptor, it will be overwritten.
      value - The parameter value
      Returns:
      The DataDescriptor
    • setParam

      DataDescriptor setParam(Parameters params)
      Sets the DataDescriptor parameters. If this method is used, the previous parameter settings will be lost.
      Parameters:
      params - The DataDescriptor parameters.
      Returns:
      The DataDescriptor
    • getParam

      <C> C getParam(String name)
      Gets the DataDescriptor parameter vale, specified by the parameter name.
      Parameters:
      name - The name of the parameter.
      Returns:
      The value of the specified parameter, or null if not found.
    • find

      Queries the DataDescriptor data synchronously.
      Returns:
      A list containing every record in the DataDescriptor
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the access rights are not correctly set for the query
    • find

      Queries the DataDescriptor data synchronously.
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      Returns:
      A list containing every record in the DataDescriptor
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      Queries the DataDescriptor data synchronously, that meet the specified criteria
      Parameters:
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(Client client, Criteria criteria) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(int startRow, int endRow, Criteria criteria) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(Client client, int startRow, int endRow, Criteria criteria) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(int startRow, int endRow, Criteria criteria, Order order) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, ordered.
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      order - The ordering that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(Client client, int startRow, int endRow, Criteria criteria, Order order) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, ordered.
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      order - The ordering that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(int startRow, int endRow, Criteria criteria, Order... orders) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, following the specified orders.
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      orders - The orderings that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(Client client, int startRow, int endRow, Criteria criteria, Order... orders) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, following the specified orders.
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      orders - The orderings that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(int startRow, int endRow, Criteria criteria, List<Order> orders) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, following the specified orders.
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      orders - The list orders that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • find

      List<Record> find(Client client, int startRow, int endRow, Criteria criteria, List<Order> orders) throws FindException, DataAccessException
      Queries the DataDescriptor data synchronously, that meet the specified criteria, between the specified rows, following the specified orders.
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used during the query. If null, no criteria will be used, every record will be queried.
      orders - The list orders that will be applied to the query results. If null, the data will not be ordered.
      Returns:
      The list of records that meet the specified filter criteria.
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to read the data.
    • fetchData

      void fetchData(Criteria criteria, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor asynchronously.
      Parameters:
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • fetchData

      void fetchData(int startRow, int endRow, Criteria criteria, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor, between the specified rows, asynchronously.
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • fetchData

      void fetchData(Criteria criteria, Order order, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor, with the specified order and criteria
      Parameters:
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      order - The ordering instruction used for the query. If specified as null, no ordering will be applied.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • fetchData

      void fetchData(Criteria criteria, List<Order> orders, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor, with the specified orders and criteria
      Parameters:
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      orders - The ordering instructions used for the query. If specified as null, no ordering will be applied.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • fetchData

      void fetchData(int startRow, int endRow, Criteria criteria, Order order, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor, between the specified rows, with the specified order and criteria
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      order - The ordering instruction used for the query. If specified as null, no ordering will be applied.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • fetchData

      void fetchData(int startRow, int endRow, Criteria criteria, List<Order> orders, Client client, DataDescriptorCallback callback)
      Fetches data from the DataDescriptor, between the specified rows, with the specified orders and criteria
      Parameters:
      startRow - The first row of the query, which will appear in the returned list
      endRow - The last row of the query, which will appear in the returned list
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      orders - The ordering instructions used for the query. If specified as null, no ordering will be applied.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      callback - The callback implementation
      Throws:
      IllegalArgumentException - If the specified callback is null
    • countData

      long countData(Client client) throws RowCountException, DataAccessException
      Counts data in the DataDescriptor
      Parameters:
      client - The client that started the query. If null, the access rights won't be checked when counting.
      Returns:
      The counted data of the DataDescriptor
      Throws:
      RowCountException - Occurs if an error was encountered during the execution of the SQL instruction that does the counting.
      DataAccessException - Occurs if the logged in user has no read access to the DatDescriptor
    • countData

      long countData(Criteria criteria, Client client) throws RowCountException, DataAccessException
      Counts data in the DataDescriptor, following the specified criteria
      Parameters:
      criteria - The criteria used for the query. If specified as null, every data will be queried.
      client - The Client instance, on which the query was started. If null, the data will be queried without checking for access rights
      Returns:
      The counted data of the DataDescriptor
      Throws:
      RowCountException - Occurs if an error was encountered during the execution of the SQL instruction that does the counting.
      DataAccessException - Occurs if the logged in user has no read access to the DataDescriptor
    • save

      Saves a record to the DataDescriptor. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      record - The record that will be saved to the DataDescriptor
      Returns:
      The saved record
      Throws:
      SaveException - Occurs if an error was encountered during the save
      DataAccessException - Occurs if the user on the specified client has no permission to save the record to the DataDescriptor.
    • save

      List<Record> save(Record record, Client client) throws SaveException, DataAccessException
      Saves a record to the DataDescriptor. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      record - The record that will be saved to the DataDescriptor
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      Returns:
      The saved record
      Throws:
      SaveException - Occurs if an error was encountered during the save
      DataAccessException - Occurs if the user on the specified client has no permission to save the record to the DataDescriptor.
    • save

      List<Record> save(Record record, Client client, Transaction transaction) throws SaveException, DataAccessException
      Saves a record to the DataDescriptor, within the specified database transaction. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      record - The record that will be saved to the DataDescriptor
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      transaction - The object representing the database transaction, on which the save is to be executed. If specified as null, the save will happen outside the transaction.
      Returns:
      The saved record
      Throws:
      SaveException - Occurs if an error was encountered during the save.
      DataAccessException - Occurs if the user on the specified client has no permission to save the record to the DataDescriptor.
    • save

      List<Record> save(List<Record> records, Client client) throws SaveException, DataAccessException
      Saves multiple records to the DataDescriptor. If the specified records have a unique ID, and a record with that ID already exists, they will be overwritten (update), otherwise they will be inserted to the database.
      Parameters:
      records - A list containing the records to be saved.
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      Returns:
      The saved record
      Throws:
      SaveException - Occurs if an error was encountered during the save.
      DataAccessException - Occurs if the user on the specified client has no permission to save the record to the DataDescriptor.
    • save

      List<Record> save(List<Record> records, Client client, Transaction transaction) throws SaveException, DataAccessException
      Saves multiple records to the DataDescriptor. If the specified records have a unique ID, and a record with that ID already exists, they will be overwritten (update), otherwise they will be inserted to the database.
      Parameters:
      records - A list containing the records to be saved.
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      transaction - The object representing the database transaction, on which the save is to be executed. If specified as null, the save will happen outside the transaction.
      Returns:
      The saved record
      Throws:
      SaveException - Occurs if an error was encountered during the save.
      DataAccessException - Occurs if the user on the specified client has no permission to save the record to the DataDescriptor.
    • save

      void save(Record record, Client client, DataDescriptorCallback callback)
      Saves a record asynchronously to the database. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      record - The record that will be saved to the DataDescriptor
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      callback - The callback implementation
    • save

      void save(Record record, Client client, DataDescriptorCallback callback, Transaction transaction)
      Saves a record asynchronously to the database, within the specified database transaction. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      record - The record that will be saved to the DataDescriptor
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      callback - The callback implementation
      transaction - The object representing the database transaction, on which the save is to be executed. If specified as null, the save will happen outside the transaction.
    • save

      void save(List<Record> records, Client client, DataDescriptorCallback callback)
      Saves a record asynchronously to the database, within the specified database transaction. If the specified record has a unique ID, and record with that ID already exists, it will be overwritten (update), otherwise it will be inserted to the database.
      Parameters:
      records - A list containing the records to be saved.
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      callback - The callback implementation
    • save

      void save(List<Record> records, Client client, DataDescriptorCallback callback, Transaction transaction)
      Saves multiple records asynchronously to the DataDescriptor, within the specified database transaction. If the specified records have a unique ID, and a record with that ID already exists, they will be overwritten (update), otherwise they will be inserted to the database.
      Parameters:
      records - A list containing the records to be saved.
      client - The client, that started the Save. If not specified, the save operation will be executed without checking for access rights.
      callback - The callback implementation
      transaction - The object representing the database transaction, on which the save is to be executed. If specified as null, the save will happen outside the transaction.
    • remove

      Removes a record from the DataDescriptor
      Parameters:
      record - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      Returns:
      The removed record
      Throws:
      RemoveException - Occurs if an error was encountered during the removal process
      DataAccessException - Occurs if the user on the specified client has no access to write the data of the DataDescriptor.
    • remove

      List<Record> remove(Record record, Client client) throws RemoveException, DataAccessException
      Removes a record from the DataDescriptor
      Parameters:
      record - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      Returns:
      The removed record
      Throws:
      RemoveException - Occurs if an error was encountered during the removal process
      DataAccessException - Occurs if the user on the specified client has no access to write the data of the DataDescriptor.
    • remove

      List<Record> remove(Record record, Client client, Transaction transaction) throws RemoveException, DataAccessException
      Removes a record from the DataDescriptor, within the specified transaction.
      Parameters:
      record - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      transaction - The object representing the database transaction, on which the removal is to be executed. If specified as null, the removal will happen outside the transaction.
      Returns:
      The removed record
      Throws:
      RemoveException - Occurs if an error was encountered during the removal process
      DataAccessException - Occurs if the user on the specified client has no access to write the data of the DataDescriptor.
    • remove

      List<Record> remove(List<Record> records, Client client) throws RemoveException, DataAccessException
      Removes multiple records from the DataDescriptor
      Parameters:
      records - A list containing the records to be removed. The records must contain a unique ID. If a record has no unique ID, the record will not be removed. The other attributes of the records will not be processed during the removal.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      Returns:
      The removed record
      Throws:
      RemoveException - Occurs if an error was encountered during the removal process
      DataAccessException - Occurs if the user on the specified client has no access to write the data of the DataDescriptor.
    • remove

      List<Record> remove(List<Record> records, Client client, Transaction transaction) throws RemoveException, DataAccessException
      Removes multiple records from the DataDescriptor within the specified transaction
      Parameters:
      records - A list containing the records to be removed. The records must contain a unique ID. If a record has no unique ID, the record will not be removed. The other attributes of the records will not be processed during the removal.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      transaction - The object representing the database transaction, in which the record removal will be executed. If specified as null, the removal will happen outside of a transaction
      Returns:
      The removed record
      Throws:
      RemoveException - Occurs if an error was encountered during the removal process
      DataAccessException - Occurs if the user on the specified client has no access to write the data of the DataDescriptor.
    • remove

      void remove(Record record, Client client, DataDescriptorCallback callback)
      Removes a record asynchronously from the DataDescriptor
      Parameters:
      record - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      callback - The callback implementation
    • remove

      void remove(Record record, Client client, DataDescriptorCallback callback, Transaction transaction)
      Removes a record asynchronously from the DataDescriptor, within the specified transaction
      Parameters:
      record - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      callback - The callback implementation
      transaction - The object representing the database transaction, in which the record removal will be executed. If specified as null, the removal will happen outside of a transaction
    • remove

      void remove(List<Record> records, Client client, DataDescriptorCallback callback)
      Removes multiple records asynchronously from the DataDescriptor
      Parameters:
      records - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      callback - The callback implementation
    • remove

      void remove(List<Record> records, Client client, DataDescriptorCallback callback, Transaction transaction)
      Removes multiple records asynchronously from the DataDescriptor, within the specified transaction
      Parameters:
      records - The record to be removed. The record must contain the primary ID. If the record doesn't contain a primary key, no removal will be executed. During the execution, the other data of the record will not be processed.
      client - The client that started the removal. If specified as null, the removal will be executed without checking for access.
      callback - The callback implementation
      transaction - The object representing the database transaction, in which the record removal will be executed. If specified as null, the removal will happen outside of a transaction
    • findById

      Gets a DataDescriptor record, using the specified ID.
      Parameters:
      id - The unique record ID
      Returns:
      The record with the specified ID
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to query the data.
    • findById

      Record findById(Client client, Object id) throws FindException, DataAccessException
      Gets a DataDescriptor record, using the specified ID.
      Parameters:
      client - The client that started the query. If null, the query will happen without checking for access rights.
      id - The unique record ID
      Returns:
      The record with the specified ID
      Throws:
      FindException - Occurs if an error was encountered during the query
      DataAccessException - Occurs if the user in the specified client has no access to query the data.
    • openTransaction

      Transaction openTransaction()