Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.db
Class Synonym

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.AbstractSystemObject
              extended by oracle.javatools.db.AbstractSchemaObject
                  extended by oracle.javatools.db.Synonym
All Implemented Interfaces:
DBObject, SchemaObject, SystemObject, Copyable, DynamicPropertySet

public class Synonym
extends AbstractSchemaObject

Model of a database synonym. A synonym is a reference to another object. Synonyms can be defined as being public, in which case they are available to all users without a schema qualifier.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
static java.lang.String PUBLIC_TYPE
           
static java.lang.String TYPE
           
 
Fields inherited from class oracle.javatools.db.AbstractSystemObject
m_listeners
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
Synonym()
          Constructs a new Synonym.
Synonym(java.lang.String name, Schema schema, DBObjectID ref)
          Constructs a new Synonym pointing to a specific object, in a specific schema, and with a specific name.
 
Method Summary
 DBObjectID getReference()
          Retrieves the object refered to by this synonym.
 java.lang.String getType()
          Returns the type of this object.
 boolean isPublic()
          Whether this synonynm is public.
 void setPublic(boolean pub)
          Sets whether this synonym is public.
 void setReference(DBObjectID ref)
          Sets the object refered to by this synonym.
 
Methods inherited from class oracle.javatools.db.AbstractSchemaObject
addObjectListener, copyToImpl, equalsImpl, getProperty, getSchema, removeObjectListener, setProperty, setSchema
 
Methods inherited from class oracle.javatools.db.AbstractSystemObject
addObjectListener, fireObjectUpdated, getParent, removeObjectListener
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.SystemObject
addObjectListener, fireObjectUpdated, removeObjectListener
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, setProperties
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

PUBLIC_TYPE

public static final java.lang.String PUBLIC_TYPE
See Also:
Constant Field Values
Constructor Detail

Synonym

public Synonym()
Constructs a new Synonym.


Synonym

public Synonym(java.lang.String name,
               Schema schema,
               DBObjectID ref)
Constructs a new Synonym pointing to a specific object, in a specific schema, and with a specific name.

Parameters:
name - a string containing the name of the synonym
schema - the schema containing the synonym
ref - the Object this synonym refers to
Method Detail

getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

getReference

public DBObjectID getReference()
Retrieves the object refered to by this synonym.

Returns:
the object referenced by this synonym

setReference

public void setReference(DBObjectID ref)
Sets the object refered to by this synonym.

Parameters:
ref - the object referenced by this synonym

isPublic

public boolean isPublic()
Whether this synonynm is public. A public synonym is available without a schema qualifier.

Returns:
a boolean value indicating whether this schema is public

setPublic

public void setPublic(boolean pub)
Sets whether this synonym is public. A public synonym is available without a schema qualifier.

Parameters:
pub - a boolean value indicating whether this schema is public

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.