|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.db.datatypes.DataTypeRegistry
public final class DataTypeRegistry
Registry for DataTypes. Allowed DataTypes are registered against a specific
DBObjectProvider
class as allowed types. Having
a single registry for all providers ensures that all supported database's
DataTypes are known to users of the API.
All datatype names are uppercased before being cached, and all queries to find a datatype by name are uppercased as well.
Nested Class Summary | |
---|---|
static class |
DataTypeRegistry.Registerer
A Registerer is responsible for providing allowed DataTypes for a given provider class. |
Method Summary | |
---|---|
DataType |
createUserDataType(java.lang.String name,
java.lang.Class provider)
Used to create a "user" datatype for types that are discovered that we didn't already know about (usually from a foreign database, or for un-imported object types. |
DataType |
findAnsiType(java.lang.String name)
Returns the registered ansi datatype with the given name (if one exists). |
Type |
findComplexType(java.lang.String name,
java.lang.String schemaName,
java.lang.Class provider)
Returns a ComplexType with given name from a schema registered against the given provider class. |
DataType |
findDataType(java.lang.String name,
java.lang.Class provider)
Returns the DataType regsitered with a given name against the (provider class, and all superclasses) |
DataType[] |
getAnsiTypes()
Returns the ansi types that are registered. |
DataType |
getBaseType(DataType synonym)
Returns the base DataType for this synonym DataType, or null if the given DataType isn't a synonym. |
static DataTypeRegistry |
getInstance()
Returns the global instance of the DataTypeRegistry. |
DataType |
getMappedAnsiType(DataType type)
Returns the ANSI DataType (if there is one) that this DataType maps to. |
DataType |
getMappedType(java.lang.String ansiTypeName,
java.lang.Class provider)
Returns a provider's DataType that maps to an ANSI data type name, or null if there isn't one. |
static boolean |
isGenericJdbcClass(java.lang.Class clz)
|
boolean |
isRegisteredType(DataType type)
Returns true if the given type is registered with this registry. |
boolean |
isSynonymType(DataType type)
Returns true if the given type is a synonym for another type. |
Type[] |
listComplexTypes(java.lang.String schemaName,
java.lang.Class provider)
Returns all the ComplexTypes registered under the given schema name for the registered provider Class and its superclasses. |
java.lang.String[] |
listComplexTypeSchemas(java.lang.Class provider)
|
DataType[] |
listDataTypes(java.lang.Class provider)
Returns the registered DataType instances for a given provider class (and all superclasses) |
void |
mapToAnsiType(DataType type,
DataType ansiType)
Maps a DataType for a Database to an ANSI type. |
void |
mapToAnsiType(DataType type,
java.lang.String ansiTypeName)
Maps a DataType for a Database to an ANSI type. |
void |
registerComplexType(ComplexType type,
java.lang.Class provider)
Deprecated. use registerComplexType( Type type, Class provider ) |
void |
registerComplexType(Type type,
java.lang.Class provider)
Register a complex type against a given schema. |
void |
registerDataType(DataType type,
java.lang.Class provider)
Registers a DataType against the given provider class. |
void |
registerDataType(DataType type,
java.lang.Class provider,
DataType ansiType)
Registers a DataType against the given provider class and includes the ANSI equivalent of this type. |
static void |
registerGenericJdbcClass(java.lang.Class<? extends JdbcDatabase> clz)
|
void |
registerProvider(DataTypeRegistry.Registerer reg,
java.lang.Class provider)
Registers a provider of datatypes against |
void |
registerSynonym(DataType synonymType,
DataType baseType,
java.lang.Class provider)
Registers a DataType as a synonym for the given base DataType in the given provider. |
DataType |
registerSynonym(java.lang.String synonym,
DataType baseType,
java.lang.Class provider)
Registers a new synonym for the given DataType in the given provider. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void registerProvider(DataTypeRegistry.Registerer reg, java.lang.Class provider)
public void registerDataType(DataType type, java.lang.Class provider)
public void registerDataType(DataType type, java.lang.Class provider, DataType ansiType)
public void registerComplexType(Type type, java.lang.Class provider)
@Deprecated public void registerComplexType(ComplexType type, java.lang.Class provider)
public DataType createUserDataType(java.lang.String name, java.lang.Class provider)
public DataType findDataType(java.lang.String name, java.lang.Class provider)
public Type findComplexType(java.lang.String name, java.lang.String schemaName, java.lang.Class provider)
public DataType[] listDataTypes(java.lang.Class provider)
public Type[] listComplexTypes(java.lang.String schemaName, java.lang.Class provider)
public java.lang.String[] listComplexTypeSchemas(java.lang.Class provider)
public boolean isRegisteredType(DataType type)
public DataType registerSynonym(java.lang.String synonym, DataType baseType, java.lang.Class provider)
public void registerSynonym(DataType synonymType, DataType baseType, java.lang.Class provider)
public boolean isSynonymType(DataType type)
public DataType getBaseType(DataType synonym)
public DataType findAnsiType(java.lang.String name)
public DataType[] getAnsiTypes()
public void mapToAnsiType(DataType type, java.lang.String ansiTypeName)
public void mapToAnsiType(DataType type, DataType ansiType)
public DataType getMappedAnsiType(DataType type)
public DataType getMappedType(java.lang.String ansiTypeName, java.lang.Class provider)
public static DataTypeRegistry getInstance()
public static final void registerGenericJdbcClass(java.lang.Class<? extends JdbcDatabase> clz)
public static final boolean isGenericJdbcClass(java.lang.Class clz)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |