Java Doc for ConstraintDescriptor.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » sql » dictionary » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.iapi.sql.dictionary 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.sql.dictionary.TupleDescriptor
      org.apache.derby.iapi.sql.dictionary.ConstraintDescriptor

All known Subclasses:   org.apache.derby.iapi.sql.dictionary.CheckConstraintDescriptor,  org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor,
ConstraintDescriptor
abstract public class ConstraintDescriptor extends TupleDescriptor implements UniqueTupleDescriptor,Provider,Dependent(Code)
This class is used to get information from a ConstraintDescriptor. A ConstraintDescriptor can represent a constraint on a table or on a column.
version:
   0.1
author:
   Jeff Lichtman


Field Summary
final public static  intALL
    
final public static  intDISABLED
    
final public static  intENABLED
    
final public static  intSYSCONSTRAINTS_STATE_FIELD
    
final  UUIDconstraintId
    
final  StringconstraintName
    
 booleanisEnabled
    
 TableDescriptortable
    

Constructor Summary
 ConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, SchemaDescriptor schemaDesc, boolean isEnabled)
    

Method Summary
public  booleanareColumnsComparable(ColumnDescriptorList otherColumns)
     Indicates whether the column descriptor list is type comparable with the constraints columns.
public  booleancolumnIntersects(int columnArray)
    
public  booleandeferrable()
     Returns TRUE if the constraint is deferrable (we will probably not do deferrable constraints in the initial release, but I want this to be part of the interface).
static  booleandoColumnsIntersect(int[] otherColumns, int[] referencedColumns)
     Does a column in the input set intersect with our referenced columns?
Parameters:
  otherColumns - the columns to compare.
public  StringgetClassType()
     Get the provider's type.
public  ColumnDescriptorListgetColumnDescriptors()
     Get the column descriptors for all the columns referenced by this constraint.
abstract public  UUIDgetConglomerateId()
    
public  StringgetConstraintName()
     Gets the name of the constraint.
public  StringgetConstraintText()
     Get the text of the constraint.
abstract public  intgetConstraintType()
     Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).
public  DependableFindergetDependableFinder()
    
public  StringgetDescriptorName()
    
public  StringgetDescriptorType()
    
public  int[]getKeyColumns()
     RESOLVE: For now the ConstraintDescriptor code stores the array of key columns in the field 'otherColumns'.
public  UUIDgetObjectID()
    
public  StringgetObjectName()
     Return the name of this Provider.
public  intgetReferenceCount()
     Get the number of enabled fks that reference this key.
public  int[]getReferencedColumns()
     Returns an array of column ids (i.e.
public  SchemaDescriptorgetSchemaDescriptor()
     Get the SchemaDescriptor for the schema that this constraint belongs to.
public  TableDescriptorgetTableDescriptor()
     Get the table descriptor upon which this constraint is declared.
public  UUIDgetTableId()
     Gets the UUID of the table the constraint is on.
public  UUIDgetUUID()
     Gets the UUID of the constraint.
abstract public  booleanhasBackingIndex()
    
public  booleaninitiallyDeferred()
     Returns TRUE if the constraint is initially deferred (we will probably not do initially deferred constraints in the initial release, but I want this to be part of the interface).
public  booleanisEnabled()
    
public  booleanisReferenced()
     Is this constraint referenced? Return false.
public synchronized  booleanisValid()
     Check that all of the dependent's dependencies are valid.
public  voidmakeInvalid(int action, LanguageConnectionContext lcc)
     Mark the dependent as invalid (due to at least one of its dependencies being invalid).
public  voidmakeValid(LanguageConnectionContext lcc)
     Attempt to revalidate the dependent.
abstract public  booleanneedsToFire(int stmtType, int[] modifiedCols)
    
public  voidprepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc)
     Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
public  voidsetDisabled()
     Set the constraint to disabled.
public  voidsetEnabled()
     Set the constraint to enabled.
public  StringtoString()
     Convert the ColumnDescriptor to a String.

Field Detail
ALL
final public static int ALL(Code)



DISABLED
final public static int DISABLED(Code)



ENABLED
final public static int ENABLED(Code)



