public class ReferencedColumnsDescriptorImpl extends java.lang.Object implements ReferencedColumns, Formatable
Modifier and Type | Field and Description |
---|---|
private int[] |
referencedColumns
This class implements Formatable.
|
private int[] |
referencedColumnsInTriggerAction |
Constructor and Description |
---|
ReferencedColumnsDescriptorImpl()
Zero-argument constructor for Formatable interface
|
ReferencedColumnsDescriptorImpl(int[] referencedColumns)
Constructor for an ReferencedColumnsDescriptorImpl
|
ReferencedColumnsDescriptorImpl(int[] referencedColumns,
int[] referencedColumnsInTriggerAction)
Constructor for an ReferencedColumnsDescriptorImpl
|
Modifier and Type | Method and Description |
---|---|
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) |
private int[] referencedColumns
private int[] referencedColumnsInTriggerAction
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()
public int[] getReferencedColumnPositions()
ReferencedColumns
getReferencedColumnPositions
in interface ReferencedColumns
ReferencedColumns.getReferencedColumnPositions()
public int[] getTriggerActionReferencedColumnPositions()
ReferencedColumns
getTriggerActionReferencedColumnPositions
in interface ReferencedColumns
ReferencedColumns.getTriggerActionReferencedColumnPositions()
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
readExternal
in interface java.io.Externalizable
java.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.Externalizable
java.io.IOException
- Thrown on write errorExternalizable.writeExternal(java.io.ObjectOutput)
private void writeReferencedColumns(java.io.ObjectOutput out) throws java.io.IOException
java.io.IOException
public int getTypeFormatId()
TypedFormat
getTypeFormatId
in interface TypedFormat
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.