|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.catalog.types.ReferencedColumnsDescriptorImpl
public class ReferencedColumnsDescriptorImpl
For triggers, ReferencedColumnsDescriptorImpl object has 3 possibilites 1)referencedColumns is not null but referencedColumnsInTriggerAction is null - meaning the trigger is defined on specific columns but trigger action does not reference any column through old/new transient variables. Another reason for referencedColumnsInTriggerAction to be null(even though trigger action does reference columns though old/new transient variables would be that we are in soft-upgrade mode for pre-10.7 databases and hence we do not want to write anything about referencedColumnsInTriggerAction for backward compatibility (DERBY-1482). eg create trigger tr1 after update of c1 on t1 for each row values(1); 2)referencedColumns is null but referencedColumnsInTriggerAction is not null - meaning the trigger is not defined on specific columns but trigger action references column through old/new transient variables eg create trigger tr1 after update on t1 referencing old as oldt for each row values(oldt.id); 3)referencedColumns and referencedColumnsInTriggerAction are not null - meaning the trigger is defined on specific columns and trigger action references column through old/new transient variables eg create trigger tr1 after update of c1 on t1 referencing old as oldt for each row values(oldt.id);
| Field Summary | |
|---|---|
private int[] |
referencedColumns
This class implements Formatable. |
private int[] |
referencedColumnsInTriggerAction
|
| Constructor Summary | |
|---|---|
ReferencedColumnsDescriptorImpl()
Zero-argument constructor for Formatable interface |
|
ReferencedColumnsDescriptorImpl(int[] referencedColumns)
Constructor for an ReferencedColumnsDescriptorImpl |
|
ReferencedColumnsDescriptorImpl(int[] referencedColumns,
int[] referencedColumnsInTriggerAction)
Constructor for an ReferencedColumnsDescriptorImpl |
|
| Method Summary | |
|---|---|
int[] |
getReferencedColumnPositions()
Returns an array of 1-based column positions in the table that the check constraint is on. |
int[] |
getTriggerActionReferencedColumnPositions()
Returns an array of 1-based column positions in the trigger table. |
int |
getTypeFormatId()
Get a universally unique identifier for the type of this object. |
void |
readExternal(java.io.ObjectInput in)
For triggers, 3 possible scenarios 1)referencedColumns is not null but referencedColumnsInTriggerAction is null - then following will get read referencedColumns.length individual elements from referencedColumns arrary eg create trigger tr1 after update of c1 on t1 for each row values(1); 2)referencedColumns is null but referencedColumnsInTriggerAction is not null - then following will get read -1 -1 referencedColumnsInTriggerAction.length individual elements from referencedColumnsInTriggerAction arrary eg create trigger tr1 after update on t1 referencing old as oldt for each row values(oldt.id); 3)referencedColumns and referencedColumnsInTriggerAction are not null - then following will get read -1 referencedColumns.length individual elements from referencedColumns arrary referencedColumnsInTriggerAction.length individual elements from referencedColumnsInTriggerAction arrary eg create trigger tr1 after update of c1 on t1 referencing old as oldt for each row values(oldt.id); Scenario 1 for triggers is possible for all different releases of dbs ie both pre-10.7 and 10.7(and higher). |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
For triggers, 3 possible scenarios 1)referencedColumns is not null but referencedColumnsInTriggerAction is null - then following gets written referencedColumns.length individual elements from referencedColumns arrary eg create trigger tr1 after update of c1 on t1 for each row values(1); This can also happen for a trigger like following if the database is at pre-10.7 level. |
private void |
writeReferencedColumns(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int[] referencedColumns
private int[] referencedColumnsInTriggerAction
| Constructor Detail |
|---|
public ReferencedColumnsDescriptorImpl(int[] referencedColumns)
referencedColumns - The array of referenced columns.
public ReferencedColumnsDescriptorImpl(int[] referencedColumns,
int[] referencedColumnsInTriggerAction)
referencedColumns - The array of referenced columns.referencedColumnsInTriggerAction - The array of referenced columns
in trigger action through old/new transition variables.public ReferencedColumnsDescriptorImpl()
| Method Detail |
|---|
public int[] getReferencedColumnPositions()
ReferencedColumns
getReferencedColumnPositions in interface ReferencedColumnsReferencedColumns.getReferencedColumnPositions()public int[] getTriggerActionReferencedColumnPositions()
ReferencedColumns
getTriggerActionReferencedColumnPositions in interface ReferencedColumnsReferencedColumns.getTriggerActionReferencedColumnPositions()
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOException - Thrown on read errorExternalizable.readExternal(java.io.ObjectInput)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException - Thrown on write errorExternalizable.writeExternal(java.io.ObjectOutput)
private void writeReferencedColumns(java.io.ObjectOutput out)
throws java.io.IOException
java.io.IOExceptionpublic int getTypeFormatId()
TypedFormat
getTypeFormatId in interface TypedFormatpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||