|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.db.model.DBObjectNodeUtil
public final class DBObjectNodeUtil
Utility methods for dealing with DBObjectNode instances. The various methods can make the job of handling DnD of nodes easier by providing quick test methods to see if the object in question is a valid node that matches a given object type. Specific tests are also provided for Relations as they could be objects of a number of types.
Method Summary | ||
---|---|---|
static DBObjectProvider |
findProvider(java.lang.Object node) Attempts to locate a DBObjectProvider for the given node. |
|
static java.lang.String |
getConnectionName(java.lang.Object node) Returns the name of the connection if it is retrievable from the given object (node). |
|
static
|
getElementOfType(Element elem, java.lang.Class<T> clz) Tests the given element to see if it is of the given element class and returns it. |
|
static java.lang.Object |
getProviderIdentifier(java.lang.Object node) If the given node is recognizable as representing a DBObjectProvider (or object therein) this will return the type of that provider. |
|
static java.lang.String |
getProviderType(java.lang.Object node) If the given node is recognizable as representing a DBObjectProvider (or object therein) this will return the type of that provider. |
|
static Schema |
getSchema(DBObjectTypeNode node, boolean defaultIfNone) Gets the schema for the given node. |
|
static java.lang.String |
getSchemaName(DBObjectTypeNode node) Gets the schema name for the given type node, working around any irregularities in the navigator. |
|
static
|
getSelectedElement(Context context, java.lang.Class<T> clz) Inspects the selection of the given context. |
|
static java.lang.String |
getStoreName(java.lang.Object node) Returns the name of the store if it is retrievable from the given object (node). |
|
static boolean |
isConnectionNode(java.lang.Object node) Tests whether the the given element represents an online database connection. |
|
static boolean |
isNodeOfType(java.lang.String type, java.lang.Object node) Returns true if the given object is a valid DBObjectNode that contains an object with the given type. |
|
static boolean |
isOnlineNode(java.lang.Object node) Returns true if the given object is a valid DBObjectNode that has come from a live (online) database connection. |
|
static boolean |
isOnlineNodeOfType(java.lang.String type, java.lang.Object node) Returns true if the given object is a valid DBObjectNode that contains an object with the given type AND that object has come from a live (online) database connection. |
|
static boolean |
isOnlineRelationNode(java.lang.Object node) Returns true if the given object is a valid DBObjectNode that contains a Relation object (i.e. |
|
static boolean |
isOnlineRelationNode(java.lang.Object node, boolean unwrapSynonym) Returns true if the given object is a valid DBObjectNode that contains a Relation object (i.e. |
|
static boolean |
isRelationNode(java.lang.Object node) Returns true if the given object is a valid DBObjectNode that contains a Relation object (i.e. |
|
static boolean |
isRelationNode(java.lang.Object node, boolean unwrapSynonym) Returns true if the given object is a valid DBObjectNode that contains a Relation object (i.e. |
|
static boolean |
isSynonymNode(java.lang.Object node) |
|
static java.lang.String |
normalizeType(DBObjectTypeNode node) Normalizes the object type for the given type node to workaround problems with the Database Navigator and PUBLIC synonyms and db links. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DBObjectProvider findProvider(java.lang.Object node)
node
- the navigator node to inspectDBObjectProviderNode
, DatabaseNode
public static java.lang.String getProviderType(java.lang.Object node)
public static java.lang.Object getProviderIdentifier(java.lang.Object node)
public static boolean isConnectionNode(java.lang.Object node)
findProvider(java.lang.Object)
to test whether it is connected.public static boolean isNodeOfType(java.lang.String type, java.lang.Object node)
type
- the type of object we're looking fornode
- the node to test for the objectpublic static boolean isOnlineNodeOfType(java.lang.String type, java.lang.Object node)
type
- the type of object we're looking fornode
- the node to test for the objectpublic static boolean isOnlineNode(java.lang.Object node)
node
- the node to test for the objectpublic static boolean isRelationNode(java.lang.Object node)
node
- the node to test for a RelationisNodeOfType(java.lang.String, java.lang.Object)
public static boolean isRelationNode(java.lang.Object node, boolean unwrapSynonym)
node
- the node to test for a RelationunwrapSynonym
- resolve referenced object for SynonymsisNodeOfType(java.lang.String, java.lang.Object)
public static boolean isSynonymNode(java.lang.Object node)
public static boolean isOnlineRelationNode(java.lang.Object node)
node
- the node to test for a RelationisOnlineNodeOfType(java.lang.String, java.lang.Object)
public static boolean isOnlineRelationNode(java.lang.Object node, boolean unwrapSynonym)
node
- the node to test for a RelationunwrapSynonym
- resolve referenced object for SynonymsisOnlineNodeOfType(java.lang.String, java.lang.Object)
public static java.lang.String getStoreName(java.lang.Object node)
node
- the node to to checkDatabaseConnectionStores.getCurrentStore()
public static java.lang.String getConnectionName(java.lang.Object node)
node
- the node to to checkDatabaseConnectionStores.getCurrentConnection(oracle.ide.Context)
public static <T extends Element> T getSelectedElement(Context context, java.lang.Class<T> clz)
context
- the context to look at the selection ofclz
- the class of Element to look forgetElementOfType(oracle.ide.model.Element, java.lang.Class<T>)
public static <T extends Element> T getElementOfType(Element elem, java.lang.Class<T> clz)
elem
- the element to testclz
- the class of Element to look forpublic static Schema getSchema(DBObjectTypeNode node, boolean defaultIfNone)
node
- the node to get the Schema fordefaultIfNone
- whether to default to the default schema if the node's schema cannot be determinedpublic static java.lang.String getSchemaName(DBObjectTypeNode node)
public static java.lang.String normalizeType(DBObjectTypeNode node)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |