public class SqlResourceDefinitionUtils extends Object
Constructor and Description |
---|
SqlResourceDefinitionUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultDatabase(SqlResourceDefinition definition)
Returns default database.
|
static Table |
getTable(SqlResourceDefinition definition,
ColumnMetaData column)
Returns table object for column, ignoring case.
|
static Table |
getTable(SqlResourceDefinition definition,
String tableName)
Returns table object with specified table name, ignoring case.
|
static Table |
getTable(SqlResourceDefinition definition,
TableMetaData.TableRole role)
Returns table object with desired role.
|
static List<Table> |
getTableList(SqlResourceDefinition definition,
TableMetaData.TableRole role)
Returns list of table objects with specified role.
|
static void |
validate(SqlResourceDefinition definition)
Throws SqlResourceException if definition meets one of the following criteria:
No query element
No metadata element
No database element with default database name
No Parent table element
More than one Parent, Child or Join table elements
|
public static String getDefaultDatabase(SqlResourceDefinition definition)
public static Table getTable(SqlResourceDefinition definition, ColumnMetaData column)
public static Table getTable(SqlResourceDefinition definition, String tableName)
public static Table getTable(SqlResourceDefinition definition, TableMetaData.TableRole role)
public static List<Table> getTableList(SqlResourceDefinition definition, TableMetaData.TableRole role)
public static void validate(SqlResourceDefinition definition) throws SqlResourceException
definition
- definitionSqlResourceException
- if definition is invalidCopyright © 2011-2018 restSQL Project Contributors