SYSCONSTRAINTS_STATE_FIELD
final public static int SYSCONSTRAINTS_STATE_FIELD(Code)



constraintId
final UUID constraintId(Code)



constraintName
final String constraintName(Code)



isEnabled
boolean isEnabled(Code)



table
TableDescriptor table(Code)




Constructor Detail
ConstraintDescriptor
ConstraintDescriptor(DataDictionary dataDictionary, TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, SchemaDescriptor schemaDesc, boolean isEnabled)(Code)
Constructor for a ConstraintDescriptor
Parameters:
  dataDictionary - The data dictionary that this descriptor lives in
Parameters:
  table - The descriptor of the table the constraint is on
Parameters:
  constraintName - The name of the constraint.
Parameters:
  deferrable - If the constraint can be deferred.
Parameters:
  initiallyDeferred - If the constraint starts life deferred.
Parameters:
  referencedColumns - columns that the constraint references
Parameters:
  constraintId - UUID of constraint
Parameters:
  schemaDesc - SchemaDescriptor




Method Detail
areColumnsComparable
public boolean areColumnsComparable(ColumnDescriptorList otherColumns) throws StandardException(Code)
Indicates whether the column descriptor list is type comparable with the constraints columns. The types have to be identical AND in the same order to succeed.
Parameters:
  otherColumns - the columns to compare true/false
exception:
  StandardException - on error



columnIntersects
public boolean columnIntersects(int columnArray)(Code)
Does a column intersect with our referenced columns
Parameters:
  columnArray - columns to checkNote-- this is not a static method.



deferrable
public boolean deferrable()(Code)
Returns TRUE if the constraint is deferrable (we will probably not do deferrable constraints in the initial release, but I want this to be part of the interface). TRUE if the constraint is deferrable, FALSE if not



doColumnsIntersect
static boolean doColumnsIntersect(int[] otherColumns, int[] referencedColumns)(Code)
Does a column in the input set intersect with our referenced columns?
Parameters:
  otherColumns - the columns to compare. Ifnull, asssumed to mean all columns
Parameters:
  referencedColumns - the columns referenced by the caller true/false



getClassType
public String getClassType()(Code)
Get the provider's type. char The provider's type.



getColumnDescriptors
public ColumnDescriptorList getColumnDescriptors() throws StandardException(Code)
Get the column descriptors for all the columns referenced by this constraint. the column descriptor list
exception:
  StandardException - on error



getConglomerateId
abstract public UUID getConglomerateId()(Code)



getConstraintName
public String getConstraintName()(Code)
Gets the name of the constraint. A String containing the name of the constraint.



getConstraintText
public String getConstraintText()(Code)
Get the text of the constraint. (Only non-null/meaningful for check constraints.) The constraint text.



getConstraintType
abstract public int getConstraintType()(Code)
Gets an identifier telling what type of descriptor it is (UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK). An identifier telling what type of descriptor it is(UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK).



getDependableFinder
public DependableFinder getDependableFinder()(Code)
the stored form of this provider
See Also:   Dependable.getDependableFinder



getDescriptorName
public String getDescriptorName()(Code)

See Also:   TupleDescriptor.getDescriptorName
See Also:   



getDescriptorType
public String getDescriptorType()(Code)



getKeyColumns
public int[] getKeyColumns()(Code)
RESOLVE: For now the ConstraintDescriptor code stores the array of key columns in the field 'otherColumns'. Jerry plans to re-organize things. For now to minimize his rototill I've implemented this function on the old structures. All new code should use getKeyColumns to get a constraint's key columns.
See Also:   org.apache.derby.iapi.sql.dictionary.KeyConstraintDescriptor.getKeyColumns



getObjectID
public UUID getObjectID()(Code)
Get the provider's UUID The provider's UUID



getObjectName
public String getObjectName()(Code)
Return the name of this Provider. (Useful for errors.) String The name of this provider.



getReferenceCount
public int getReferenceCount()(Code)
Get the number of enabled fks that reference this key. Overriden by ReferencedKeyConstraints. the number of fks



