Do we have any API to get Column name , data type and description from selected model name . Say user selects "ITEM" then we want to populate all columns from item model in next "attributes" drop down. User can select any attribute and put required text input here .
e.g. select all item which has STANDARD_COST greater than 20 USD
Requirment : we are creating priority rules for an engine to process demands. We want to add rules on model attributes . I was searching if we have some API which will help in this process.
One way of doing could be with below query, but I am not sure about the permissions to read this data in other environments (UAT/PROD).
SELECT table_name, column_name, data_type, data_length
FROM USER_TAB_COLUMNS
WHERE table_name = 'ITEM';
Can you please help me in this ?
@kunalbadgujar do you want to do based on DB query or you want to get the information on the Java side?
If you need to do this on the DB side then use the ALL_TAB_COLUMNS instead of USER_TAB_COLUMNS and if you need to get the model attributes on the Java side then use the LevelMappingHelper, i.e.
LevelMappingHelper helper = LevelMappingHelper.get(Item.MODEL_LEVEL_TYPE); helper getLevelChildMappingHelpers() will give you all the model attributes.