Java Doc for DataDictionaryImpl.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » catalog » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.sql.catalog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.sql.catalog.DataDictionaryImpl

DataDictionaryImpl
final public class DataDictionaryImpl implements DataDictionary,CacheableFactory,ModuleControl,ModuleSupportable,java.security.PrivilegedAction(Code)
This abstract class contains the common code for the "regular" and limited data dictionaries. The limited configuration puts an upper limit on the number of tables a user is allowed to create. This class provides the entire implementation of DataDictionary, and ModuleControl, except for the stop() method, which is to be provided by a non-abstract super-class. The reason for putting the stop() method in the super-class is to prevent someone from inadvertently changing this to a non-abstract class. This class is shipped with both the limited and non-limited configurations, and we don't want anyone to be able to cheat by booting this class instead of booting the super-class.


Field Summary
 CacheManagerOIDTdCache
    
protected  AccessFactoryaf
    
protected  booleanbooting
    
 booleanbuiltinSchemasAreFromLCC
    
 ShExLockablecacheCoordinator
    
volatile  intcacheMode
    
protected  booleanconvertIdToLower
    
public  DataDescriptorGeneratordataDescriptorGenerator
    
volatile  intddlUsers
    
protected  SchemaDescriptordeclaredGlobalTemporaryTablesSchemaDesc
    
protected  DependencyManagerdmgr
    
protected  DataValueFactorydvf
    
 intengineType
    
public  LockFactorylockFactory
    
 CacheManagernameTdCache
    
 CacheManagerpermissionsCache
    
 intpermissionsCacheSize
    
public  booleanreadOnlyUpgrade
     True if the database is read only and requires some form of upgrade, that makes the stored prepared statements invalid. With this case the engine is running at a different version to the underlying stored database.
volatile  intreadersInDDLMode
    
 PropertiesstartupParameters
    
 intstmtCacheSize
    
protected  SchemaDescriptorsysIBMSchemaDesc
    
protected  SchemaDescriptorsystemDiagSchemaDesc
    
protected  SchemaDescriptorsystemSchemaDesc
    
protected  SchemaDescriptorsystemUtilSchemaDesc
    
 inttdCacheSize
    
protected  UUIDFactoryuuidFactory
    

Constructor Summary
public  DataDictionaryImpl()
    

Method Summary
public  booleanactiveConstraint(ConstraintDescriptor constraint)
     Reports whether an individual constraint must be enforced.
public  voidaddConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc)
     Adds the given ConstraintDescriptor to the data dictionary, associated with the given table and constraint type.
public  voidaddDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc)
    
public  voidaddDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc, boolean wait)
    
public  voidaddDescriptorArray(TupleDescriptor[] td, TupleDescriptor parent, int catalogNumber, boolean allowDuplicates, TransactionController tc)
     array version of addDescriptor.
public  booleanaddRemovePermissionsDescriptor(boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc)
     Add or remove a permission to/from the permission database.
public  voidaddSPSDescriptor(SPSDescriptor descriptor, TransactionController tc, boolean wait)
     Adds the given SPSDescriptor to the data dictionary, associated with the given table and constraint type.
 voidaddSYSCOLUMNSIndex2Property(TransactionController tc, long index2ConglomerateNumber)
    
public  voidaddTableDescriptorToOtherCache(TableDescriptor td, Cacheable c)
     Add a table descriptor to the "other" cache.
public  voidboot(boolean create, Properties startParams)
     Start-up method for this instance of the data dictionary.
public  booleancanSupport(Properties startParams)
     Currently, all this routine does is check to see if the Replication property has been turned on for this database.
public  booleancheckVersion(int requiredMajorVersion, String feature)
     Check to see if a database has been upgraded to the required level in order to use a language feature.
public  voidclearCaches()
     Clear all of the DataDictionary caches.
 voidclearSPSPlans()
     Mark all SPS plans in the data dictionary invalid.
public  RowLocation[]computeAutoincRowLocations(TransactionController tc, TableDescriptor td)
    
protected  voidcreateDictionaryTables(Properties params, TransactionController tc, DataDescriptorGenerator ddg)
     Create all the required dictionary tables.
 voidcreateRoutinePermPublicDescriptor(UUID routineUUID, TransactionController tc)
     Create RoutinePermDescriptor to grant access to PUBLIC for this system routine.
 voidcreateRoutinePermPublicDescriptor(UUID routineUUID, TransactionController tc, String authorizationID)
     Create RoutinePermDescriptor to grant access to PUBLIC for this system routine using the grantor specified in authorizationID.
protected  voidcreateSPSSet(TransactionController tc, boolean net, UUID schemaID)
     Create a set of stored prepared statements from a properties file.
 voidcreateSystemSps(TransactionController tc)
     Create system built-in metadata stored prepared statements.
 voidcreate_10_1_system_procedures(TransactionController tc, UUID sysUtilUUID)
     Create system procedures added in version 10.1.
 voidcreate_10_2_system_procedures(TransactionController tc, UUID sysUtilUUID)
     Create system procedures added in version 10.2.
final protected  voidcreate_SYSIBM_procedures(TransactionController tc)
     Create system procedures in SYSIBM

Used to add the system procedures to the database when it is created.

public  voiddoneReading(int mode, LanguageConnectionContext lcc)
    
public  voiddropAliasDescriptor(AliasDescriptor ad, TransactionController tc)
    
public  voiddropAllColumnDescriptors(UUID tableID, TransactionController tc)
     Drops all column descriptors from the given table.
public  voiddropAllConglomerateDescriptors(TableDescriptor td, TransactionController tc)
     Drops all conglomerates associated with a table.
public  voiddropAllConstraintDescriptors(TableDescriptor table, TransactionController tc)
    
public  voiddropAllRoutinePermDescriptors(UUID routineID, TransactionController tc)
     Drops all routine permission descriptors for the given routine.
public  voiddropAllTableAndColPermDescriptors(UUID tableID, TransactionController tc)
     Drops all table and column permission descriptors for the given table.
public  voiddropColumnDescriptor(UUID tableID, String columnName, TransactionController tc)
     Given a column name and a table ID, drops the column descriptor from the table.
public  voiddropConglomerateDescriptor(ConglomerateDescriptor conglomerate, TransactionController tc)
    
public  voiddropConstraintDescriptor(TableDescriptor table, ConstraintDescriptor descriptor, TransactionController tc)
     Drops the given ConstraintDescriptor that is associated with the given table and constraint type from the data dictionary.
public  voiddropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc)
     Remove all of the stored dependencies for a given dependent's ID from the data dictionary.
public  voiddropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc, boolean wait)
    
public  voiddropFileInfoDescriptor(FileInfoDescriptor fid)
    
public  voiddropSPSDescriptor(SPSDescriptor descriptor, TransactionController tc)
     Drops the given SPSDescriptor.
public  voiddropSPSDescriptor(UUID uuid, TransactionController tc)
     Drops the given SPSDescriptor.
public  voiddropSchemaDescriptor(String schemaName, TransactionController tc)
    
public  voiddropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc)
    
public  voiddropStoredDependency(DependencyDescriptor dd, TransactionController tc)
     Drop a single dependency from the data dictionary.
public  voiddropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc)
     Drop the table descriptor.
Parameters:
  td - The table descriptor to drop
Parameters:
  schema - A descriptor for the schema the tableis a part of.
public  voiddropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc)
     Drops the given TriggerDescriptor.
public  voiddropViewDescriptor(ViewDescriptor vd, TransactionController tc)
     Drops the view descriptor from the data dictionary.
public  voidfaultInTabInfo(TabInfoImpl ti)
     Finishes building a TabInfoImpl if it hasn't already been faulted in.
public  ConstraintDescriptorListgetActiveConstraintDescriptors(ConstraintDescriptorList cdl)
     Convert a constraint descriptor list into a list of active constraints, that is, constraints which must be enforced.
public  AliasDescriptorgetAliasDescriptor(UUID uuid)
     Get a AliasDescriptor given its UUID.
public  AliasDescriptorgetAliasDescriptor(String schemaId, String aliasName, char nameSpace)
     Get a AliasDescriptor by alias name and name space. NOTE: caller responsible for handling no match.
Parameters:
  schemaId - schema identifier
Parameters:
  aliasName - The alias name.
Parameters:
  nameSpace - The alias type.
public  ListgetAllDependencyDescriptorsList()
     Build and return an List with DependencyDescriptors for all of the stored dependencies.
public  ListgetAllSPSDescriptors()
     Get every statement in this database.
public  StringgetAuthorizationDatabaseOwner()
    
public  intgetCacheMode()
    
public  ColumnDescriptorgetColumnDescriptorByDefaultId(UUID uuid)
     Get a ColumnDescriptor given its Default ID.
public  ColPermsDescriptorgetColumnPermissions(UUID colPermsUUID)
    
public  ColPermsDescriptorgetColumnPermissions(UUID tableUUID, int privType, boolean forGrant, String authorizationId)
     Get one user's column privileges for a table.
Parameters:
  tableUUID -
Parameters:
  privType - (as int) Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV
Parameters:
  forGrant -
Parameters:
  authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table.
public  ColPermsDescriptorgetColumnPermissions(UUID tableUUID, String privTypeStr, boolean forGrant, String authorizationId)
     Get one user's column privileges for a table.
public  ConglomerateDescriptorgetConglomerateDescriptor(UUID uuid)
     Get a ConglomerateDescriptor given its UUID.
public  ConglomerateDescriptorgetConglomerateDescriptor(long conglomerateNumber)
     Get a ConglomerateDescriptor given its conglomerate number.
public  ConglomerateDescriptorgetConglomerateDescriptor(String indexName, SchemaDescriptor sd, boolean forUpdate)
     Gets a conglomerate descriptor for the named index in the given schema, getting an exclusive row lock on the matching row in sys.sysconglomerates (for DDL concurrency) if requested.
Parameters:
  indexName - The name of the index we're looking for
Parameters:
  sd - The schema descriptor
Parameters:
  forUpdate - Whether or not to get an exclusive row lock on the row in sys.sysconglomerates. A ConglomerateDescriptor describing the requestedconglomerate.
public  ConglomerateDescriptor[]getConglomerateDescriptors(UUID uuid)
     Get an array of ConglomerateDescriptors given the UUID.
public  ConglomerateDescriptor[]getConglomerateDescriptors(long conglomerateNumber)
     Get an array of conglomerate descriptors for the given conglomerate number.
public  ConstraintDescriptorgetConstraintDescriptor(UUID uuid)
     Get a ConstraintDescriptor given its UUID.
public  ConstraintDescriptorgetConstraintDescriptor(String constraintName, UUID schemaID)
     Get a ConstraintDescriptor given its name and schema ID.
