Create and Update API
makeClassFromData
Variation-1: Builds a class object from given name, primary key and the data. The class is generated from the data. This is equivalent to generating a class from the data.
MetaApi.makeClassFromData (String className, String pkAttrName, Map<String, Object> data)Parameters
className: name of the class object
pkAttrName: which attribute is the primary key
data: the data hashmapReturns
A Map representation of newly created class Variation-2: Builds a class object from chosen name, table-name, primary key and attributes. This will give you the option to specify the table name different from the class name.
Object makeClassFromData(String className, String tableName, String pkAttrName, Map<String, Object> data)Parameters
className: name of the class object
tableName: name of the table in the database
pkAttrName: which attribute is the primary key
data: the data hashmapVariation-3: Builds a class object from chosen name, primary key, data and data Types.
makeClassFromData(String className, String pkAttrName, Map<String, Object> data, Map<String, String> attrTypeByNames)Parameters
className: name of the class object
tableName: name of the table in the database
pkAttrName: which attribute is the primary key
data: data hashmap
attrTypeByNames: columns types and names
Variation-4: Builds a class object from chosen name, primary key, data and data Types and either create a DB table or just keep in memory. When you pass the data it is the stored only in memory when the skipping is enabled. When it is stored in the database it becomes much more restrictive but where as in the memory it is flexible. You can save this class after modifications and it will not be rejected.
makeClassFromData(String className, String pkAttrName, Map<String, Object> data, Map<String, String> attrTypeByNames), boolean skipSavingParameters
className: name of the class object
tableName: name of the table in the database
pkAttrName: which attribute is the primary key
data: data hashmap
attrTypeByNames: columns types and names
skipSaving: true create the table only in memorycreateMetadata
create metadata
MetaApi.createMetadata(Map<String, Object> md)Parameters
mdReturns
ObjectsaveMetadata
save metadata
MetaApi.saveMetadata(String appName, String dsName, String schemaName, ClassM clsM)
or
MetaApi.saveMetadata(Map<String, Object> md)Parameters
md
appName
dsName
schemaName
clsMReturns
ObjectgetAppDataDir
Locate and get the application data directory
MetaApi.getAppDataDir()Parameters
no parameters.Returns
application data directorysaveClass
save class
MetaApi.saveClass(String className, ClassM clsM)Parameters
className
clsMReturns
ObjectupdateClassVisibility
update Class Visibility
MetaApi.updateClassVisibility(String className, String visibility)Parameters
className
visibilityReturns
ObjectcreateFunctionSysTask
create Function Sys Task
MetaApi.createFunctionSysTask(String mdId)
or
MetaApi.createFunctionSysTask(String orgName, String name)Parameters
mdId
orgName
nameReturns
ResultLast updated
Was this helpful?