Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.db
Class CheckConstraint

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractChildDBObject
          extended by oracle.javatools.db.Constraint
              extended by oracle.javatools.db.CheckConstraint

All Implemented Interfaces:
ChildDBObject, DBObject, Copyable, DynamicPropertySet

public class CheckConstraint
extends Constraint

A CheckConstraint constrains a table or view based on a conditional expression.


Nested Class Summary

 

Nested classes/interfaces inherited from class oracle.javatools.db.Constraint
Constraint.DeferrableState

 

Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport

 

Field Summary
static java.lang.String CONSTRAINT_TYPE
           

 

Fields inherited from class oracle.javatools.db.Constraint
TYPE

 

Fields inherited from interface oracle.javatools.db.DBObject
COMMENT

 

Constructor Summary
CheckConstraint()
          Creates a new CheckConstraint.
CheckConstraint(java.lang.String name, Relation relation)
          Constructs a new CheckConstraint on a relation with a specific name.

 

Method Summary
protected  void copyToImpl(AbstractDBObject copy, DBObject copyParent, IDPolicy idPolicy)
          Implementation method for making a copy of this object.
 DBObject findOwnedObject(DBObjectID id)
          Returns a child of this object that has the given ID.
 java.lang.String getCheckCondition()
          Deprecated. - use getCheckConditionFragment()
 SQLFragment getCheckConditionFragment()
          Retrieves the conditional expression represented by this constraint.
 java.lang.String getConstraintType()
          Retrieves the type of constraint represented by this instance.
 void setCheckCondition(java.lang.String condition)
          Deprecated. - use setCheckConditionFragment(SQLFragment)
 void setCheckConditionFragment(SQLFragment condition)
          Sets the conditional expression represented by this constraint.

 

Methods inherited from class oracle.javatools.db.Constraint
getConstraints, getDeferrableState, getRelation, getType, isEnabled, setDeferrableState, setEnabled, setRelation

 

Methods inherited from class oracle.javatools.db.AbstractChildDBObject
findParent, getParent, getProperty, setParent, setProperty

 

Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDs, getReferenceIDsImpl, 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.DBObject
copyTo, copyTo, copyTo, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName

 

Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, setProperties

 

Field Detail

CONSTRAINT_TYPE

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

Constructor Detail

CheckConstraint

public CheckConstraint(java.lang.String name,
                       Relation relation)
Constructs a new CheckConstraint on a relation with a specific name.
Parameters:
name - a string representing name of the constraint
relation - the relation being constrained

CheckConstraint

public CheckConstraint()
Creates a new CheckConstraint.

Method Detail

getConstraintType

public java.lang.String getConstraintType()
Description copied from class: Constraint
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.
Specified by:
getConstraintType in class Constraint
Returns:
a string value indicating the type of constraint.

getCheckCondition

@Deprecated
public java.lang.String getCheckCondition()
Deprecated. - use getCheckConditionFragment()
Retrieves the conditional expression represented by this constraint.
Returns:
a string containing the conditional expression

setCheckCondition

@Deprecated
public void setCheckCondition(java.lang.String condition)
Deprecated. - use setCheckConditionFragment(SQLFragment)
Sets the conditional expression represented by this constraint.
Parameters:
condition - a string containing the conditional expression

getCheckConditionFragment

public SQLFragment getCheckConditionFragment()
Retrieves the conditional expression represented by this constraint.
Returns:
a SQLFragment representing the conditional expression

setCheckConditionFragment

public void setCheckConditionFragment(SQLFragment condition)
Sets the conditional expression represented by this constraint.
Parameters:
condition - a SQLFragment representing the conditional expression

findOwnedObject

public DBObject findOwnedObject(DBObjectID id)
Description copied from class: AbstractDBObject
Returns a child of this object that has the given ID. The child is located by comparing IDs, not by calling resolveID() which is quicker. The method does not recurse to look for children of children. This method is a candidate for adding to the DBObject interface.
Specified by:
findOwnedObject in interface DBObject
Overrides:
findOwnedObject in class AbstractDBObject
Parameters:
id - the id to look for
Returns:
a child object found with that id.

copyToImpl

protected void copyToImpl(AbstractDBObject copy,
                          DBObject copyParent,
                          IDPolicy idPolicy)
Description copied from class: AbstractDBObject
Implementation method for making a copy of this object. To add custom copyTo logic, a subclass must override this method (exactly), and must call back to the super implementation.
Overrides:
copyToImpl in class AbstractChildDBObject
Parameters:
copy - the copy being created of this object
copyParent - if this object is being copied underneath a parent, this parameter is the copy of the parent of this object, which will therefore need to be the parent of the copy of this object.
idPolicy - the policy for copying the object's ID.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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