public  ConstraintDescriptorgetConstraintDescriptor(TableDescriptor td, UUID uuid)
     Get the constraint descriptor given a table and the UUID String of the backing index.
Parameters:
  td - The table descriptor.
Parameters:
  uuid - the UUID for the backing index.
public  ConstraintDescriptorgetConstraintDescriptorById(TableDescriptor td, UUID uuid)
    
public  ConstraintDescriptorgetConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, String constraintName, boolean forUpdate)
     Get the constraint descriptor given a TableDescriptor and the constraint name.
protected  TupleDescriptorgetConstraintDescriptorViaHeap(ScanQualifier[][] scanQualifiers, TabInfoImpl ti, TupleDescriptor parentTupleDescriptor, List list)
     Return a (single or list of) catalog row descriptor(s) from SYSCONSTRAINTS through a heap scan
Parameters:
  scanQualifiers - qualifiers
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  parentTupleDescriptor - The parentDescriptor, if applicable.
Parameters:
  list - The list to build, if supplied.
protected  ConstraintDescriptorgetConstraintDescriptorViaIndex(int indexId, ExecIndexRow keyRow, TabInfoImpl ti, TableDescriptor td, ConstraintDescriptorList dList, boolean forUpdate)
     Return a (single or list of) ConstraintDescriptor(s) from SYSCONSTRAINTS where the access is from the index to the heap.
Parameters:
  indexId - The id of the index (0 to # of indexes on table) to use
Parameters:
  keyRow - The supplied ExecIndexRow for search
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  td - The TableDescriptor, if supplied.
Parameters:
  dList - The list to build, if supplied.
public  ConstraintDescriptorListgetConstraintDescriptors(TableDescriptor td)
     Load up the constraint descriptor list for this table descriptor and return it.
public  TableDescriptorgetConstraintTableDescriptor(UUID constraintId)
     Return a table descriptor corresponding to the TABLEID field in SYSCONSTRAINTS where CONSTRAINTID matches the constraintId passsed in.
public  ListgetConstraints(UUID uuid, int indexId, int columnNum)
     Return an List which of the relevant column matching the indexed criteria.
public  DataDescriptorGeneratorgetDataDescriptorGenerator()
     Get a DataDescriptorGenerator, through which we can create objects to be stored in the DataDictionary.
public  DataValueFactorygetDataValueFactory()
     Get a DataValueFactory, through which we can create data value objects.
public  SchemaDescriptorgetDeclaredGlobalTemporaryTablesSchemaDescriptor()
     Get the descriptor for the declared global temporary table schema which is always named "SESSION".
public  DependencyManagergetDependencyManager()
     returns the dependencymanager associated with this datadictionary.
public  ListgetDependentsDescriptorList(String dependentID)
     Gets a list of the dependency descriptors for the given dependent's id.
Parameters:
  dependentID - The ID of the dependent we're interested in List Returns a list of DependencyDescriptors.
protected  TupleDescriptorgetDescriptorViaHeap(ScanQualifier[][] scanQualifiers, TabInfoImpl ti, TupleDescriptor parentTupleDescriptor, List list)
     Return a (single or list of) catalog row descriptor(s) from a system table where the access a heap scan
Parameters:
  scanQualifiers - qualifiers
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  parentTupleDescriptor - The parentDescriptor, if applicable.
Parameters:
  list - The list to build, if supplied.
public  intgetEngineType()
    
public  ExecutionFactorygetExecutionFactory()
     Get ExecutionFactory associated with this database.
public  FileInfoDescriptorgetFileInfoDescriptor(UUID id)
    
public  FileInfoDescriptorgetFileInfoDescriptor(SchemaDescriptor sd, String name)
    
public  ConstraintDescriptorListgetForeignKeys(UUID constraintId)
     Return a list of foreign keys constraints referencing this constraint.
public static  ExecIndexRowgetIndexRowFromHeapRow(IndexRowGenerator irg, RowLocation rl, ExecRow heapRow)
     Get an index row based on a row from the heap.
protected  TabInfoImplgetNonCoreTIByNumber(int catalogNumber)
     returns the tabinfo for a non core system catalog.
public  ListgetProvidersDescriptorList(String providerID)
     Gets a list of the dependency descriptors for the given provider's id.
Parameters:
  providerID - The ID of the provider we're interested in List Returns a list of DependencyDescriptors.
public  java.util.ListgetRoutineList(String schemaID, String routineName, char nameSpace)
     Get the list of routines matching the schema and routine name.
public  RoutinePermsDescriptorgetRoutinePermissions(UUID routineUUID, String authorizationId)
     Get one user's permissions for a routine (function or procedure).
public  RoutinePermsDescriptorgetRoutinePermissions(UUID routinePermsUUID)
    
public  RowLocationgetRowLocationTemplate(LanguageConnectionContext lcc, TableDescriptor td)
    
public  SPSDescriptorgetSPSDescriptor(UUID uuid)
     Get a SPSDescriptor given its UUID.
public  SPSDescriptorgetSPSDescriptor(String stmtName, SchemaDescriptor sd)
     Get a SPSDescriptor given its name. Currently no cacheing.
public  DataTypeDescriptor[]getSPSParams(SPSDescriptor spsd, Vector defaults)
     Get all the parameter descriptors for an SPS. Look up the params in SYSCOLUMNS and turn them into parameter descriptors.
public  longgetSYSCOLUMNSHeapConglomerateNumber()
     Get the heap conglomerate number for SYS.SYSCOLUMNS.
public  SchemaDescriptorgetSchemaDescriptor(String schemaName, TransactionController tc, boolean raiseError)
     Get the descriptor for the named schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this.
public  SchemaDescriptorgetSchemaDescriptor(UUID schemaId, TransactionController tc)
     Get the descriptor for the named schema.
public  NumberDataValuegetSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait)
    
public  ListgetStatisticsDescriptors(TableDescriptor td)
     get all the statistiscs descriptors for a given table.
public  SubKeyConstraintDescriptorgetSubKeyConstraint(UUID constraintId, int type)
     Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for the specified constraint id.
public  SchemaDescriptorgetSysIBMSchemaDescriptor()
     Get the descriptor for the SYSIBM schema.
public  SchemaDescriptorgetSystemDiagSchemaDescriptor()
     Get the descriptor for the SYSCS_DIAG system schema.
public  StringgetSystemSQLName()
     Returns a unique system generated name of the form SQLyymmddhhmmssxxn yy - year, mm - month, dd - day of month, hh - hour, mm - minute, ss - second, xx - the first 2 digits of millisec because we don't have enough space to keep the exact millisec value, n - number between 0-9 The number at the end is to handle more than one system generated name request came at the same time. In that case, the timestamp will remain the same, we will just increment n at the end of the name. Following is how we get around the problem of more than 10 system generated name requestes at the same time: When the database boots up, we start a counter with value -1 for the last digit in the generated name. We also keep the time in millisec to keep track of when the last system name was generated.
public  SchemaDescriptorgetSystemSchemaDescriptor()
     Get the descriptor for the system schema.
public  SchemaDescriptorgetSystemUtilSchemaDescriptor()
     Get the descriptor for the SYSCS_UTIL system schema.
public  TableDescriptorgetTableDescriptor(String tableName, SchemaDescriptor schema)
     Get the descriptor for the named table within the given schema. If the schema parameter is NULL, it looks for the table in the current (default) schema.
public  TableDescriptorgetTableDescriptor(UUID tableID)
     Get the descriptor for the table with the given UUID. NOTE: I'm assuming that the object store will define an UUID for persistent objects.
public  TablePermsDescriptorgetTablePermissions(UUID tableUUID, String authorizationId)
    
public  TablePermsDescriptorgetTablePermissions(UUID tablePermsUUID)
    
public  TransactionControllergetTransactionCompile()
     Get the TransactionController to use, when not passed in as a parameter.
public  TransactionControllergetTransactionExecute()
     Get the TransactionController to use, when not passed in as a parameter.
public  TriggerDescriptorgetTriggerDescriptor(UUID uuid)
     Get a TriggerDescriptor given its UUID.
public  TriggerDescriptorgetTriggerDescriptor(String name, SchemaDescriptor sd)
     Get the stored prepared statement descriptor given a sps name.
Parameters:
  name - The sps name.
Parameters:
  sd - The schema descriptor.
public  GenericDescriptorListgetTriggerDescriptors(TableDescriptor td)
     Load up the trigger descriptor list for this table descriptor and return it.
public  UUIDFactorygetUUIDFactory()
     Get the UUID Factory.
 ColPermsDescriptorgetUncachedColPermsDescriptor(ColPermsDescriptor key)
     Get a column permissions descriptor from the system tables, without going through the cache.
 RoutinePermsDescriptorgetUncachedRoutinePermsDescriptor(RoutinePermsDescriptor key)
     Get a routine permissions descriptor from the system tables, without going through the cache.
public  SPSDescriptorgetUncachedSPSDescriptor(TableKey stmtKey)
     This method can get called from the DataDictionary cache.
protected  SPSDescriptorgetUncachedSPSDescriptor(UUID stmtId)
     This method can get called from the DataDictionary cache.
 TableDescriptorgetUncachedTableDescriptor(TableKey tableKey)
     This method can get called from the DataDictionary cache.
protected  TableDescriptorgetUncachedTableDescriptor(UUID tableID)
     This method can get called from the DataDictionary cache.
 TablePermsDescriptorgetUncachedTablePermsDescriptor(TablePermsDescriptor key)
     Get a table permissions descriptor from the system tables, without going through the cache.
public  StringgetVTIClass(TableDescriptor td)
    
public  DataValueDescriptorgetValueAsDVD(UUID uuid)
     Converts a UUID to an DataValueDescriptor.
public  ViewDescriptorgetViewDescriptor(UUID uuid)
     Gets the viewDescriptor for the view with the given UUID.
public  ViewDescriptorgetViewDescriptor(TableDescriptor td)
     Gets the viewDescriptor for the view given the TableDescriptor.
public  voidgrantPublicAccessToSystemRoutines(TransactionController tc, String authorizationID)
     Grant PUBLIC access to specific system routines.
public  HashtablehashAllConglomerateDescriptorsByNumber(TransactionController tc)
     Get all of the ConglomerateDescriptors in the database and hash them by conglomerate number.
public  HashtablehashAllTableDescriptorsByTableId(TransactionController tc)
     Get all of the TableDescriptors in the database and hash them by TableId This is useful as a performance optimization for the locking VTIs.
public  voidinitSystemIndexVariables(DataDescriptorGenerator ddg, TabInfoImpl ti, int indexNumber)
    
protected  voidinitSystemIndexVariables(TabInfoImpl ti)
    
public  voidinitializeCatalogInfo()
     Initialize catalog information.
public  voidinvalidateAllSPSPlans()
    
