| java.lang.Object org.apache.derby.iapi.sql.dictionary.DataDescriptorGenerator
DataDescriptorGenerator | public class DataDescriptorGenerator (Code) | | This is an implementation of the DataDescriptorGenerator interface
that lives in the DataDictionary protocol. See that interface for
a description of what this class is supposed to do.
version: 0.1 author: Jeff Lichtman |
Method Summary | |
protected UUIDFactory | getUUIDFactory() | public CheckConstraintDescriptor | newCheckConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, UUID constraintId, String constraintText, ReferencedColumns referencedColumns, SchemaDescriptor schemaDesc, boolean isEnabled) | public CheckConstraintDescriptor | newCheckConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, UUID constraintId, String constraintText, int[] refCols, SchemaDescriptor schemaDesc, boolean isEnabled) | public ColPermsDescriptor | newColPermsDescriptor(TableDescriptor td, String type, FormatableBitSet columns, String grantor) Manufacture a new ColPermsDescriptor. | public ConglomerateDescriptor | newConglomerateDescriptor(long conglomerateId, String name, boolean indexable, IndexRowGenerator indexRowGenerator, boolean isConstraint, UUID uuid, UUID tableID, UUID schemaID) Create a conglomerate descriptor for the given conglomerate id.
Parameters: conglomerateId - The identifier for the conglomeratewe're interested in Parameters: name - The name of the conglomerate, if any Parameters: indexable - TRUE means the conglomerate is indexable,FALSE means it isn't Parameters: indexRowGenerator - The IndexRowGenerator for the conglomerate,null if it's a heap Parameters: isConstraint - TRUE means the conglomerate is an index backing up a constraint, FALSE means it isn't Parameters: uuid - UUID for this conglomerate Parameters: tableID - UUID for the table that this conglomerate belongs to Parameters: schemaID - UUID for the schema that conglomerate belongs to A ConglomerateDescriptor describing the conglomerate. | public FileInfoDescriptor | newFileInfoDescriptor(UUID id, SchemaDescriptor sd, String SQLName, long generationId) | public ForeignKeyConstraintDescriptor | newForeignKeyConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, ReferencedKeyConstraintDescriptor referencedConstraintDescriptor, boolean isEnabled, int raDeleteRule, int raUpdateRule) | public ForeignKeyConstraintDescriptor | newForeignKeyConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, boolean isEnabled, int raDeleteRule, int raUpdateRule) | public ReferencedKeyConstraintDescriptor | newPrimaryKeyConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount) | public RoutinePermsDescriptor | newRoutinePermsDescriptor(AliasDescriptor ad, String grantor) | public SchemaDescriptor | newSchemaDescriptor(String schemaName, String aid, UUID oid) Create a descriptor for the named schema with a null UUID. | public TableDescriptor | newTableDescriptor(String tableName, SchemaDescriptor schema, int tableType, char lockGranularity) Create a descriptor for the named table within the given schema. | public TableDescriptor | newTableDescriptor(String tableName, SchemaDescriptor schema, int tableType, boolean onCommitDeleteRows, boolean onRollbackDeleteRows) Create a descriptor for the temporary table within the given schema.
Parameters: tableName - The name of the temporary table to get the descriptor for Parameters: schema - The descriptor for the schema the table lives in. Parameters: tableType - The type of the table: temporary table Parameters: onCommitDeleteRows - If true, on commit delete rows else on commit preserve rows of temporary table. Parameters: onRollbackDeleteRows - If true, on rollback, delete rows from temp tables which were logically modified. | public TablePermsDescriptor | newTablePermsDescriptor(TableDescriptor td, String selectPerm, String deletePerm, String insertPerm, String updatePerm, String referencesPerm, String triggerPerm, String grantor) | public TriggerDescriptor | newTriggerDescriptor(SchemaDescriptor sd, UUID uuid, String name, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor td, UUID whenSPSId, UUID actionSPSId, Timestamp creationTimestamp, int[] referencedCols, String triggerDefinition, boolean referencingOld, boolean referencingNew, String oldReferencingName, String newReferencingName) Create a new trigger descriptor. | public ReferencedKeyConstraintDescriptor | newUniqueConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount) | public ViewDescriptor | newViewDescriptor(UUID viewID, String viewName, String viewText, int checkOption, UUID compSchemaId) Create a viewDescriptor for the view with the given UUID. |
DataDescriptorGenerator | public DataDescriptorGenerator(DataDictionary dataDictionary)(Code) | | Make a generator. Specify the data dictionary that it operates on.
Parameters: dataDictionary - the data dictionary that this generator makes objects for |
newColPermsDescriptor | public ColPermsDescriptor newColPermsDescriptor(TableDescriptor td, String type, FormatableBitSet columns, String grantor) throws StandardException(Code) | | Manufacture a new ColPermsDescriptor.
Parameters: td - The descriptor of the table. Parameters: type - The action type:- "s" - select without grant
- "S" - select with grant
- "u" - update without grant
- "U" - update with grant
- "r" - references without grant
- "R" - references with grant
Parameters: columns - the set of columns |
newConglomerateDescriptor | public ConglomerateDescriptor newConglomerateDescriptor(long conglomerateId, String name, boolean indexable, IndexRowGenerator indexRowGenerator, boolean isConstraint, UUID uuid, UUID tableID, UUID schemaID)(Code) | | Create a conglomerate descriptor for the given conglomerate id.
Parameters: conglomerateId - The identifier for the conglomeratewe're interested in Parameters: name - The name of the conglomerate, if any Parameters: indexable - TRUE means the conglomerate is indexable,FALSE means it isn't Parameters: indexRowGenerator - The IndexRowGenerator for the conglomerate,null if it's a heap Parameters: isConstraint - TRUE means the conglomerate is an index backing up a constraint, FALSE means it isn't Parameters: uuid - UUID for this conglomerate Parameters: tableID - UUID for the table that this conglomerate belongs to Parameters: schemaID - UUID for the schema that conglomerate belongs to A ConglomerateDescriptor describing the conglomerate. |
newForeignKeyConstraintDescriptor | public ForeignKeyConstraintDescriptor newForeignKeyConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, ReferencedKeyConstraintDescriptor referencedConstraintDescriptor, boolean isEnabled, int raDeleteRule, int raUpdateRule)(Code) | | See Also: DataDescriptorGenerator.newForeignKeyConstraintDescriptor |
newForeignKeyConstraintDescriptor | public ForeignKeyConstraintDescriptor newForeignKeyConstraintDescriptor(TableDescriptor table, String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, boolean isEnabled, int raDeleteRule, int raUpdateRule)(Code) | | See Also: DataDescriptorGenerator.newForeignKeyConstraintDescriptor |
newSchemaDescriptor | public SchemaDescriptor newSchemaDescriptor(String schemaName, String aid, UUID oid) throws StandardException(Code) | | Create a descriptor for the named schema with a null UUID.
Parameters: schemaName - The name of the schema we're interested in.If the name is NULL, get the descriptor for thecurrent schema. Parameters: aid - The authorization ID associated with the schema.The owner of the schema. Parameters: oid - The object ID The descriptor for the schema. exception: StandardException - Thrown on failure |
newTableDescriptor | public TableDescriptor newTableDescriptor(String tableName, SchemaDescriptor schema, int tableType, char lockGranularity)(Code) | | Create a descriptor for the named table within the given schema.
If the schema parameter is NULL, it creates a schema descriptor
using the current default schema.
Parameters: tableName - The name of the table to get the descriptor for Parameters: schema - The descriptor for the schema the table lives in.If null, use the current (default) schema. Parameters: tableType - The type of the table: base table or view. Parameters: lockGranularity - The lock granularity. The descriptor for the table. |
newTableDescriptor | public TableDescriptor newTableDescriptor(String tableName, SchemaDescriptor schema, int tableType, boolean onCommitDeleteRows, boolean onRollbackDeleteRows)(Code) | | Create a descriptor for the temporary table within the given schema.
Parameters: tableName - The name of the temporary table to get the descriptor for Parameters: schema - The descriptor for the schema the table lives in. Parameters: tableType - The type of the table: temporary table Parameters: onCommitDeleteRows - If true, on commit delete rows else on commit preserve rows of temporary table. Parameters: onRollbackDeleteRows - If true, on rollback, delete rows from temp tables which were logically modified. true is the only supported value The descriptor for the table. |
newTriggerDescriptor | public TriggerDescriptor newTriggerDescriptor(SchemaDescriptor sd, UUID uuid, String name, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor td, UUID whenSPSId, UUID actionSPSId, Timestamp creationTimestamp, int[] referencedCols, String triggerDefinition, boolean referencingOld, boolean referencingNew, String oldReferencingName, String newReferencingName) throws StandardException(Code) | | Create a new trigger descriptor.
Parameters: sd - the schema descriptor for this trigger Parameters: uuid - the trigger id Parameters: name - the trigger name Parameters: eventMask - TriggerDescriptor.TRIGGER_EVENT_XXXX Parameters: isBefore - is this a before (as opposed to after) trigger Parameters: isRow - is this a row trigger or statement trigger Parameters: isEnabled - is this trigger enabled or disabled Parameters: td - the table upon which this trigger is defined Parameters: whenSPSId - the sps id for the when clause (may be null) Parameters: actionSPSId - the spsid for the trigger action (may be null) Parameters: creationTimestamp - when was this trigger created? Parameters: referencedCols - what columns does this trigger reference (may be null) Parameters: triggerDefinition - The original user text of the trigger action Parameters: referencingOld - whether or not OLD appears in REFERENCING clause Parameters: referencingNew - whether or not NEW appears in REFERENCING clause Parameters: oldReferencingName - old referencing table name, if any, that appears in REFERCING clause Parameters: newReferencingName - new referencing table name, if any, that appears in REFERCING clause exception: StandardException - on error |
newViewDescriptor | public ViewDescriptor newViewDescriptor(UUID viewID, String viewName, String viewText, int checkOption, UUID compSchemaId)(Code) | | Create a viewDescriptor for the view with the given UUID.
Parameters: viewID - the UUID for the view. Parameters: viewName - the name of the view Parameters: viewText - the text of the view's query. Parameters: checkOption - int for check option type Parameters: compSchemaId - the UUID of the schema this was compiled in A descriptor for the view |
|
|