Data Store

Get Table Meta

The meta data of a single table or multiple tables can be obtained in several ways.

Get a single table meta by tableID

A table's meta data is fetched by referring the table Id, using the method getTable() as given below,

Ensure the following packages are imported:

Copiedimport com.zc.component.object.ZCObject
import com.zc.component.object.ZCTable
Copied//Create a base Object Instance
ZCObject object = ZCObject.getInstance();
//Get a Table Instance referring the table ID on base object
ZCTable tableMeta = object.getTable(1510000000110121L);

Get a single table meta by table name

On the other hand, you can refer the table name also to fetch the meta data details of a table where table name is passed as an argument to the getTable() method.

Ensure the following packages are imported:

Copiedimport com.zc.component.object.ZCObject
import com.zc.component.object.ZCTable
Copied//Create a base Object Instance
ZCObject object = ZCObject.getInstance();
//Get a Table Instance referring the table ID on base object
ZCTable tableMeta = object.getTable("SampleTable");

Get all the tables

In addition to getting the meta data of a single table, you can fetch the details of all the tables in a catalyst project using getAllTables() method.

Ensure the following packages are imported:

Copiedimport com.zc.component.object.ZCObject
Copied//Create a base Object Instance
ZCObject object = ZCObject.getInstance();
//Get all the Tables in a given Project
List<ZCTable> tableList = object.getAllTables();