Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.execute
Class FKInfo  view FKInfo download FKInfo.java

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.FKInfo
All Implemented Interfaces:
java.io.Externalizable, org.apache.derby.iapi.services.io.Formatable, java.io.Serializable, org.apache.derby.iapi.services.io.TypedFormat

public class FKInfo
extends java.lang.Object
implements org.apache.derby.iapi.services.io.Formatable

This is a simple class used to store the run time information about a foreign key. Used by DML to figure out what to check.


Field Summary
 int[] colArray
           
 long[] fkConglomNumbers
           
 java.lang.String[] fkConstraintNames
           
 boolean[] fkIsSelfReferencing
           
 org.apache.derby.catalog.UUID[] fkUUIDs
           
static int FOREIGN_KEY
          This class implements Formatable.
 int[] raRules
           
 long refConglomNumber
           
static int REFERENCED_KEY
           
 org.apache.derby.catalog.UUID refUUID
           
 org.apache.derby.iapi.types.RowLocation rowLocation
           
 int stmtType
           
 java.lang.String tableName
           
 int type
           
 
Constructor Summary
FKInfo()
          Niladic constructor for Formattable
FKInfo(java.lang.String[] fkConstraintNames, java.lang.String tableName, int stmtType, int type, org.apache.derby.catalog.UUID refUUID, long refConglomNumber, org.apache.derby.catalog.UUID[] fkUUIDs, long[] fkConglomNumbers, boolean[] fkIsSelfReferencing, int[] colArray, org.apache.derby.iapi.types.RowLocation rowLocation, int[] raRules)
          Consructor for FKInfo
 
Method Summary
static FKInfo[] chooseRelevantFKInfos(FKInfo[] fkInfo, int[] cols, boolean addAllTypeIsFK)
          Comb through the FKInfo structures and pick out the ones that have columns that intersect with the input columns.
 int getTypeFormatId()
          Get the formatID which corresponds to this class.
 void readExternal(java.io.ObjectInput in)
          Read this object from a stream of stored objects.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 void writeExternal(java.io.ObjectOutput out)
          Write this object out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FOREIGN_KEY

public static final int FOREIGN_KEY
This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method. OR, since this is something that is used in stored prepared statements, it is ok to change it if you make sure that stored prepared statements are invalidated across releases.

See Also:
Constant Field Values

REFERENCED_KEY

public static final int REFERENCED_KEY
See Also:
Constant Field Values

fkConstraintNames

public java.lang.String[] fkConstraintNames

tableName

public java.lang.String tableName

type

public int type

refUUID

public org.apache.derby.catalog.UUID refUUID

refConglomNumber

public long refConglomNumber

fkUUIDs

public org.apache.derby.catalog.UUID[] fkUUIDs

fkConglomNumbers

public long[] fkConglomNumbers

fkIsSelfReferencing

public boolean[] fkIsSelfReferencing

colArray

public int[] colArray

stmtType

public int stmtType

rowLocation

public org.apache.derby.iapi.types.RowLocation rowLocation

raRules

public int[] raRules
Constructor Detail

FKInfo

public FKInfo()
Niladic constructor for Formattable


FKInfo

public FKInfo(java.lang.String[] fkConstraintNames,
              java.lang.String tableName,
              int stmtType,
              int type,
              org.apache.derby.catalog.UUID refUUID,
              long refConglomNumber,
              org.apache.derby.catalog.UUID[] fkUUIDs,
              long[] fkConglomNumbers,
              boolean[] fkIsSelfReferencing,
              int[] colArray,
              org.apache.derby.iapi.types.RowLocation rowLocation,
              int[] raRules)
Consructor for FKInfo

Method Detail

chooseRelevantFKInfos

public static FKInfo[] chooseRelevantFKInfos(FKInfo[] fkInfo,
                                             int[] cols,
                                             boolean addAllTypeIsFK)
Comb through the FKInfo structures and pick out the ones that have columns that intersect with the input columns.


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this object out

Specified by:
writeExternal in interface java.io.Externalizable

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read this object from a stream of stored objects.

Specified by:
readExternal in interface java.io.Externalizable

getTypeFormatId

public int getTypeFormatId()
Get the formatID which corresponds to this class.

Specified by:
getTypeFormatId in interface org.apache.derby.iapi.services.io.TypedFormat

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).