public  booleanisSchemaEmpty(SchemaDescriptor sd)
     Indicate whether there is anything in the particular schema.
protected  booleanisSchemaReferenced(TransactionController tc, TabInfoImpl ti, int indexId, int indexCol, DataValueDescriptor schemaIdOrderable)
     Is the schema id referenced by the system table in question? Currently assumes that the schema id is in an index.
public  booleanisSystemSchemaName(String name)
     Determine whether a string is the name of the system schema.
public  voidloadCatalogs(DataDescriptorGenerator ddg, TabInfoImpl[] catalogArray)
    
protected  voidloadDictionaryTables(TransactionController tc, DataDescriptorGenerator ddg, Properties startParams)
     Initialize system catalogs.
public  voidmakeCatalog(TabInfoImpl ti, SchemaDescriptor sd, TransactionController tc)
     The dirty work of creating a catalog.
public  CacheablenewCacheable(CacheManager cm)
    
protected  voidpopulateSYSDUMMY1(TransactionController tc)
     Populate SYSDUMMY1 table with a single row.
public  DataDictionaryContextpushDataDictionaryContext(ContextManager contextManager)
    
final public  Objectrun()
    
public  voidsetAutoincrementValue(TransactionController tc, UUID tableUUID, String columnName, long aiValue, boolean incrementNeeded)
     sets a new value in SYSCOLUMNS for a particular autoincrement column.
protected  voidsetDependencyManager()
     sets the dependencymanager associated with this dd.
 voidspsCacheEntryAdded(SPSDescriptor spsd)
     Add an entry to the hashtables for lookup from the cache.
 voidspsCacheEntryRemoved(SPSDescriptor spsd)
    
public  intstartReading(LanguageConnectionContext lcc)
    
public  voidstartWriting(LanguageConnectionContext lcc)
    
public  voidstop()
     Stop this module.
public  voidtransactionFinished()
    
public  voidupdateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc)
     Update the conglomerateNumber for a ConglomerateDescriptor.
public  voidupdateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc)
     Update the conglomerateNumber for an array of ConglomerateDescriptors. In case of more than one ConglomerateDescriptor, each descriptor should be updated separately, conglomerate id is not same for all the descriptors.
public  voidupdateConstraintDescriptor(ConstraintDescriptor cd, UUID formerUUID, int[] colsToSet, TransactionController tc)
     Update the constraint descriptor in question.
public  voidupdateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, TransactionController tc)
     Update the lockGranularity for the specified table.
public  voidupdateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile, boolean updateParamDescriptors, boolean wait, boolean firstCompilation)
     Updates SYS.SYSSTATEMENTS with the info from the SPSD.
public  voidupdateSYSCOLPERMSforAddColumnToUserTable(UUID tableID, TransactionController tc)
     Need to update SYSCOLPERMS for a given table because a new column has been added to that table.
public  voidupdateSchemaAuth(String schemaName, String authorizationId, TransactionController tc)
    
public  voidupdateSystemSchemaAuthorization(String aid, TransactionController tc)
     Update all system schemas to have new authorizationId.
public  voidupdateTriggerDescriptor(TriggerDescriptor triggerd, UUID formerUUID, int[] colsToSet, TransactionController tc)
     Update the trigger descriptor in question.
protected  voidupgradeMakeCatalog(TransactionController tc, int catalogNumber)
     called by the upgrade code (dd_xena etc) to add a new system catalog.
public  voidupgrade_addColumns(CatalogRowFactory rowFactory, int[] newColumnIDs, TransactionController tc)
     Upgrade an existing catalog by adding columns.
public  voidupgrade_addInvisibleColumns(CatalogRowFactory rowFactory, int[] newColumnIDs, TransactionController tc)
    
 voidupgrade_initSystemTableCols(TransactionController tc, boolean isCoreTable, int tableNum, FormatableBitSet columnsToUpdateSet, DataValueDescriptor[] replaceRow)
     Initialize noncore columns to fixed values
Parameters:
  tc - The TransactionController for the transaction to do theupgrade in.
Parameters:
  isCoreTable - true if it is a core table
Parameters:
  tableNum - the noncore table number
Parameters:
  columnsToUpdateSet - a bit set of columns to update.
public  longupgrade_makeOneIndex(TransactionController tc, TabInfoImpl ti, int indexNumber, long heapConglomerateNumber)
     Code to add an index to a catalog during upgrade.
public  voidupgrade_setNullability(CatalogRowFactory rowFactory, int columnNumber, boolean nullability, TransactionController tc)
    
public  booleanusesSqlAuthorization()
    

Field Detail
OIDTdCache
CacheManager OIDTdCache(Code)



af
protected AccessFactory af(Code)



booting
protected boolean booting(Code)



builtinSchemasAreFromLCC
boolean builtinSchemasAreFromLCC(Code)



cacheCoordinator
ShExLockable cacheCoordinator(Code)



cacheMode
volatile int cacheMode(Code)



convertIdToLower
protected boolean convertIdToLower(Code)



dataDescriptorGenerator
public DataDescriptorGenerator dataDescriptorGenerator(Code)



ddlUsers
volatile int ddlUsers(Code)



declaredGlobalTemporaryTablesSchemaDesc
protected SchemaDescriptor declaredGlobalTemporaryTablesSchemaDesc(Code)



dmgr
protected DependencyManager dmgr(Code)



dvf
protected DataValueFactory dvf(Code)



engineType
int engineType(Code)



lockFactory
public LockFactory lockFactory(Code)



nameTdCache
CacheManager nameTdCache(Code)



permissionsCache
CacheManager permissionsCache(Code)



permissionsCacheSize
int permissionsCacheSize(Code)



readOnlyUpgrade
public boolean readOnlyUpgrade(Code)
True if the database is read only and requires some form of upgrade, that makes the stored prepared statements invalid. With this case the engine is running at a different version to the underlying stored database. This can happen in 5.1 if the database is read only and a different point release (later than 5.1.25?) to the one that created it, has been booted. (Beetle 5170).

In 5.2 and newer this will be the case if the engine booting the database is newer than the engine that created it.




readersInDDLMode
volatile int readersInDDLMode(Code)



startupParameters
Properties startupParameters(Code)



stmtCacheSize
int stmtCacheSize(Code)



sysIBMSchemaDesc
protected SchemaDescriptor sysIBMSchemaDesc(Code)



systemDiagSchemaDesc
protected SchemaDescriptor systemDiagSchemaDesc(Code)



systemSchemaDesc
protected SchemaDescriptor systemSchemaDesc(Code)



systemUtilSchemaDesc
protected SchemaDescriptor systemUtilSchemaDesc(Code)



tdCacheSize
int tdCacheSize(Code)



uuidFactory
protected UUIDFactory uuidFactory(Code)




Constructor Detail
DataDictionaryImpl
public DataDictionaryImpl()(Code)




Method Detail
activeConstraint
public boolean activeConstraint(ConstraintDescriptor constraint) throws StandardException(Code)
Reports whether an individual constraint must be enforced. For the Core product, this routine always returns true. However, during REFRESH we may have deferred some constraints until statement end. This method returns false if the constraint deferred
Parameters:
  constraint - the constraint to check The corresponding Active ConstraintDescriptorList
exception:
  StandardException - Thrown on failure



addConstraintDescriptor
public void addConstraintDescriptor(ConstraintDescriptor descriptor, TransactionController tc) throws StandardException(Code)
Adds the given ConstraintDescriptor to the data dictionary, associated with the given table and constraint type.
Parameters:
  descriptor - The descriptor to add
Parameters:
  tc - The transaction controller
exception:
  StandardException - Thrown on error



addDescriptor
public void addDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc) throws StandardException(Code)

See Also:   DataDictionary.addDescriptor



addDescriptor
public void addDescriptor(TupleDescriptor td, TupleDescriptor parent, int catalogNumber, boolean duplicatesAllowed, TransactionController tc, boolean wait) throws StandardException(Code)



addDescriptorArray
public void addDescriptorArray(TupleDescriptor[] td, TupleDescriptor parent, int catalogNumber, boolean allowDuplicates, TransactionController tc) throws StandardException(Code)
array version of addDescriptor.
See Also:   DataDictionary.addDescriptor



addRemovePermissionsDescriptor
public boolean addRemovePermissionsDescriptor(boolean add, PermissionsDescriptor perm, String grantee, TransactionController tc) throws StandardException(Code)
Add or remove a permission to/from the permission database.
Parameters:
  add - if true then the permission is added, if false the permission is removed
Parameters:
  perm -
Parameters:
  grantee -
Parameters:
  tc - True means revoke has removed a privilege from systemtable and hence the caller of this method should send invalidation actions to PermssionDescriptor's dependents.



addSPSDescriptor
public void addSPSDescriptor(SPSDescriptor descriptor, TransactionController tc, boolean wait) throws StandardException(Code)
Adds the given SPSDescriptor to the data dictionary, associated with the given table and constraint type.
Parameters:
  descriptor - The descriptor to add
Parameters:
  tc - The transaction controller
exception:
  StandardException - Thrown on error



addSYSCOLUMNSIndex2Property
void addSYSCOLUMNSIndex2Property(TransactionController tc, long index2ConglomerateNumber)(Code)



addTableDescriptorToOtherCache
public void addTableDescriptorToOtherCache(TableDescriptor td, Cacheable c) throws StandardException(Code)
Add a table descriptor to the "other" cache. The other cache is determined by the type of the object c.
Parameters:
  td - TableDescriptor to add to the other cache.
Parameters:
  c - Cacheable Object which lets us figure out the other cache.
exception:
  StandardException -



boot
public void boot(boolean create, Properties startParams) throws StandardException(Code)
Start-up method for this instance of the data dictionary.
Parameters:
  startParams - The start-up parameters
exception:
  StandardException - Thrown if the module fails to start



canSupport
public boolean canSupport(Properties startParams)(Code)
Currently, all this routine does is check to see if the Replication property has been turned on for this database. If so, then this is not the NodeFactory that's wanted--so we return false. The NodeFactory that is wanted is our child class "RepNodeFactory". true if this database does not want Replicationfalse otherwise



checkVersion
public boolean checkVersion(int requiredMajorVersion, String feature) throws StandardException(Code)
Check to see if a database has been upgraded to the required level in order to use a language feature.
Parameters:
  requiredMajorVersion - Data Dictionary major version
Parameters:
  feature - Non-null to throw an error, null to return the state of the version match. True if the database has been upgraded to the required level, false otherwise.



clearCaches
public void clearCaches() throws StandardException(Code)
Clear all of the DataDictionary caches.
exception:
  StandardException - Standard Cloudscape error policy



clearSPSPlans
void clearSPSPlans() throws StandardException(Code)
Mark all SPS plans in the data dictionary invalid. This does not invalidate cached plans. This function is for use by the boot-up code.
exception:
  StandardException - Thrown on error



computeAutoincRowLocations
public RowLocation[] computeAutoincRowLocations(TransactionController tc, TableDescriptor td) throws StandardException(Code)

See Also:   DataDictionary.computeAutoincRowLocations



createDictionaryTables
protected void createDictionaryTables(Properties params, TransactionController tc, DataDescriptorGenerator ddg) throws StandardException(Code)
Create all the required dictionary tables. Any classes that extend this class and need to create new tables shoudl override this method, and then call this method as the first action in the new method, e.g.
 protected Configuration createDictionaryTables(Configuration cfg, TransactionController tc,
 DataDescriptorGenerator ddg)
 throws StandardException
 {
 super.createDictionaryTables(params, tc, ddg);
 ...
 }
 

exception:
  StandardException - Standard Cloudscape error policy



createRoutinePermPublicDescriptor
void createRoutinePermPublicDescriptor(UUID routineUUID, TransactionController tc) throws StandardException(Code)
Create RoutinePermDescriptor to grant access to PUBLIC for this system routine. Currently only SYSUTIL routines need access granted to execute them when a database is created/upgraded.
Parameters:
  routineUUID - uuid of the routine
Parameters:
  tc - TransactionController to use
exception:
  StandardException - Standard exception policy.



createRoutinePermPublicDescriptor
void createRoutinePermPublicDescriptor(UUID routineUUID, TransactionController tc, String authorizationID) throws StandardException(Code)
Create RoutinePermDescriptor to grant access to PUBLIC for this system routine using the grantor specified in authorizationID.
Parameters:
  routineUUID - uuid of the routine
Parameters:
  tc - TransactionController to use
Parameters:
  authorizationID - authorization ID of the permission grantor
throws:
  StandardException - Standard exception policy.



createSPSSet
protected void createSPSSet(TransactionController tc, boolean net, UUID schemaID) throws StandardException(Code)
Create a set of stored prepared statements from a properties file. Key is the statement name, value is the SQL statement.



createSystemSps
void createSystemSps(TransactionController tc) throws StandardException(Code)
Create system built-in metadata stored prepared statements.



create_10_1_system_procedures
void create_10_1_system_procedures(TransactionController tc, UUID sysUtilUUID) throws StandardException(Code)
Create system procedures added in version 10.1.

Create 10.1 system procedures, called by either code creating new database, or code doing hard upgrade from previous version.


Parameters:
  sysUtilUUID - uuid of the SYSUTIL schema.
exception:
  StandardException - Standard exception policy.




create_10_2_system_procedures
void create_10_2_system_procedures(TransactionController tc, UUID sysUtilUUID) throws StandardException(Code)
Create system procedures added in version 10.2.

Create 10.2 system procedures, called by either code creating new database, or code doing hard upgrade from previous version.


Parameters:
  sysUtilUUID - uuid of the SYSUTIL schema.
exception:
  StandardException - Standard exception policy.




create_SYSIBM_procedures
final protected void create_SYSIBM_procedures(TransactionController tc) throws StandardException(Code)
Create system procedures in SYSIBM

Used to add the system procedures to the database when it is created. Full upgrade from version 5.1 or earlier also calls this method.


Parameters:
  tc - transaction controller to use. Counts on caller tocommit.
exception:
  StandardException - Standard exception policy.




doneReading
public void doneReading(int mode, LanguageConnectionContext lcc) throws StandardException(Code)



dropAliasDescriptor
public void dropAliasDescriptor(AliasDescriptor ad, TransactionController tc) throws StandardException(Code)
Drop a AliasDescriptor from the DataDictionary
Parameters:
  ad - The AliasDescriptor to drop
Parameters:
  tc - The TransactionController
exception:
  StandardException - Thrown on failure



dropAllColumnDescriptors
public void dropAllColumnDescriptors(UUID tableID, TransactionController tc) throws StandardException(Code)
Drops all column descriptors from the given table. Useful for DROP TABLE.
Parameters:
  tableID - The UUID of the table from which to dropall the column descriptors
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropAllConglomerateDescriptors
public void dropAllConglomerateDescriptors(TableDescriptor td, TransactionController tc) throws StandardException(Code)
Drops all conglomerates associated with a table.
Parameters:
  td - The TableDescriptor of the table
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on failure



dropAllConstraintDescriptors
public void dropAllConstraintDescriptors(TableDescriptor table, TransactionController tc) throws StandardException(Code)
Drops all ConstraintDescriptors from the data dictionary that are associated with the given table,
Parameters:
  table - The table from which to drop allconstraint descriptors
Parameters:
  tc - The TransactionController
exception:
  StandardException - Thrown on error



dropAllRoutinePermDescriptors
public void dropAllRoutinePermDescriptors(UUID routineID, TransactionController tc) throws StandardException(Code)
Drops all routine permission descriptors for the given routine.
Parameters:
  routineID - The UUID of the routine from which to dropall the permission descriptors
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropAllTableAndColPermDescriptors
public void dropAllTableAndColPermDescriptors(UUID tableID, TransactionController tc) throws StandardException(Code)
Drops all table and column permission descriptors for the given table.
Parameters:
  tableID - The UUID of the table from which to dropall the permission descriptors
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropColumnDescriptor
public void dropColumnDescriptor(UUID tableID, String columnName, TransactionController tc) throws StandardException(Code)
Given a column name and a table ID, drops the column descriptor from the table.
Parameters:
  tableID - The UUID of the table to drop the column from
Parameters:
  columnName - The name of the column to drop
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropConglomerateDescriptor
public void dropConglomerateDescriptor(ConglomerateDescriptor conglomerate, TransactionController tc) throws StandardException(Code)
Drops a conglomerate descriptor
Parameters:
  conglomerate - The ConglomerateDescriptor for the conglomerate
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on failure



dropConstraintDescriptor
public void dropConstraintDescriptor(TableDescriptor table, ConstraintDescriptor descriptor, TransactionController tc) throws StandardException(Code)
Drops the given ConstraintDescriptor that is associated with the given table and constraint type from the data dictionary.
Parameters:
  table - The table from which to drop theconstraint descriptor
Parameters:
  descriptor - The descriptor to drop
Parameters:
  tc - The TransactionController
exception:
  StandardException - Thrown on error



dropDependentsStoredDependencies
public void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc) throws StandardException(Code)
Remove all of the stored dependencies for a given dependent's ID from the data dictionary.
Parameters:
  dependentsUUID - Dependent's uuid
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on failure



dropDependentsStoredDependencies
public void dropDependentsStoredDependencies(UUID dependentsUUID, TransactionController tc, boolean wait) throws StandardException(Code)



dropFileInfoDescriptor
public void dropFileInfoDescriptor(FileInfoDescriptor fid) throws StandardException(Code)

See Also:   DataDictionary.dropFileInfoDescriptor
exception:
  StandardException - Thrown on error



dropSPSDescriptor
public void dropSPSDescriptor(SPSDescriptor descriptor, TransactionController tc) throws StandardException(Code)
Drops the given SPSDescriptor.
Parameters:
  descriptor - The descriptor to drop
Parameters:
  tc - The TransactionController.
exception:
  StandardException - Thrown on failure



dropSPSDescriptor
public void dropSPSDescriptor(UUID uuid, TransactionController tc) throws StandardException(Code)
Drops the given SPSDescriptor.
Parameters:
  uuid - the statement uuid
Parameters:
  tc - The TransactionController.
exception:
  StandardException - Thrown on failure



dropSchemaDescriptor
public void dropSchemaDescriptor(String schemaName, TransactionController tc) throws StandardException(Code)
Drop the descriptor for a schema, given the schema's name
Parameters:
  schemaName - The name of the schema to drop
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropStatisticsDescriptors
public void dropStatisticsDescriptors(UUID tableUUID, UUID referenceUUID, TransactionController tc) throws StandardException(Code)

See Also:   DataDictionary.dropStatisticsDescriptors
See Also:   



dropStoredDependency
public void dropStoredDependency(DependencyDescriptor dd, TransactionController tc) throws StandardException(Code)
Drop a single dependency from the data dictionary.
Parameters:
  dd - The DependencyDescriptor.
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on failure



dropTableDescriptor
public void dropTableDescriptor(TableDescriptor td, SchemaDescriptor schema, TransactionController tc) throws StandardException(Code)
Drop the table descriptor.
Parameters:
  td - The table descriptor to drop
Parameters:
  schema - A descriptor for the schema the tableis a part of. If this parameter isNULL, then the table is part of thecurrent (default) schema
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



dropTriggerDescriptor
public void dropTriggerDescriptor(TriggerDescriptor descriptor, TransactionController tc) throws StandardException(Code)
Drops the given TriggerDescriptor. WARNING: does not drop its SPSes!!!
Parameters:
  descriptor - The descriptor to drop
Parameters:
  tc - The TransactionController.
exception:
  StandardException - Thrown on failure



dropViewDescriptor
public void dropViewDescriptor(ViewDescriptor vd, TransactionController tc) throws StandardException(Code)
Drops the view descriptor from the data dictionary.
Parameters:
  vd - A descriptor for the view to be dropped
Parameters:
  tc - TransactionController to use
exception:
  StandardException - Thrown on error



faultInTabInfo
public void faultInTabInfo(TabInfoImpl ti) throws StandardException(Code)
Finishes building a TabInfoImpl if it hasn't already been faulted in. NOP if TabInfoImpl has already been faulted in.
Parameters:
  ti - TabInfoImpl to fault in.
exception:
  StandardException - Thrown on error



getActiveConstraintDescriptors
public ConstraintDescriptorList getActiveConstraintDescriptors(ConstraintDescriptorList cdl) throws StandardException(Code)
Convert a constraint descriptor list into a list of active constraints, that is, constraints which must be enforced. For the Core product, these are just the constraints on the original list. However, during REFRESH we may have deferred some constraints until statement end. This method returns the corresponding list of constraints which AREN'T deferred.
Parameters:
  cdl - The constraint descriptor list to wrap withan Active constraint descriptor list. The corresponding Active ConstraintDescriptorList
exception:
  StandardException - Thrown on failure



getAliasDescriptor
public AliasDescriptor getAliasDescriptor(UUID uuid) throws StandardException(Code)
Get a AliasDescriptor given its UUID.
Parameters:
  uuid - The UUID The AliasDescriptor for the alias.
exception:
  StandardException - Thrown on failure



getAliasDescriptor
public AliasDescriptor getAliasDescriptor(String schemaId, String aliasName, char nameSpace) throws StandardException(Code)
Get a AliasDescriptor by alias name and name space. NOTE: caller responsible for handling no match.
Parameters:
  schemaId - schema identifier
Parameters:
  aliasName - The alias name.
Parameters:
  nameSpace - The alias type. AliasDescriptor AliasDescriptor for the alias name and name space
