|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.DatabaseInfoUtilities
This class contains static database introspection utility methods required
for Query, POM and PDS functionality.
Supported API: false
Extendable: false
Field Summary | |
private static String |
ARRAY_ITEM
|
private static String |
ATTRIBUTE_NAME_DELIMITERS
|
static boolean |
BASE_TABLE
|
private static Datastore |
DATASTORE
|
static String |
NOT_AVAILABLE
|
private static Hashtable |
primitiveMap
|
private static String |
RESOURCE
|
static boolean |
VIEW
|
Constructor Summary | |
DatabaseInfoUtilities()
|
Method Summary | |
static LobLocator |
buildLobLocator(String tname,
String pkName,
String attr,
String colname)
|
static ColumnDescriptor[] |
getBaseColumnDescriptors(ClassInfo a_classInfo)
Returns the valid ColumnDescriptors for the class. |
static TableInfo |
getBaseTableInfo(ClassInfo a_classInfo)
Returns the base TableInfo for the class. |
static String |
getBaseTableName(Class a_class)
Returns the base table name for the class. |
static String |
getBaseTableName(ClassInfo a_classInfo)
Returns the base table name for the class. |
private static ClassInfo |
getClassInfo(Class a_class)
|
static ClassInfo |
getClassInfoFor(ClassInfo parentClassInfo,
String attrName)
|
static ClassInfo |
getClassInfoFor(ObjectMappable anObj)
|
static Class |
getColumnClass(ColumnExpression a_columnExpression)
Return the Java type for the specified ColumnExpression. |
static Class |
getJavaClass(String a_className)
Return the Java class for the specified class string name. |
static LobLocator |
getLobLocator(ClassInfo aClassInfo,
String attribute_name)
|
static int |
getMaxAttributeNameSize(Class a_class)
Returns the maximum number of attributes names for the specified class. |
static ColumnDescriptor |
getPersistableColumnDescriptor(Class a_class,
String a_attribute)
Returns the valid ColumnDescriptor for the class and attribute name. |
static String |
getPersistableColumnName(Class a_class,
String a_attribute)
Returns the valid column name for the class and attribute. |
static String |
getStringCase(Class a_targetClass,
String a_attributeName)
Returns the StringCase attribute for the ColumnExpression, if it exists and is specified. |
private static String |
getStringCase(ColumnDescriptor a_columnDescriptor)
|
static String |
getStringCase(ColumnExpression a_column)
Returns the StringCase attribute for the ColumnExpression, if it exists and is specified. |
static ClassInfo |
getValidClassInfo(FromClause a_fromClause,
int a_fromIndex)
Return the ClassInfo for the TableExpression at the specified position in the FromClause. |
static ColumnDescriptor |
getValidColumnDescriptor(ClassInfo a_classInfo,
String a_attribute)
Returns the valid ColumnDescriptor for the class and attribute name. |
static ColumnDescriptor |
getValidColumnDescriptor(Class a_class,
String a_attribute)
Returns the valid ColumnDescriptor for the class and attribute name. |
static ColumnDescriptor[] |
getValidColumnDescriptors(ClassInfo a_classInfo)
Returns the valid ColumnDescriptors for the class. |
static String |
getValidColumnName(ClassInfo a_classInfo,
String a_attribute)
Returns the valid column name for the class and attribute. |
static String |
getValidColumnName(ColumnDescriptor a_columnDescriptor,
boolean a_isBaseTable)
Returns the valid column name for the column descriptor. |
private static String |
getValidColumnName(TableInfo a_tableInfo,
String a_attribute,
boolean a_baseTable,
ClassInfo a_classInfo)
Returns the column name for the table and attribute. |
static LinkInfo |
getValidLinkInfo(FromClause a_fromClause,
int a_fromIndex)
Return the LinkInfo for the TableExpression at the specified position in the FromClause. |
static Vector |
getValidSubClassInfos(Class a_class)
This method returns a Vector of all of the subclasses that are Persistable and concrete (inlcuding the specified class). |
static Vector |
getValidSubClassInfos(ClassInfo a_classInfo)
This method returns a Vector of all of the subclasses that are Persistable and concrete (inlcuding the specified class). |
static TableInfo |
getValidTableInfo(Class a_class)
|
static TableInfo |
getValidTableInfo(ClassInfo a_classInfo)
Returns the valid TableInfo for the class. |
static String |
getValidTableName(Class a_class)
Returns the valid table name for the class. |
static String |
getValidTableName(ClassInfo a_classInfo)
Returns the valid table name for the class. |
static boolean |
isAutoNavigate(Class a_class)
|
static boolean |
isAutoNavigate(ClassInfo a_classInfo)
|
static boolean |
isBaseTable(ClassInfo a_classInfo)
Returns true if the TableInfo for this class is for a base table . |
static boolean |
isForeignKeyLink(Class a_class)
Indicates if the specified class is a ForeignKey link. |
static boolean |
isForeignKeyLink(ClassInfo a_classInfo)
Indicates if the specified class is a ForeignKey link. |
static boolean |
isForeignKeyLink(LinkInfo a_linkInfo)
Indicates if the specified class is a ForeignKey link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean BASE_TABLE
public static final boolean VIEW
public static final String NOT_AVAILABLE
private static final String RESOURCE
private static final String ATTRIBUTE_NAME_DELIMITERS
private static Hashtable primitiveMap
private static final String ARRAY_ITEM
private static final Datastore DATASTORE
Constructor Detail |
public DatabaseInfoUtilities()
Method Detail |
public static String getStringCase(Class a_targetClass, String a_attributeName) throws WTException
a_targetClass
- Target class to usea_attributeName
- Name of attribute to use
WTException
public static String getStringCase(ColumnExpression a_column) throws WTException
a_column
- ColumnExpression to use
WTException
public static TableInfo getValidTableInfo(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static TableInfo getBaseTableInfo(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static boolean isBaseTable(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static ColumnDescriptor[] getValidColumnDescriptors(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static ColumnDescriptor[] getBaseColumnDescriptors(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static ColumnDescriptor getValidColumnDescriptor(ClassInfo a_classInfo, String a_attribute) throws PersistenceException
a_classInfo
- a_attribute
-
wt.pds.PersistenceException
PersistenceException
public static ColumnDescriptor getValidColumnDescriptor(Class a_class, String a_attribute) throws PersistenceException
a_class
- a_attribute
-
wt.pds.PersistenceException
PersistenceException
public static String getValidTableName(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static String getValidTableName(Class a_class) throws PersistenceException
a_class
-
wt.pds.PersistenceException
PersistenceException
public static String getBaseTableName(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static String getBaseTableName(Class a_class) throws PersistenceException
a_class
-
wt.pds.PersistenceException
PersistenceException
public static String getValidColumnName(ClassInfo a_classInfo, String a_attribute) throws PersistenceException
a_classInfo
- a_attribute
-
wt.pds.PersistenceException
PersistenceException
public static String getValidColumnName(ColumnDescriptor a_columnDescriptor, boolean a_isBaseTable) throws PersistenceException
a_columnDescriptor
- a_isBaseTable
-
wt.pds.PersistenceException
PersistenceException
public static Vector getValidSubClassInfos(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
PersistenceException
public static Vector getValidSubClassInfos(Class a_class) throws PersistenceException
a_class
-
PersistenceException
private static String getValidColumnName(TableInfo a_tableInfo, String a_attribute, boolean a_baseTable, ClassInfo a_classInfo) throws PersistenceException
a_tableInfo
- a_attribute
- a_baseTable
- if true return base table name, otherwise return
column namea_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static int getMaxAttributeNameSize(Class a_class) throws PersistenceException
a_class
-
wt.pds.PersistenceException
PersistenceException
public static ColumnDescriptor getPersistableColumnDescriptor(Class a_class, String a_attribute) throws PersistenceException
a_class
- a_attribute
-
wt.pds.PersistenceException
PersistenceException
public static String getPersistableColumnName(Class a_class, String a_attribute) throws PersistenceException
a_class
- a_attribute
-
wt.pds.PersistenceException
PersistenceException
public static boolean isForeignKeyLink(Class a_class) throws PersistenceException
a_class
-
wt.pds.PersistenceException
PersistenceException
public static boolean isForeignKeyLink(ClassInfo a_classInfo) throws PersistenceException
a_classInfo
-
wt.pds.PersistenceException
PersistenceException
public static boolean isForeignKeyLink(LinkInfo a_linkInfo)
a_linkInfo
-
wt.pds.PersistenceException
public static ClassInfo getValidClassInfo(FromClause a_fromClause, int a_fromIndex) throws PersistenceException
a_fromClause
- instance containing the tablea_fromIndex
- index of table in the FromClause
wt.pds.PersistenceException
PersistenceException
public static LinkInfo getValidLinkInfo(FromClause a_fromClause, int a_fromIndex) throws PersistenceException
a_fromClause
- instance containing the tablea_fromIndex
- index of table in the FromClause
wt.pds.PersistenceException
PersistenceException
public static Class getColumnClass(ColumnExpression a_columnExpression) throws WTException
a_columnExpression
- column to return the type for
WTException
public static Class getJavaClass(String a_className) throws WTException
a_className
- to return the type for
WTException
public static boolean isAutoNavigate(ClassInfo a_classInfo) throws PersistenceException
PersistenceException
public static boolean isAutoNavigate(Class a_class) throws PersistenceException
PersistenceException
public static TableInfo getValidTableInfo(Class a_class) throws PersistenceException
PersistenceException
public static LobLocator getLobLocator(ClassInfo aClassInfo, String attribute_name) throws DatastoreException
DatastoreException
public static LobLocator buildLobLocator(String tname, String pkName, String attr, String colname)
private static String getStringCase(ColumnDescriptor a_columnDescriptor) throws WTException
WTException
public static ClassInfo getClassInfoFor(ClassInfo parentClassInfo, String attrName) throws PersistenceException
PersistenceException
public static ClassInfo getClassInfoFor(ObjectMappable anObj) throws PersistenceException
PersistenceException
private static ClassInfo getClassInfo(Class a_class) throws PersistenceException
PersistenceException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |