public class DataDescriptorGenerator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected DataDictionary |
dataDictionary |
private UUIDFactory |
uuidf |
Constructor and Description |
---|
DataDescriptorGenerator(DataDictionary dataDictionary)
Make a generator.
|
Modifier and Type | Method and Description |
---|---|
(package private) static ModuleFactory |
getMonitor()
Privileged Monitor lookup.
|
protected UUIDFactory |
getUUIDFactory() |
CheckConstraintDescriptor |
newCheckConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
UUID constraintId,
java.lang.String constraintText,
int[] refCols,
SchemaDescriptor schemaDesc,
boolean isEnabled) |
CheckConstraintDescriptor |
newCheckConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
UUID constraintId,
java.lang.String constraintText,
ReferencedColumns referencedColumns,
SchemaDescriptor schemaDesc,
boolean isEnabled) |
ColPermsDescriptor |
newColPermsDescriptor(TableDescriptor td,
java.lang.String type,
FormatableBitSet columns,
java.lang.String grantor)
Manufacture a new ColPermsDescriptor.
|
ConglomerateDescriptor |
newConglomerateDescriptor(long conglomerateId,
java.lang.String name,
boolean indexable,
IndexRowGenerator indexRowGenerator,
boolean isConstraint,
UUID uuid,
UUID tableID,
UUID schemaID)
Create a conglomerate descriptor for the given conglomerate id.
|
FileInfoDescriptor |
newFileInfoDescriptor(UUID id,
SchemaDescriptor sd,
java.lang.String sqlName,
long generationId)
Create a new
FileInfoDescriptor using the supplied arguments. |
ForeignKeyConstraintDescriptor |
newForeignKeyConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
int[] fkColumns,
UUID constraintId,
UUID indexId,
SchemaDescriptor schemaDesc,
ReferencedKeyConstraintDescriptor referencedConstraintDescriptor,
boolean isEnabled,
int raDeleteRule,
int raUpdateRule) |
ForeignKeyConstraintDescriptor |
newForeignKeyConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
int[] fkColumns,
UUID constraintId,
UUID indexId,
SchemaDescriptor schemaDesc,
UUID referencedConstraintId,
boolean isEnabled,
int raDeleteRule,
int raUpdateRule) |
PermDescriptor |
newPermDescriptor(UUID uuid,
java.lang.String objectType,
UUID permObjectId,
java.lang.String permission,
java.lang.String grantor,
java.lang.String grantee,
boolean grantable) |
ReferencedKeyConstraintDescriptor |
newPrimaryKeyConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
int[] referencedColumns,
UUID constraintId,
UUID indexId,
SchemaDescriptor schemaDesc,
boolean isEnabled,
int referenceCount) |
RoleGrantDescriptor |
newRoleGrantDescriptor(UUID uuid,
java.lang.String roleName,
java.lang.String grantee,
java.lang.String grantor,
boolean withadminoption,
boolean isDef)
Create a new role grant descriptor
|
RoutinePermsDescriptor |
newRoutinePermsDescriptor(AliasDescriptor ad,
java.lang.String grantor)
Create a new routine permissions descriptor
|
SchemaDescriptor |
newSchemaDescriptor(java.lang.String schemaName,
java.lang.String aid,
UUID oid)
Create a descriptor for the named schema with a null UUID.
|
SequenceDescriptor |
newSequenceDescriptor(SchemaDescriptor sd,
UUID uuid,
java.lang.String sequenceName,
DataTypeDescriptor dataType,
java.lang.Long currentValue,
long startValue,
long minimumValue,
long maximumValue,
long increment,
boolean cycle)
Create a new sequence descriptor
|
TableDescriptor |
newTableDescriptor(java.lang.String tableName,
SchemaDescriptor schema,
int tableType,
boolean onCommitDeleteRows,
boolean onRollbackDeleteRows)
Create a descriptor for the temporary table within the given schema.
|
TableDescriptor |
newTableDescriptor(java.lang.String tableName,
SchemaDescriptor schema,
int tableType,
char lockGranularity)
Create a descriptor for the named table within the given schema.
|
TablePermsDescriptor |
newTablePermsDescriptor(TableDescriptor td,
java.lang.String selectPerm,
java.lang.String deletePerm,
java.lang.String insertPerm,
java.lang.String updatePerm,
java.lang.String referencesPerm,
java.lang.String triggerPerm,
java.lang.String grantor) |
TriggerDescriptor |
newTriggerDescriptor(SchemaDescriptor sd,
UUID uuid,
java.lang.String name,
int eventMask,
boolean isBefore,
boolean isRow,
boolean isEnabled,
TableDescriptor td,
UUID whenSPSId,
UUID actionSPSId,
java.sql.Timestamp creationTimestamp,
int[] referencedCols,
int[] referencedColsInTriggerAction,
java.lang.String triggerDefinition,
boolean referencingOld,
boolean referencingNew,
java.lang.String oldReferencingName,
java.lang.String newReferencingName,
java.lang.String whenClauseText)
Create a new trigger descriptor.
|
ReferencedKeyConstraintDescriptor |
newUniqueConstraintDescriptor(TableDescriptor table,
java.lang.String constraintName,
boolean deferrable,
boolean initiallyDeferred,
int[] referencedColumns,
UUID constraintId,
UUID indexId,
SchemaDescriptor schemaDesc,
boolean isEnabled,
int referenceCount) |
UserDescriptor |
newUserDescriptor(java.lang.String userName,
java.lang.String hashingScheme,
char[] password,
java.sql.Timestamp lastModified) |
ViewDescriptor |
newViewDescriptor(UUID viewID,
java.lang.String viewName,
java.lang.String viewText,
int checkOption,
UUID compSchemaId)
Create a viewDescriptor for the view with the given UUID.
|
private UUIDFactory uuidf
protected final DataDictionary dataDictionary
public DataDescriptorGenerator(DataDictionary dataDictionary)
dataDictionary
- the data dictionary that this generator makes objects forpublic SchemaDescriptor newSchemaDescriptor(java.lang.String schemaName, java.lang.String aid, UUID oid) throws StandardException
schemaName
- The name of the schema we're interested in.
If the name is NULL, get the descriptor for the
current schema.aid
- The authorization ID associated with the schema.
The owner of the schema.oid
- The object IDStandardException
- Thrown on failurepublic TableDescriptor newTableDescriptor(java.lang.String tableName, SchemaDescriptor schema, int tableType, char lockGranularity)
tableName
- The name of the table to get the descriptor forschema
- The descriptor for the schema the table lives in.
If null, use the current (default) schema.tableType
- The type of the table: base table or view.lockGranularity
- The lock granularity.public TableDescriptor newTableDescriptor(java.lang.String tableName, SchemaDescriptor schema, int tableType, boolean onCommitDeleteRows, boolean onRollbackDeleteRows)
tableName
- The name of the temporary table to get the descriptor forschema
- The descriptor for the schema the table lives in.tableType
- The type of the table: temporary tableonCommitDeleteRows
- If true, on commit delete rows else on commit preserve rows of temporary table.onRollbackDeleteRows
- If true, on rollback, delete rows from temp tables which were logically modified. true is the only supported valuepublic ViewDescriptor newViewDescriptor(UUID viewID, java.lang.String viewName, java.lang.String viewText, int checkOption, UUID compSchemaId)
viewID
- the UUID for the view.viewName
- the name of the viewviewText
- the text of the view's query.checkOption
- int for check option typecompSchemaId
- the UUID of the schema this was compiled inpublic ReferencedKeyConstraintDescriptor newUniqueConstraintDescriptor(TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount)
public ReferencedKeyConstraintDescriptor newPrimaryKeyConstraintDescriptor(TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] referencedColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, boolean isEnabled, int referenceCount)
public ForeignKeyConstraintDescriptor newForeignKeyConstraintDescriptor(TableDescriptor table, java.lang.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, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, int[] fkColumns, UUID constraintId, UUID indexId, SchemaDescriptor schemaDesc, UUID referencedConstraintId, boolean isEnabled, int raDeleteRule, int raUpdateRule)
public CheckConstraintDescriptor newCheckConstraintDescriptor(TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, UUID constraintId, java.lang.String constraintText, ReferencedColumns referencedColumns, SchemaDescriptor schemaDesc, boolean isEnabled)
public CheckConstraintDescriptor newCheckConstraintDescriptor(TableDescriptor table, java.lang.String constraintName, boolean deferrable, boolean initiallyDeferred, UUID constraintId, java.lang.String constraintText, int[] refCols, SchemaDescriptor schemaDesc, boolean isEnabled)
public ConglomerateDescriptor newConglomerateDescriptor(long conglomerateId, java.lang.String name, boolean indexable, IndexRowGenerator indexRowGenerator, boolean isConstraint, UUID uuid, UUID tableID, UUID schemaID)
conglomerateId
- The identifier for the conglomerate
we're interested inname
- The name of the conglomerate, if anyindexable
- TRUE means the conglomerate is indexable,
FALSE means it isn'tindexRowGenerator
- The IndexRowGenerator for the conglomerate,
null if it's a heapisConstraint
- TRUE means the conglomerate is an index backing
up a constraint, FALSE means it isn'tuuid
- UUID for this conglomeratetableID
- UUID for the table that this conglomerate belongs toschemaID
- UUID for the schema that conglomerate belongs topublic TriggerDescriptor newTriggerDescriptor(SchemaDescriptor sd, UUID uuid, java.lang.String name, int eventMask, boolean isBefore, boolean isRow, boolean isEnabled, TableDescriptor td, UUID whenSPSId, UUID actionSPSId, java.sql.Timestamp creationTimestamp, int[] referencedCols, int[] referencedColsInTriggerAction, java.lang.String triggerDefinition, boolean referencingOld, boolean referencingNew, java.lang.String oldReferencingName, java.lang.String newReferencingName, java.lang.String whenClauseText) throws StandardException
sd
- the schema descriptor for this triggeruuid
- the trigger idname
- the trigger nameeventMask
- TriggerDescriptor.TRIGGER_EVENT_XXXXisBefore
- is this a before (as opposed to after) triggerisRow
- is this a row trigger or statement triggerisEnabled
- is this trigger enabled or disabledtd
- the table upon which this trigger is definedwhenSPSId
- the sps id for the when clause (may be null)actionSPSId
- the spsid for the trigger action (may be null)creationTimestamp
- when was this trigger created?referencedCols
- what columns does this trigger reference (may be null)referencedColsInTriggerAction
- what columns does the trigger
action reference through old/new transition variables
(may be null)triggerDefinition
- The original user text of the trigger actionreferencingOld
- whether or not OLD appears in REFERENCING clausereferencingNew
- whether or not NEW appears in REFERENCING clauseoldReferencingName
- old referencing table name, if any, that appears in REFERCING clausenewReferencingName
- new referencing table name, if any, that appears in REFERCING clausewhenClauseText
- the SQL text of the WHEN clause (may be null)StandardException
- on errorprotected UUIDFactory getUUIDFactory()
public FileInfoDescriptor newFileInfoDescriptor(UUID id, SchemaDescriptor sd, java.lang.String sqlName, long generationId)
FileInfoDescriptor
using the supplied arguments.
id unique id to be used for the new file descriptor
sd schema of the new file to be stored in the database
SQLName the SQL name of the new schema object representing the file
generationID version numberof the file the descriptor describespublic UserDescriptor newUserDescriptor(java.lang.String userName, java.lang.String hashingScheme, char[] password, java.sql.Timestamp lastModified)
public TablePermsDescriptor newTablePermsDescriptor(TableDescriptor td, java.lang.String selectPerm, java.lang.String deletePerm, java.lang.String insertPerm, java.lang.String updatePerm, java.lang.String referencesPerm, java.lang.String triggerPerm, java.lang.String grantor) throws StandardException
StandardException
public ColPermsDescriptor newColPermsDescriptor(TableDescriptor td, java.lang.String type, FormatableBitSet columns, java.lang.String grantor) throws StandardException
td
- The descriptor of the table.type
- The action type:
columns
- the set of columnsStandardException
public RoutinePermsDescriptor newRoutinePermsDescriptor(AliasDescriptor ad, java.lang.String grantor) throws StandardException
ad
- The routine's alias descriptorgrantor
- StandardException
public RoleGrantDescriptor newRoleGrantDescriptor(UUID uuid, java.lang.String roleName, java.lang.String grantee, java.lang.String grantor, boolean withadminoption, boolean isDef) throws StandardException
uuid
- unique identifier for this role grant descriptor in
time and spaceroleName
- the name of the role for which a new descriptor
is createdgrantee
- authorization identifier of granteegrantor
- authorization identifier of grantorwithadminoption
- if true, WITH ADMIN OPTION is set for
this descriptorisDef
- if true, this descriptor represents a role
definition, otherwise it represents a grant.StandardException
public SequenceDescriptor newSequenceDescriptor(SchemaDescriptor sd, UUID uuid, java.lang.String sequenceName, DataTypeDescriptor dataType, java.lang.Long currentValue, long startValue, long minimumValue, long maximumValue, long increment, boolean cycle)
uuid
- sequenceName
- public PermDescriptor newPermDescriptor(UUID uuid, java.lang.String objectType, UUID permObjectId, java.lang.String permission, java.lang.String grantor, java.lang.String grantee, boolean grantable)
static ModuleFactory getMonitor()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.