exception:
  StandardException - Thrown on failure



getAllDependencyDescriptorsList
public List getAllDependencyDescriptorsList() throws StandardException(Code)
Build and return an List with DependencyDescriptors for all of the stored dependencies. This is useful for consistency checking. List List of all DependencyDescriptors.
exception:
  StandardException - Thrown on failure



getAllSPSDescriptors
public List getAllSPSDescriptors() throws StandardException(Code)
Get every statement in this database. Return the SPSDescriptors in an list. the list of descriptors
exception:
  StandardException - Thrown on failure



getAuthorizationDatabaseOwner
public String getAuthorizationDatabaseOwner()(Code)
Get authorizationID of Database Owner authorizationID



getCacheMode
public int getCacheMode()(Code)



getColumnDescriptorByDefaultId
public ColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid) throws StandardException(Code)
Get a ColumnDescriptor given its Default ID.
Parameters:
  uuid - The UUID of the default The ColumnDescriptor for the column.
exception:
  StandardException - Thrown on failure



getColumnPermissions
public ColPermsDescriptor getColumnPermissions(UUID colPermsUUID) throws StandardException(Code)



getColumnPermissions
public ColPermsDescriptor getColumnPermissions(UUID tableUUID, int privType, boolean forGrant, String authorizationId) throws StandardException(Code)
Get one user's column privileges for a table.
Parameters:
  tableUUID -
Parameters:
  privType - (as int) Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV
Parameters:
  forGrant -
Parameters:
  authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table. Note that the user may have been grantedpermission on all the columns of the table (no column list), in which case this routinewill return null. You must also call getTablePermissions to see if the user has permissionon a set of columns.
exception:
  StandardException -



getColumnPermissions
public ColPermsDescriptor getColumnPermissions(UUID tableUUID, String privTypeStr, boolean forGrant, String authorizationId) throws StandardException(Code)
Get one user's column privileges for a table. This routine gets called during revoke privilege processing
Parameters:
  tableUUID -
Parameters:
  privTypeStr - (as String) Authorizer.SELECT_PRIV, Authorizer.UPDATE_PRIV, or Authorizer.REFERENCES_PRIV
Parameters:
  forGrant -
Parameters:
  authorizationId - The user name a ColPermsDescriptor or null if the user has no separate columnpermissions of the specified type on the table. Note that the user may have been grantedpermission on all the columns of the table (no column list), in which case this routinewill return null. You must also call getTablePermissions to see if the user has permissionon a set of columns.
exception:
  StandardException -



getConglomerateDescriptor
public ConglomerateDescriptor getConglomerateDescriptor(UUID uuid) throws StandardException(Code)
Get a ConglomerateDescriptor given its UUID. If it is an index conglomerate shared by at least another duplicate index, this returns one of the ConglomerateDescriptors for those indexes.
Parameters:
  uuid - The UUID A ConglomerateDescriptor for the conglomerate.
exception:
  StandardException - Thrown on failure



getConglomerateDescriptor
public ConglomerateDescriptor getConglomerateDescriptor(long conglomerateNumber) throws StandardException(Code)
Get a ConglomerateDescriptor given its conglomerate number. If it is an index conglomerate shared by at least another duplicate index, this returns one of the ConglomerateDescriptors for those indexes.
Parameters:
  conglomerateNumber - The conglomerate number. A ConglomerateDescriptor for the conglomerate. Returns NULL ifno such conglomerate.
exception:
  StandardException - Thrown on failure



getConglomerateDescriptor
public ConglomerateDescriptor getConglomerateDescriptor(String indexName, SchemaDescriptor sd, boolean forUpdate) throws StandardException(Code)
Gets a conglomerate descriptor for the named index in the given schema, getting an exclusive row lock on the matching row in sys.sysconglomerates (for DDL concurrency) if requested.
Parameters:
  indexName - The name of the index we're looking for
Parameters:
  sd - The schema descriptor
Parameters:
  forUpdate - Whether or not to get an exclusive row lock on the row in sys.sysconglomerates. A ConglomerateDescriptor describing the requestedconglomerate. Returns NULL if no such conglomerate.
exception:
  StandardException - Thrown on failure



getConglomerateDescriptors
public ConglomerateDescriptor[] getConglomerateDescriptors(UUID uuid) throws StandardException(Code)
Get an array of ConglomerateDescriptors given the UUID. If it is a heap conglomerate or an index conglomerate not shared by a duplicate index, the size of the return array is 1.
Parameters:
  uuid - The UUID An array of ConglomerateDescriptors for the conglomerate.returns size 0 array if no such conglomerate.
exception:
  StandardException - Thrown on failure



getConglomerateDescriptors
public ConglomerateDescriptor[] getConglomerateDescriptors(long conglomerateNumber) throws StandardException(Code)
Get an array of conglomerate descriptors for the given conglomerate number. If it is a heap conglomerate or an index conglomerate not shared by a duplicate index, the size of the return array is 1.
Parameters:
  conglomerateNumber - The number for the conglomeratewe're interested in An array of ConglomerateDescriptors that share the requestedconglomerate. Returns size 0 array if no such conglomerate.
exception:
  StandardException - Thrown on failure



getConstraintDescriptor
public ConstraintDescriptor getConstraintDescriptor(UUID uuid) throws StandardException(Code)
Get a ConstraintDescriptor given its UUID. Please use getConstraintDescriptorById() is you have the constraints table descriptor, it is much faster.
Parameters:
  uuid - The UUID The ConstraintDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getConstraintDescriptor
public ConstraintDescriptor getConstraintDescriptor(String constraintName, UUID schemaID) throws StandardException(Code)
Get a ConstraintDescriptor given its name and schema ID. Please use getConstraintDescriptorByName() if you have the constraint's table descriptor, it is much faster.
Parameters:
  constraintName - Constraint name.
Parameters:
  schemaID - The schema UUID The ConstraintDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getConstraintDescriptor
public ConstraintDescriptor getConstraintDescriptor(TableDescriptor td, UUID uuid) throws StandardException(Code)
Get the constraint descriptor given a table and the UUID String of the backing index.
Parameters:
  td - The table descriptor.
Parameters:
  uuid - the UUID for the backing index. The ConstraintDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getConstraintDescriptorById
public ConstraintDescriptor getConstraintDescriptorById(TableDescriptor td, UUID uuid) throws StandardException(Code)
Get the constraint descriptor given a table and the UUID String of the constraint
Parameters:
  td - The table descriptor.
Parameters:
  uuid - The UUID for the constraint The ConstraintDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getConstraintDescriptorByName
public ConstraintDescriptor getConstraintDescriptorByName(TableDescriptor td, SchemaDescriptor sd, String constraintName, boolean forUpdate) throws StandardException(Code)
Get the constraint descriptor given a TableDescriptor and the constraint name.
Parameters:
  td - The table descriptor.
Parameters:
  sd - The schema descriptor for the constraint
Parameters:
  constraintName - The constraint name.
Parameters:
  forUpdate - Whether or not access is for update The ConstraintDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getConstraintDescriptorViaHeap
protected TupleDescriptor getConstraintDescriptorViaHeap(ScanQualifier[][] scanQualifiers, TabInfoImpl ti, TupleDescriptor parentTupleDescriptor, List list) throws StandardException(Code)
Return a (single or list of) catalog row descriptor(s) from SYSCONSTRAINTS through a heap scan
Parameters:
  scanQualifiers - qualifiers
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  parentTupleDescriptor - The parentDescriptor, if applicable.
Parameters:
  list - The list to build, if supplied. If null, then caller expects a single descriptor The last matching descriptor
exception:
  StandardException - Thrown on error



getConstraintDescriptorViaIndex
protected ConstraintDescriptor getConstraintDescriptorViaIndex(int indexId, ExecIndexRow keyRow, TabInfoImpl ti, TableDescriptor td, ConstraintDescriptorList dList, boolean forUpdate) throws StandardException(Code)
Return a (single or list of) ConstraintDescriptor(s) from SYSCONSTRAINTS where the access is from the index to the heap.
Parameters:
  indexId - The id of the index (0 to # of indexes on table) to use
Parameters:
  keyRow - The supplied ExecIndexRow for search
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  td - The TableDescriptor, if supplied.
Parameters:
  dList - The list to build, if supplied. If null, then caller expectsa single descriptor
Parameters:
  forUpdate - Whether or not to open scan for update The last matching descriptor
exception:
  StandardException - Thrown on error



getConstraintDescriptors
public ConstraintDescriptorList getConstraintDescriptors(TableDescriptor td) throws StandardException(Code)
Load up the constraint descriptor list for this table descriptor and return it. If the descriptor list is already loaded up, it is retuned without further ado. If no table descriptor is passed in, then all constraint descriptors are retrieved. Note that in this case, the constraint descriptor objects may be duplicates of constraint descriptors that are hung off of the table descriptor cache.
Parameters:
  td - The table descriptor. If null,all constraint descriptors are returned. The ConstraintDescriptorList for the table
exception:
  StandardException - Thrown on failure



getConstraintTableDescriptor
public TableDescriptor getConstraintTableDescriptor(UUID constraintId) throws StandardException(Code)
Return a table descriptor corresponding to the TABLEID field in SYSCONSTRAINTS where CONSTRAINTID matches the constraintId passsed in.
Parameters:
  constraintId - The id of the constraint the corresponding table descriptor
exception:
  StandardException - Thrown on error



getConstraints
public List getConstraints(UUID uuid, int indexId, int columnNum) throws StandardException(Code)
Return an List which of the relevant column matching the indexed criteria. If nothing matches, returns an empty List (never returns null).
Parameters:
  uuid - The id of the constraint
Parameters:
  indexId - The index id in SYS.SYSCONSTRAINTS
Parameters:
  columnNum - The column to retrieve a list of UUIDs in an List.
exception:
  StandardException - Thrown on error



getDataDescriptorGenerator
public DataDescriptorGenerator getDataDescriptorGenerator()(Code)
Get a DataDescriptorGenerator, through which we can create objects to be stored in the DataDictionary. A DataDescriptorGenerator



getDataValueFactory
public DataValueFactory getDataValueFactory()(Code)
Get a DataValueFactory, through which we can create data value objects. A DataValueFactory



getDeclaredGlobalTemporaryTablesSchemaDescriptor
public SchemaDescriptor getDeclaredGlobalTemporaryTablesSchemaDescriptor() throws StandardException(Code)
Get the descriptor for the declared global temporary table schema which is always named "SESSION". The descriptor for the schema.
exception:
  StandardException - Thrown on failure



getDependencyManager
public DependencyManager getDependencyManager()(Code)
returns the dependencymanager associated with this datadictionary.
See Also:   DataDictionary.getDependencyManager



getDependentsDescriptorList
public List getDependentsDescriptorList(String dependentID) throws StandardException(Code)
Gets a list of the dependency descriptors for the given dependent's id.
Parameters:
  dependentID - The ID of the dependent we're interested in List Returns a list of DependencyDescriptors. Returns an empty List if no stored dependencies for thedependent's ID.
exception:
  StandardException - Thrown on failure



getDescriptorViaHeap
protected TupleDescriptor getDescriptorViaHeap(ScanQualifier[][] scanQualifiers, TabInfoImpl ti, TupleDescriptor parentTupleDescriptor, List list) throws StandardException(Code)
Return a (single or list of) catalog row descriptor(s) from a system table where the access a heap scan
Parameters:
  scanQualifiers - qualifiers
Parameters:
  ti - The TabInfoImpl to use
Parameters:
  parentTupleDescriptor - The parentDescriptor, if applicable.
Parameters:
  list - The list to build, if supplied. If null, then caller expects a single descriptor The last matching descriptor
exception:
  StandardException - Thrown on error



getEngineType
public int getEngineType()(Code)



getExecutionFactory
public ExecutionFactory getExecutionFactory()(Code)
Get ExecutionFactory associated with this database. The ExecutionFactory



getFileInfoDescriptor
public FileInfoDescriptor getFileInfoDescriptor(UUID id) throws StandardException(Code)

See Also:   DataDictionary.getFileInfoDescriptor
exception:
  StandardException - Thrown on failure



getFileInfoDescriptor
public FileInfoDescriptor getFileInfoDescriptor(SchemaDescriptor sd, String name) throws StandardException(Code)

See Also:   DataDictionary.getFileInfoDescriptor
exception:
  StandardException - Thrown on failure



getForeignKeys
public ConstraintDescriptorList getForeignKeys(UUID constraintId) throws StandardException(Code)
Return a list of foreign keys constraints referencing this constraint. Returns both enabled and disabled foreign keys.
Parameters:
  constraintId - The id of the referenced constraint list of constraints, empty of there are none
exception:
  StandardException - Thrown on error



getIndexRowFromHeapRow
public static ExecIndexRow getIndexRowFromHeapRow(IndexRowGenerator irg, RowLocation rl, ExecRow heapRow) throws StandardException(Code)
Get an index row based on a row from the heap.
Parameters:
  irg - IndexRowGenerator to use
Parameters:
  rl - RowLocation for heap
Parameters:
  heapRow - Row from the heap ExecIndexRow Index row.
exception:
  StandardException - Thrown on error



getNonCoreTIByNumber
protected TabInfoImpl getNonCoreTIByNumber(int catalogNumber) throws StandardException(Code)
returns the tabinfo for a non core system catalog. Input is a catalogNumber (defined in DataDictionary).



getProvidersDescriptorList
public List getProvidersDescriptorList(String providerID) throws StandardException(Code)
Gets a list of the dependency descriptors for the given provider's id.
Parameters:
  providerID - The ID of the provider we're interested in List Returns a list of DependencyDescriptors. Returns an empty List if no stored dependencies for theprovider's ID.
exception:
  StandardException - Thrown on failure



getRoutineList
public java.util.List getRoutineList(String schemaID, String routineName, char nameSpace) throws StandardException(Code)
Get the list of routines matching the schema and routine name. While we only support a single alias for a given name,namespace just return a list of zero or one item. If the schema is SYSFUN then do not use the system catalogs, but instead look up the routines from the in-meomry table driven by the contents of SYSFUN_FUNCTIONS.



getRoutinePermissions
public RoutinePermsDescriptor getRoutinePermissions(UUID routineUUID, String authorizationId) throws StandardException(Code)
Get one user's permissions for a routine (function or procedure).
Parameters:
  routineUUID -
Parameters:
  authorizationId - The user's name The descriptor of the users permissions for the routine.
exception:
  StandardException -



getRoutinePermissions
public RoutinePermsDescriptor getRoutinePermissions(UUID routinePermsUUID) throws StandardException(Code)



getRowLocationTemplate
public RowLocation getRowLocationTemplate(LanguageConnectionContext lcc, TableDescriptor td) throws StandardException(Code)



getSPSDescriptor
public SPSDescriptor getSPSDescriptor(UUID uuid) throws StandardException(Code)
Get a SPSDescriptor given its UUID.
Parameters:
  uuid - The UUID The SPSDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getSPSDescriptor
public SPSDescriptor getSPSDescriptor(String stmtName, SchemaDescriptor sd) throws StandardException(Code)
Get a SPSDescriptor given its name. Currently no cacheing. With caching we need to be very careful about invalidation. No caching means invalidations block on existing SPSD instances (since they were read in
Parameters:
  stmtName - the statement name
Parameters:
  sd - The SchemaDescriptor The SPSDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getSPSParams
public DataTypeDescriptor[] getSPSParams(SPSDescriptor spsd, Vector defaults) throws StandardException(Code)
Get all the parameter descriptors for an SPS. Look up the params in SYSCOLUMNS and turn them into parameter descriptors.
Parameters:
  spsd - sps descriptor
Parameters:
  defaults - vector for storing column defaults array of data type descriptors
exception:
  StandardException - Thrown on error



getSYSCOLUMNSHeapConglomerateNumber
public long getSYSCOLUMNSHeapConglomerateNumber()(Code)
Get the heap conglomerate number for SYS.SYSCOLUMNS. (Useful for adding new index to the table.) The heap conglomerate number for SYS.SYSCOLUMNS.



getSchemaDescriptor
public SchemaDescriptor getSchemaDescriptor(String schemaName, TransactionController tc, boolean raiseError) throws StandardException(Code)
Get the descriptor for the named schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. Will check default schema for a match before scanning a system table.
Parameters:
  schemaName - The name of the schema we're interested in. Must not be null.
Parameters:
  tc - TransactionController
Parameters:
  raiseError - whether an exception should be thrown if the schema does not exist. The descriptor for the schema. Can be null (not found) if raiseError is false.
exception:
  StandardException - Thrown on error



getSchemaDescriptor
public SchemaDescriptor getSchemaDescriptor(UUID schemaId, TransactionController tc) throws StandardException(Code)
Get the descriptor for the named schema. If the schemaId parameter is NULL, it gets the descriptor for the current (default) schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. Will check default schema for a match before scanning a system table.
Parameters:
  schemaId - The id of the schema we're interested in.If the name is NULL, get the descriptor for thecurrent schema.
Parameters:
  tc - TransactionController The descriptor for the schema. Warning: <\I> mayreturn NULL if schemaName is non-NULL and doesn't existin SYSSCHEMAS
exception:
  StandardException - Thrown on error



getSetAutoincrementValue
public NumberDataValue getSetAutoincrementValue(RowLocation rl, TransactionController tc, boolean doUpdate, NumberDataValue newValue, boolean wait) throws StandardException(Code)

See Also:   DataDictionary.getSetAutoincrementValue



getStatisticsDescriptors
public List getStatisticsDescriptors(TableDescriptor td) throws StandardException(Code)
get all the statistiscs descriptors for a given table.
Parameters:
  td - Table Descriptor for which I need statistics



getSubKeyConstraint
public SubKeyConstraintDescriptor getSubKeyConstraint(UUID constraintId, int type) throws StandardException(Code)
Get a SubKeyConstraintDescriptor from syskeys or sysforeignkeys for the specified constraint id. For primary foreign and and unique key constraints.
Parameters:
  constraintId - The UUID for the constraint.
Parameters:
  type - The type of the constraint (e.g. DataDictionary.FOREIGNKEY_CONSTRAINT) SubKeyConstraintDescriptor The Sub descriptor for the constraint.
exception:
  StandardException - Thrown on failure



getSysIBMSchemaDescriptor
public SchemaDescriptor getSysIBMSchemaDescriptor() throws StandardException(Code)
Get the descriptor for the SYSIBM schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. The descriptor for the schema.
exception:
  StandardException - Thrown on failure



getSystemDiagSchemaDescriptor
public SchemaDescriptor getSystemDiagSchemaDescriptor() throws StandardException(Code)
Get the descriptor for the SYSCS_DIAG system schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. The descriptor for the schema.
exception:
  StandardException - Thrown on failure



getSystemSQLName
public String getSystemSQLName()(Code)
Returns a unique system generated name of the form SQLyymmddhhmmssxxn yy - year, mm - month, dd - day of month, hh - hour, mm - minute, ss - second, xx - the first 2 digits of millisec because we don't have enough space to keep the exact millisec value, n - number between 0-9 The number at the end is to handle more than one system generated name request came at the same time. In that case, the timestamp will remain the same, we will just increment n at the end of the name. Following is how we get around the problem of more than 10 system generated name requestes at the same time: When the database boots up, we start a counter with value -1 for the last digit in the generated name. We also keep the time in millisec to keep track of when the last system name was generated. At the boot time, it will be default to 0L. In addition, we have a calendar object for the time in millisec That calendar object is used to fetch yy, mm, dd, etc for the string SQLyymmddhhmmssxxn When the first request for the system generated name comes, time of last system generated name will be less than the current time. We initialize the counter to 0, set the time of last system generated name to the current time truncated off to lower 10ms time. The first name request is the only time we know for sure the time of last system generated name will be less than the current time. After this first request, the next request could be at any time. We go through the following algorithm for every generated name request. First check if the current time(truncated off to lower 10ms) is greater than the timestamp for last system generated name If yes, then we change the timestamp for system generated name to the current timestamp and reset the counter to 0 and generate the name using the current timestamp and 0 as the number at the end of the generated name. If no, then it means this request for generated name has come at the same time as last one. Or it may come at a time less than the last generated name request. This could be because of seasonal time change or somebody manually changing the time on the computer. In any case, if the counter is less than 10(meaning this is not yet our 11th request for generated name at a given time), we use that in the generated name. But if the counter has reached 10(which means, this is the 11th name request at the same time), then we increment the system generated name timestamp by 10ms and reset the counter to 0 (notice, at this point, the timestamp for system generated names is not in sync with the real current time, but we need to have this mechanism to get around the problem of more than 10 generated name requests at a same physical time). system generated unique name



getSystemSchemaDescriptor
public SchemaDescriptor getSystemSchemaDescriptor() throws StandardException(Code)
Get the descriptor for the system schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. The descriptor for the schema.
exception:
  StandardException - Thrown on failure



getSystemUtilSchemaDescriptor
public SchemaDescriptor getSystemUtilSchemaDescriptor() throws StandardException(Code)
Get the descriptor for the SYSCS_UTIL system schema. Schema descriptors include authorization ids and schema ids. SQL92 allows a schema to specify a default character set - we will not support this. The descriptor for the schema.
exception:
  StandardException - Thrown on failure



getTableDescriptor
public TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)
Get the descriptor for the named table within the given schema. If the schema parameter is NULL, it looks for the table in the current (default) schema. Table descriptors include object ids, object types (table, view, etc.)
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 system schema. The descriptor for the table, null if table does notexist.
exception:
  StandardException - Thrown on failure



getTableDescriptor
public TableDescriptor getTableDescriptor(UUID tableID) throws StandardException(Code)
Get the descriptor for the table with the given UUID. NOTE: I'm assuming that the object store will define an UUID for persistent objects. I'm also assuming that UUIDs are unique across schemas, and that the object store will be able to do efficient lookups across schemas (i.e. that no schema descriptor parameter is needed).
Parameters:
  tableID - The UUID of the table to get the descriptor for The descriptor for the table, null if the table doesnot exist.
exception:
  StandardException - Thrown on failure



getTablePermissions
public TablePermsDescriptor getTablePermissions(UUID tableUUID, String authorizationId) throws StandardException(Code)
Get one user's privileges on a table
Parameters:
  tableUUID -
Parameters:
  authorizationId - The user name a TablePermsDescriptor or null if the user has no permissions on the table.
exception:
  StandardException -



getTablePermissions
public TablePermsDescriptor getTablePermissions(UUID tablePermsUUID) throws StandardException(Code)



getTransactionCompile
public TransactionController getTransactionCompile() throws StandardException(Code)
Get the TransactionController to use, when not passed in as a parameter. (This hides logic about whether or not we're at boot time in a single place. NOTE: There's no LCC at boot time.) NOTE: All methods in the DD should call this method. TransactionController The TC to use.
exception:
  StandardException - Thrown on error



getTransactionExecute
public TransactionController getTransactionExecute() throws StandardException(Code)
Get the TransactionController to use, when not passed in as a parameter. (This hides logic about whether or not we're at boot time in a single place. NOTE: There's no LCC at boot time.) NOTE: All methods in the DD should call this method. TransactionController The TC to use.
exception:
  StandardException - Thrown on error



getTriggerDescriptor
public TriggerDescriptor getTriggerDescriptor(UUID uuid) throws StandardException(Code)
Get a TriggerDescriptor given its UUID.
Parameters:
  uuid - The UUID The TriggerDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getTriggerDescriptor
public TriggerDescriptor getTriggerDescriptor(String name, SchemaDescriptor sd) throws StandardException(Code)
Get the stored prepared statement descriptor given a sps name.
Parameters:
  name - The sps name.
Parameters:
  sd - The schema descriptor. The TriggerDescriptor for the constraint.
exception:
  StandardException - Thrown on failure



getTriggerDescriptors
public GenericDescriptorList getTriggerDescriptors(TableDescriptor td) throws StandardException(Code)
Load up the trigger descriptor list for this table descriptor and return it. If the descriptor list is already loaded up, it is retuned without further ado.
Parameters:
  td - The table descriptor. The ConstraintDescriptorList for the table
exception:
  StandardException - Thrown on failure



getUUIDFactory
public UUIDFactory getUUIDFactory()(Code)
Get the UUID Factory. (No need to make the UUIDFactory a module.) UUIDFactory The UUID Factory for this DataDictionary.



getUncachedColPermsDescriptor
ColPermsDescriptor getUncachedColPermsDescriptor(ColPermsDescriptor key) throws StandardException(Code)
Get a column permissions descriptor from the system tables, without going through the cache. This method is called to fill the permissions cache. a ColPermsDescriptor that describes the column permissions granted to the grantee, nullif no column permissions have been granted to him on the table.
exception:
  StandardException -



getUncachedRoutinePermsDescriptor
RoutinePermsDescriptor getUncachedRoutinePermsDescriptor(RoutinePermsDescriptor key) throws StandardException(Code)
Get a routine permissions descriptor from the system tables, without going through the cache. This method is called to fill the permissions cache. a RoutinePermsDescriptor that describes the table permissions granted to the grantee, nullif no table-level permissions have been granted to him on the table.
exception:
  StandardException -



getUncachedSPSDescriptor
public SPSDescriptor getUncachedSPSDescriptor(TableKey stmtKey) throws StandardException(Code)
This method can get called from the DataDictionary cache.
Parameters:
  stmtKey - The TableKey of the sps The descriptor for the sps, null if the sps doesnot exist.
exception:
  StandardException - Thrown on failure



getUncachedSPSDescriptor
protected SPSDescriptor getUncachedSPSDescriptor(UUID stmtId) throws StandardException(Code)
This method can get called from the DataDictionary cache.
Parameters:
  stmtId - The UUID of the stmt to get the descriptor for The descriptor for the stmt, null if the table doesnot exist.
exception:
  StandardException - Thrown on failure



getUncachedTableDescriptor
TableDescriptor getUncachedTableDescriptor(TableKey tableKey) throws StandardException(Code)
This method can get called from the DataDictionary cache.
Parameters:
  tableKey - The TableKey of the table The descriptor for the table, null if the table doesnot exist.
exception:
  StandardException - Thrown on failure



getUncachedTableDescriptor
protected TableDescriptor getUncachedTableDescriptor(UUID tableID) throws StandardException(Code)
This method can get called from the DataDictionary cache.
Parameters:
  tableID - The UUID of the table to get the descriptor for The descriptor for the table, null if the table doesnot exist.
exception:
  StandardException - Thrown on failure



getUncachedTablePermsDescriptor
TablePermsDescriptor getUncachedTablePermsDescriptor(TablePermsDescriptor key) throws StandardException(Code)
Get a table permissions descriptor from the system tables, without going through the cache. This method is called to fill the permissions cache. a TablePermsDescriptor that describes the table permissions granted to the grantee, nullif no table-level permissions have been granted to him on the table.
exception:
  StandardException -



getVTIClass
public String getVTIClass(TableDescriptor td) throws StandardException(Code)

See Also:   org.apache.derby.iapi.sql.dictionary.DataDictionary.getVTIClass(org.apache.derby.iapi.sql.dictionary.TableDescriptor)



getValueAsDVD
public DataValueDescriptor getValueAsDVD(UUID uuid) throws StandardException(Code)
Converts a UUID to an DataValueDescriptor. the UUID converted to an DataValueDescriptor
exception:
  StandardException - Thrown on error



getViewDescriptor
public ViewDescriptor getViewDescriptor(UUID uuid) throws StandardException(Code)
Gets the viewDescriptor for the view with the given UUID.
Parameters:
  uuid - The UUID for the view A descriptor for the view
exception:
  StandardException - Thrown on error



getViewDescriptor
public ViewDescriptor getViewDescriptor(TableDescriptor td) throws StandardException(Code)
Gets the viewDescriptor for the view given the TableDescriptor.
Parameters:
  td - The TableDescriptor for the view. A descriptor for the view
exception:
  StandardException - Thrown on error



grantPublicAccessToSystemRoutines
public void grantPublicAccessToSystemRoutines(TransactionController tc, String authorizationID) throws StandardException(Code)
Grant PUBLIC access to specific system routines. Currently, this is done for some routines in SYSCS_UTIL schema.
Parameters:
  tc - TransactionController to use
Parameters:
  authorizationID - authorization ID of the permission grantor
throws:
  StandardException - Standard exception policy.



hashAllConglomerateDescriptorsByNumber
public Hashtable hashAllConglomerateDescriptorsByNumber(TransactionController tc) throws StandardException(Code)
Get all of the ConglomerateDescriptors in the database and hash them by conglomerate number. This is useful as a performance optimization for the locking VTIs. NOTE: This method will scan SYS.SYSCONGLOMERATES at READ UNCOMMITTED.
Parameters:
  tc - TransactionController for the transaction A Hashtable with all of the ConglomerateDescriptorsin the database hashed by conglomerate number.
exception:
  StandardException - Thrown on failure



hashAllTableDescriptorsByTableId
public Hashtable hashAllTableDescriptorsByTableId(TransactionController tc) throws StandardException(Code)
Get all of the TableDescriptors in the database and hash them by TableId This is useful as a performance optimization for the locking VTIs. NOTE: This method will scan SYS.SYSTABLES at READ UNCOMMITTED.
Parameters:
  tc - TransactionController for the transaction A Hashtable with all of the Table descriptors in the databasehashed by TableId
exception:
  StandardException - Thrown on failure



initSystemIndexVariables
public void initSystemIndexVariables(DataDescriptorGenerator ddg, TabInfoImpl ti, int indexNumber) throws StandardException(Code)



initSystemIndexVariables
protected void initSystemIndexVariables(TabInfoImpl ti) throws StandardException(Code)



initializeCatalogInfo
public void initializeCatalogInfo() throws StandardException(Code)
Initialize catalog information. This method is overridden by children.
exception:
  StandardException - Thrown on error



invalidateAllSPSPlans
public void invalidateAllSPSPlans() throws StandardException(Code)

See Also:   DataDictionary.invalidateAllSPSPlans
exception:
  StandardException - Thrown on error



isSchemaEmpty
public boolean isSchemaEmpty(SchemaDescriptor sd) throws StandardException(Code)
Indicate whether there is anything in the particular schema. Checks for tables in the the schema, on the assumption that there cannot be any other objects in a schema w/o a table.
Parameters:
  sd - descriptor true/false
exception:
  StandardException - on error



isSchemaReferenced
protected boolean isSchemaReferenced(TransactionController tc, TabInfoImpl ti, int indexId, int indexCol, DataValueDescriptor schemaIdOrderable) throws StandardException(Code)
Is the schema id referenced by the system table in question? Currently assumes that the schema id is in an index. NOTE: could be generalized a bit, and possibly used elsewhere...
Parameters:
  tc - transaction controller
Parameters:
  ti - table info for the system table
Parameters:
  indexId - index id
Parameters:
  indexCol - 1 based index column
Parameters:
  schemaIdOrderable - the schemaid in a char orderable true if there is a reference to this schema
exception:
  StandardException - on error



isSystemSchemaName
public boolean isSystemSchemaName(String name) throws StandardException(Code)
Determine whether a string is the name of the system schema.
Parameters:
  name - true or false
exception:
  StandardException - Thrown on failure



loadCatalogs
public void loadCatalogs(DataDescriptorGenerator ddg, TabInfoImpl[] catalogArray) throws StandardException(Code)
Initialize indices for an array of catalogs
Parameters:
  ddg - DataDescriptorGenerator
exception:
  StandardException - Thrown on error



loadDictionaryTables
protected void loadDictionaryTables(TransactionController tc, DataDescriptorGenerator ddg, Properties startParams) throws StandardException(Code)
Initialize system catalogs. This is where we perform upgrade. It is our pious hope that we won't ever have to upgrade the core catalogs, other than to add fields inside Formatable columns in these catalogs. If we do have to upgrade the core catalogs, then we may need to move the loadCatalog calls into the upgrade machinery. It's do-able, just not pretty.
Parameters:
  tc - TransactionController
Parameters:
  ddg - DataDescriptorGenerator
exception:
  StandardException - Thrown on error



makeCatalog
public void makeCatalog(TabInfoImpl ti, SchemaDescriptor sd, TransactionController tc) throws StandardException(Code)
The dirty work of creating a catalog.
Parameters:
  ti - TabInfoImpl describing catalog to create.
Parameters:
  sd - Schema to create catalogs in.
Parameters:
  tc - Transaction context.
exception:
  StandardException - Standard Cloudscape error policy



newCacheable
public Cacheable newCacheable(CacheManager cm)(Code)



populateSYSDUMMY1
protected void populateSYSDUMMY1(TransactionController tc) throws StandardException(Code)
Populate SYSDUMMY1 table with a single row.
exception:
  StandardException - Standard Cloudscape error policy



pushDataDictionaryContext
public DataDictionaryContext pushDataDictionaryContext(ContextManager contextManager)(Code)

See Also:   DataDictionary.pushDataDictionaryContext



run
final public Object run()(Code)



setAutoincrementValue
public void setAutoincrementValue(TransactionController tc, UUID tableUUID, String columnName, long aiValue, boolean incrementNeeded) throws StandardException(Code)
sets a new value in SYSCOLUMNS for a particular autoincrement column.
Parameters:
  tc - Transaction Controller to use.
Parameters:
  columnName - Name of the column.
Parameters:
  aiValue - Value to write to SYSCOLUMNS.
Parameters:
  incrementNeeded - whether to increment the value passed in by theuser (aiValue) or not before writing it to SYSCOLUMNS.



setDependencyManager
protected void setDependencyManager()(Code)
sets the dependencymanager associated with this dd. subclasses can override this to install their own funky dependency manager.



spsCacheEntryAdded
void spsCacheEntryAdded(SPSDescriptor spsd)(Code)
Add an entry to the hashtables for lookup from the cache.



spsCacheEntryRemoved
void spsCacheEntryRemoved(SPSDescriptor spsd)(Code)



startReading
public int startReading(LanguageConnectionContext lcc) throws StandardException(Code)

See Also:   org.apache.derby.iapi.sql.dictionary.DataDictionary.startReading
exception:
  StandardException - Thrown on error



startWriting
public void startWriting(LanguageConnectionContext lcc) throws StandardException(Code)



stop
public void stop()(Code)
Stop this module. In this case, nothing needs to be done.



transactionFinished
public void transactionFinished() throws StandardException(Code)



updateConglomerateDescriptor
public void updateConglomerateDescriptor(ConglomerateDescriptor cd, long conglomerateNumber, TransactionController tc) throws StandardException(Code)
Update the conglomerateNumber for a ConglomerateDescriptor. This is useful, in 1.3, when doing a bulkInsert into an empty table where we insert into a new conglomerate. (This will go away in 1.4.)
Parameters:
  cd - The ConglomerateDescriptor
Parameters:
  conglomerateNumber - The new conglomerate number
Parameters:
  tc - The TransactionController to use
exception:
  StandardException - Thrown on failure



updateConglomerateDescriptor
public void updateConglomerateDescriptor(ConglomerateDescriptor[] cds, long conglomerateNumber, TransactionController tc) throws StandardException(Code)
Update the conglomerateNumber for an array of ConglomerateDescriptors. In case of more than one ConglomerateDescriptor, each descriptor should be updated separately, conglomerate id is not same for all the descriptors. Even when indexes are sharing the same conglomerate(conglomerate number), conglomerate ids are unique. This is useful, in 1.3, when doing a bulkInsert into an empty table where we insert into a new conglomerate. (This will go away in 1.4.)
Parameters:
  cds - The array of ConglomerateDescriptors
Parameters:
  conglomerateNumber - The new conglomerate number
Parameters:
  tc - The TransactionController to use
exception:
  StandardException - Thrown on failure



updateConstraintDescriptor
public void updateConstraintDescriptor(ConstraintDescriptor cd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException(Code)
Update the constraint descriptor in question. Updates every row in the base conglomerate.
Parameters:
  cd - The Constraintescriptor
Parameters:
  formerUUID - The UUID for this column in SYSCONSTRAINTS,may differ from what is in cd if thisis the column that is being set.
Parameters:
  colsToSet - Array of ints of columns to be modified,1 based. May be null (all cols).
Parameters:
  tc - The TransactionController to use
exception:
  StandardException - Thrown on failure



updateLockGranularity
public void updateLockGranularity(TableDescriptor td, SchemaDescriptor schema, char lockGranularity, TransactionController tc) throws StandardException(Code)
Update the lockGranularity for the specified table.
Parameters:
  td - The TableDescriptor for the table
Parameters:
  schema - The SchemaDescriptor for the table
Parameters:
  lockGranularity - The new lockGranularity
Parameters:
  tc - The TransactionController to use.
exception:
  StandardException - Thrown on error



updateSPS
public void updateSPS(SPSDescriptor spsd, TransactionController tc, boolean recompile, boolean updateParamDescriptors, boolean wait, boolean firstCompilation) throws StandardException(Code)
Updates SYS.SYSSTATEMENTS with the info from the SPSD.
Parameters:
  spsd - The descriptor to add
Parameters:
  tc - The transaction controller
Parameters:
  updateParamDescriptors - If true, will update theparameter descriptors in SYS.SYSCOLUMNS.
Parameters:
  wait - If true, then the caller wants to wait for locks. False will be
Parameters:
  firstCompilation - true, if Statement is getting compiled for firsttime and SPS was created with NOCOMPILE option.when we using a nested user xaction - we want to timeout right away if the parentholds the lock. (bug 4821)
exception:
  StandardException - Thrown on error



updateSYSCOLPERMSforAddColumnToUserTable
public void updateSYSCOLPERMSforAddColumnToUserTable(UUID tableID, TransactionController tc) throws StandardException(Code)
Need to update SYSCOLPERMS for a given table because a new column has been added to that table. SYSCOLPERMS has a column called "COLUMNS" which is a bit map for all the columns in a given user table. Since ALTER TABLE .. ADD COLUMN .. has added one more column, we need to expand "COLUMNS" for that new column Currently, this code gets called during execution phase of ALTER TABLE .. ADD COLUMN ..
Parameters:
  tableID - The UUID of the table to which a column has been added
Parameters:
  tc - TransactionController for the transaction
exception:
  StandardException - Thrown on error



updateSchemaAuth
public void updateSchemaAuth(String schemaName, String authorizationId, TransactionController tc) throws StandardException(Code)
Update authorizationId of specified schemaName
Parameters:
  schemaName - Schema Name of system schema
Parameters:
  authorizationId - authorizationId of new schema owner
Parameters:
  tc - The TransactionController to use
exception:
  StandardException - Thrown on failure



updateSystemSchemaAuthorization
public void updateSystemSchemaAuthorization(String aid, TransactionController tc) throws StandardException(Code)
Update all system schemas to have new authorizationId. This is needed while upgrading pre-10.2 databases to 10.2 or later versions. From 10.2, all system schemas would be owned by database owner's authorizationId.
Parameters:
  aid - AuthorizationID of Database Owner
Parameters:
  tc - TransactionController to use
exception:
  StandardException - Thrown on failure



updateTriggerDescriptor
public void updateTriggerDescriptor(TriggerDescriptor triggerd, UUID formerUUID, int[] colsToSet, TransactionController tc) throws StandardException(Code)
Update the trigger descriptor in question. Updates every row in the base conglomerate that matches the uuid.
Parameters:
  triggerd - The Trigger descriptor
Parameters:
  formerUUID - The UUID for this column in SYSTRIGGERS,may differ from what is in triggerd if thisis the column that is being set.
Parameters:
  colsToSet - Array of ints of columns to be modified,1 based. May be null (all cols).
Parameters:
  tc - The TransactionController to use
exception:
  StandardException - Thrown on failure



upgradeMakeCatalog
protected void upgradeMakeCatalog(TransactionController tc, int catalogNumber) throws StandardException(Code)
called by the upgrade code (dd_xena etc) to add a new system catalog.
Parameters:
  tc - TransactionController to use.
Parameters:
  catalogNumber - catalogNumber



upgrade_addColumns
public void upgrade_addColumns(CatalogRowFactory rowFactory, int[] newColumnIDs, TransactionController tc) throws StandardException(Code)
Upgrade an existing catalog by adding columns.
Parameters:
  rowFactory - Associated with this catalog.
Parameters:
  newColumnIDs - Array of 1-based column ids.
Parameters:
  tc - Transaction controller
exception:
  StandardException - Standard Cloudscape error policy



upgrade_addInvisibleColumns
public void upgrade_addInvisibleColumns(CatalogRowFactory rowFactory, int[] newColumnIDs, TransactionController tc) throws StandardException(Code)
Add invisible columns to an existing system catalog
Parameters:
  rowFactory - Associated with this catalog.
Parameters:
  newColumnIDs - Array of 1-based column ids.
Parameters:
  tc - Transaction controller
exception:
  StandardException - Standard Cloudscape error policy



upgrade_initSystemTableCols
void upgrade_initSystemTableCols(TransactionController tc, boolean isCoreTable, int tableNum, FormatableBitSet columnsToUpdateSet, DataValueDescriptor[] replaceRow) throws StandardException(Code)
Initialize noncore columns to fixed values
Parameters:
  tc - The TransactionController for the transaction to do theupgrade in.
Parameters:
  isCoreTable - true if it is a core table
Parameters:
  tableNum - the noncore table number
Parameters:
  columnsToUpdateSet - a bit set of columns to update. ZERO BASED
Parameters:
  replaceRow - an object array of Orderables for the new values
exception:
  StandardException - Thrown on error



upgrade_makeOneIndex
public long upgrade_makeOneIndex(TransactionController tc, TabInfoImpl ti, int indexNumber, long heapConglomerateNumber) throws StandardException(Code)
Code to add an index to a catalog during upgrade.
Parameters:
  tc - transaction controller
Parameters:
  ti - information on the catalog that's having a new index added
Parameters:
  indexNumber - 0-based index number
Parameters:
  heapConglomerateNumber - what it is The conglomerate number of the new index.
exception:
  StandardException - Thrown on failure



upgrade_setNullability
public void upgrade_setNullability(CatalogRowFactory rowFactory, int columnNumber, boolean nullability, TransactionController tc) throws StandardException(Code)
Upgrade an existing catalog by setting the nullability
Parameters:
  columnNumber - The column to change
Parameters:
  nullability - true if nullable
Parameters:
  tc - Transaction controller
exception:
  StandardException - Standard Cloudscape error policy



usesSqlAuthorization
public boolean usesSqlAuthorization()(Code)

See Also:   DataDictionary.usesSqlAuthorization



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.