getReferencedColumns
public int[] getReferencedColumns()(Code)
Returns an array of column ids (i.e. ordinal positions) for the columns referenced in this table for a primary key, unique key, referential, or check constraint. An array of column ids for those constraints that canbe on columns (primary, unique key, referentialconstraints, and check constraints). For check andunique constraints, it returns an array of columns idsthat are referenced in the constraint. For primary keyand referential constraints, it returns an array ofcolumn ids for the columns in this table (i.e. theprimary key columns for a primary key constraint,and the foreign key columns for a foreign keyconstraint.



getSchemaDescriptor
public SchemaDescriptor getSchemaDescriptor()(Code)
Get the SchemaDescriptor for the schema that this constraint belongs to. SchemaDescriptor The SchemaDescriptor for this constraint.



getTableDescriptor
public TableDescriptor getTableDescriptor()(Code)
Get the table descriptor upon which this constraint is declared. the table descriptor



getTableId
public UUID getTableId()(Code)
Gets the UUID of the table the constraint is on. The UUID of the table the constraint is on.



getUUID
public UUID getUUID()(Code)
Gets the UUID of the constraint. The UUID of the constraint.



hasBackingIndex
abstract public boolean hasBackingIndex()(Code)
Does this constraint have a backing index? boolean Whether or not there is a backing index for this constraint.



initiallyDeferred
public boolean initiallyDeferred()(Code)
Returns TRUE if the constraint is initially deferred (we will probably not do initially deferred constraints in the initial release, but I want this to be part of the interface). TRUE if the constraint is initially deferred,FALSE if not



isEnabled
public boolean isEnabled()(Code)
Is this constraint active? true/false



isReferenced
public boolean isReferenced()(Code)
Is this constraint referenced? Return false. Overridden by ReferencedKeyConstraints. false



isValid
public synchronized boolean isValid()(Code)
Check that all of the dependent's dependencies are valid. true if the dependent is currently valid



makeInvalid
public void makeInvalid(int action, LanguageConnectionContext lcc) throws StandardException(Code)
Mark the dependent as invalid (due to at least one of its dependencies being invalid). Always an error for a constraint -- should never have gotten here.
Parameters:
  action - The action causing the invalidation
exception:
  StandardException - thrown if called in sanity mode



makeValid
public void makeValid(LanguageConnectionContext lcc)(Code)
Attempt to revalidate the dependent. Meaningless for constraints.



needsToFire
abstract public boolean needsToFire(int stmtType, int[] modifiedCols)(Code)
Does this constraint need to fire on this type of DML?
Parameters:
  stmtType - the type of DML (StatementType.INSERT|StatementType.UPDATE|StatementType.DELETE)
Parameters:
  modifiedCols - the columns modified, or null for all true/false



prepareToInvalidate
public void prepareToInvalidate(Provider p, int action, LanguageConnectionContext lcc) throws StandardException(Code)
Prepare to mark the dependent as invalid (due to at least one of its dependencies being invalid).
Parameters:
  action - The action causing the invalidation
Parameters:
  p - the provider
exception:
  StandardException - thrown if unable to make it invalid



setDisabled
public void setDisabled()(Code)
Set the constraint to disabled. Does not update the data dictionary



setEnabled
public void setEnabled()(Code)
Set the constraint to enabled. Does not update the data dictionary



toString
public String toString()(Code)
Convert the ColumnDescriptor to a String. A String representation of this ColumnDescriptor



Fields inherited from org.apache.derby.iapi.sql.dictionary.TupleDescriptor
final public static int COLUMN_LIST(Code)(Java Doc)
final public static int CONGLOMERATE_LIST(Code)(Java Doc)
final public static int CONSTRAINT_LIST(Code)(Java Doc)
final public static int TRIGGER_LIST(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.sql.dictionary.TupleDescriptor
DependableFinder getColumnDependableFinder(int formatId, byte[] columnBitMap)(Code)(Java Doc)
protected DataDictionary getDataDictionary() throws StandardException(Code)(Java Doc)
public DependableFinder getDependableFinder(int formatId)(Code)(Java Doc)
public String getDescriptorName()(Code)(Java Doc)
public String getDescriptorType()(Code)(Java Doc)
public boolean isPersistent()(Code)(Java Doc)
protected void setDataDictionary(DataDictionary dd)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.