Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Class Constraint

java.lang.Object
  extended byoracle.jdeveloper.cm.ds.db.AbstractDBObject
      extended byoracle.jdeveloper.cm.ds.db.Constraint
All Implemented Interfaces:
Copyable, DBObject, Subject
Direct Known Subclasses:
CheckConstraint, ColumnConstraint

public abstract class Constraint
extends AbstractDBObject

A Constraint represents a constraint on a table or view.


Field Summary
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
COMMENT
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Constructor Summary
protected Constraint()
          Constructs a new Constraint.
protected Constraint(java.lang.String name, Relation relation)
          Constructs a new Constraint on a relation with a specific name.
 
Method Summary
protected  void copyToImpl(Constraint copy)
           
protected  boolean equalsImpl(Constraint target)
           
abstract  java.lang.String getConstraintType()
          Retrieves the type of constraint represented by this instance.
 Relation getRelation()
          Gets the Relation that owns this Constraint.
 java.lang.String getType()
          Returns the type of this object.
 boolean isEnabled()
          Whether this constraint is current enabled.
 void setEnabled(boolean enabled)
          Sets the enabled state of this constraint.
 void setRelation(Relation relation)
          Sets the Relation that owns this Constraint.
 
Methods inherited from class oracle.jdeveloper.cm.ds.db.AbstractDBObject
attach, compareToImpl, copyToImpl, detach, equals, equalsImpl, getID, getName, getProperties, getProperty, hashCode, notifyObservers, setID, setName, setProperties, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
copyTo
 

Field Detail

TYPE

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

Constraint

protected Constraint()
Constructs a new Constraint.


Constraint

protected Constraint(java.lang.String name,
                     Relation relation)
Constructs a new Constraint on a relation with a specific name.

Parameters:
name - a string containing the constraint name
relation - the relation being constrained
Method Detail

copyToImpl

protected void copyToImpl(Constraint copy)

equalsImpl

protected boolean equalsImpl(Constraint target)

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled state of this constraint. Disabled constraints are not enforced.

Parameters:
enabled - a boolean value indicating whether this constraint it is enabled.

isEnabled

public boolean isEnabled()
Whether this constraint is current enabled. Disabled constraints are not enforced.

Returns:
a boolean value indicating whether this constraint it is enabled.

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.

getConstraintType

public abstract java.lang.String getConstraintType()
Retrieves the type of constraint represented by this instance. Valid constraint types can vary depending on the database. Examples of constraint types include primary key constraints, foreign key constraints, and check constraints.

Returns:
a string value indicating the type of constraint.

getRelation

public Relation getRelation()
                     throws TransientMarker
Gets the Relation that owns this Constraint.

Returns:
the Relation that owns this constraint
Throws:
TransientMarker

setRelation

public void setRelation(Relation relation)
Sets the Relation that owns this Constraint.

Parameters:
relation - the Relation that owns this constraint.

Extension SDK

 

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