public class DSGenerator extends Object
Constructor and Description |
---|
DSGenerator(String dataSourceId,
String dbName,
String[] schemas,
String[] tableNames,
boolean singleService,
String nameSpace,
String serviceName)
Constructor creates and initializes the meta data object create DS object
per table
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getDSErrorList() |
DataService |
getGeneratedService() |
List<DataService> |
getGeneratedServiceList() |
static String[] |
getSchemas(Connection connection) |
static String[] |
getSchemas(String datasourceId) |
static String[] |
getTableList(Connection connection,
String dbName,
String[] schemas) |
static String[] |
getTableList(String datasourceId,
String dbName,
String[] schemas) |
static String[] |
getTableList(String url,
String driver,
String userName,
String password,
String dbName,
String[] schemas) |
static List<String> |
getTableNamesList(DatabaseMetaData mObject,
String dbName,
String schema) |
public DSGenerator(String dataSourceId, String dbName, String[] schemas, String[] tableNames, boolean singleService, String nameSpace, String serviceName) throws Exception
tableNames
- - String array of database table names ,It can be zero element
arraysingleService
- - select the service generation mode true one service for
whole database when it false services per table wisedataSourceId
- - carbon datasource id it can be null
When create the connection there are 3 away to do it , First
way is provide the relevant information(url, driver, username,
password) which need to create connection that time other
fields(connection, datasourceId) should be null
Second way directly you can provide connection instance
final way is you can provide carbon datasource id(name)
if you wish to use all the tables of database you can provide
zero element arrayException
public static String[] getTableList(String datasourceId, String dbName, String[] schemas) throws DataServiceFault
DataServiceFault
public static String[] getTableList(String url, String driver, String userName, String password, String dbName, String[] schemas) throws DataServiceFault
DataServiceFault
public static String[] getTableList(Connection connection, String dbName, String[] schemas) throws SQLException
SQLException
public static List<String> getTableNamesList(DatabaseMetaData mObject, String dbName, String schema) throws SQLException
SQLException
public static String[] getSchemas(String datasourceId) throws Exception
Exception
public static String[] getSchemas(Connection connection) throws Exception
Exception
public DataService getGeneratedService()
public List<DataService> getGeneratedServiceList()
Copyright © 2019 WSO2. All rights reserved.