|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fesenmeyer.dbnormalizer.core.util.MiscUtil
public final class MiscUtil
"Miscellaneous" Utility class: Contains helper methods for various purposes.
Field Summary | |
---|---|
private static DBNormalizerLogger |
logger
The logger for this class. |
Constructor Summary | |
---|---|
private |
MiscUtil()
Makes the constructor inaccessible. |
Method Summary | |
---|---|
static boolean |
checkTableEquality(String table1Name,
String table1Catalog,
String table1Schema,
String table2Name,
String table2Catalog,
String table2Schema)
Checks if two tables are equal by comparing their name, catalog and schema. |
static TableContainer |
createTableContainer(String catalog,
String schema)
Creates a TableContainer. |
static String |
getCollectionAsString(Collection<? extends Object> collection)
Gets a Collection of objects as a string. |
static StringBuffer |
getCollectionAsStringBuffer(Collection<? extends Object> collection)
Gets a Collection of objects as a StringBuffer object. |
static String |
getDeleteOrUpdateRuleAsString(int rule)
Returns a string representation of the delete or update rule specified by argument rule. |
static String |
getQualifiedTableName(String tableName,
String catalog,
String schema)
Generates a qualified table name based on the arguments tableName, catalog and schema. |
static AttributeStringSet |
parseAttributeStringSet(String attributeSetString,
Table table)
Parses a set of attribute names from a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static DBNormalizerLogger logger
Constructor Detail |
---|
private MiscUtil()
Method Detail |
---|
public static AttributeStringSet parseAttributeStringSet(String attributeSetString, Table table) throws DBNormalizerException
attributeSetString
- the stringtable
- the table
DBNormalizerException
- if some of the attribute names in the string
do not exist in the specified tablepublic static boolean checkTableEquality(String table1Name, String table1Catalog, String table1Schema, String table2Name, String table2Catalog, String table2Schema)
table1Name
- the first table's (simple) nametable1Catalog
- the first table's catalog, may be null
table1Schema
- the first table's schema, may be null
table2Name
- the second table's (simple) nametable2Catalog
- the second table's catalog, may be null
table2Schema
- the second table's schema, may be null
true
, if the tables are equal;
false
, otherwisepublic static String getQualifiedTableName(String tableName, String catalog, String schema)
tableName
- a (simple) table namecatalog
- a catalog name, may be null
schema
- a schema name, may be null
public static TableContainer createTableContainer(String catalog, String schema)
null
.
catalog
- the catalog, may be null
schema
- the schema, may be null
TableContainerType.NONE
, if both arguments are null
,TableContainerType.CATALOG
, if catalog is not null
orTableContainerType.SCHEMA
, if schema is not null
.TableContainer
,
TableContainerType
public static StringBuffer getCollectionAsStringBuffer(Collection<? extends Object> collection)
collection
- a collection of objects
public static String getCollectionAsString(Collection<? extends Object> collection)
collection
- a collection of objects
public static String getDeleteOrUpdateRuleAsString(int rule)
rule
- the DatabaseMetaData
-Constant of the rule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |