Samples
Data Abstract for Java provides a number of samples that demonstrate many of the features available in the Data Abstract SDK with samples demonstrating using Data Abstract for Java from the command line, from Netbeans with a base Swing user interface, to using Data Abstract in an Android based mobile application. There is also a sample that uses the Oxygene language.
All of the samples can be found in C:\Users\Public\Documents\RemObjects Samples\Data Abstract for Java
.
The following samples are designed to be run from the command prompt
- Briefcase sample demonstrates how to use Briefcases(concept). The sample retrieves data from an instance of Relativity, storing that data in a FileBriefcase and then retrieving that data.
- Commands sample demonstrates how to use remote Commands which are stored in a schema
- DA SQL sample demonstrates how to use DA SQL (concept) to execute safe SQL queries on the schema data.
- Dynamic Select sample demonstrates using Dynamic Select (concept) to selectively retrieve table fields from the server.
- Dynamic Where sample demonstrates using Dynamic Where (concept) to dynamically create a
WHERE
statement used to retrieve data. - Simple Data Operations this is the most basic sample that covers establishing a connection to an instance of Relativity, retrieving a DataTable, modifying data in a DataRow, adding and deleting a DataRow and applying those changes back to the server.
Common
this is not a sample, but two additional source files that the other samples make use of. TheDataTableExtension
class provides a method that takes a DataTable and turns it into a pretty string that can be output to the console or some other log. TheStringExtensions
class is used by theDataTableExtension
class, it provides some methods to join an array of strings with a delimiter, pad a string from the right and repeat a sequence of characters.
This sample has a Desktop UI and is run from Netbeans:
- Simple (Netbeans) is a Netbeans based sample that uses a Swing UI and demonstrates retrieving a DataTable and making modifications to it.
Finally the following samples demonstrate using Data Abstract from Android based applications:
- DA SQL for Android (Eclipse) demonstrates how to use DA SQL (concept) to execute safe SQL queries on the schema data.
- Filters for Android (Eclipse) is an Android based sample that demonstrates using both Dynamic Select and Dynamic Where to filter the data.
- Simple for Android (Eclipse) is an Eclipse based Android sample that demonstrates retrieving a DataTable and making modifications to it.
- Simple for Android (Oxygene) demonstrates using Oxygene to write an Android based Data Abstract for Java application.