Get Column Meta

There are methods to retrieve the metadata of a single column or multiple columns of a particular table.

Get a single column meta by columnID

while a table’s meta data was fetched previously, now it is to fetch a particular column’s meta data of a table using getColumn() method.

Ensure the following packages are imported:

    
copy
import com.zc.component.object.ZCColumn; import com.zc.component.object.ZCObject; import com.zc.component.object.ZCTable;
    
copy
//Create Base Object Instance ZCObject object = ZCObject.getInstance(); //Get a Table Instance referring the table ID on base object ZCTable table = object.getTable(1510000000110121L); //Get the Meta of a specific column of using columnID ZCColumn column = table.getColumn("1510000000110832");

Get a single column meta by column name

An alternative way to get the meta data of a column is referring to the table name instead of table Id. This also returns the same response as that of the previous one.

Ensure the following packages are imported:

    
copy
import com.zc.component.object.ZCColumn; import com.zc.component.object.ZCObject; import com.zc.component.object.ZCTable;
    
copy
//Create Base Object Instance ZCObject object = ZCObject.getInstance(); //Get a Table Instance referring the table ID on base object ZCTable table = object.getTable(1510000000110121L); //Get the Meta of a specific column of using column name ZCColumn column = table.getColumn("Name");

Get all the columns

In addition to getting the meta data of a single column, you can retrieve the meta data of all the columns of a particular table using getAllColumns() method.

Ensure the following packages are imported:

    
copy
import com.zc.component.object.ZCColumn; import com.zc.component.object.ZCObject; import com.zc.component.object.ZCTable;
    
copy
//Create Base Object Instance ZCObject object = ZCObject.getInstance(); //Get a Table Instance referring the table ID on base object ZCTable table = object.getTable(1510000000110121L); //Get all the Columns in the Table List columns = table.getAllColumns();

Last Updated 2023-09-03 01:06:41 +0530 +0530