Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.DataDictionaryContext


   */
  public static String countDependencies() throws StandardException, java.sql.SQLException
  {
    int            numDependencies = 0;
    DataDictionary      dd;
    DataDictionaryContext  ddc;
    DependencyManager    dm;
    StringBuffer      debugBuf = new StringBuffer();

    ddc = (DataDictionaryContext)
        (ContextService.getContext(DataDictionaryContext.CONTEXT_ID));

    dd = ddc.getDataDictionary();
    dm = dd.getDependencyManager();

    numDependencies = dm.countDependencies();

    if (numDependencies > 0)
View Full Code Here


   */
  public static String countDependencies() throws StandardException, java.sql.SQLException
  {
    int            numDependencies = 0;
    DataDictionary      dd;
    DataDictionaryContext  ddc;
    DependencyManager    dm;
    StringBuffer      debugBuf = new StringBuffer();

    ddc = (DataDictionaryContext)
        (ContextService.getContext(DataDictionaryContext.CONTEXT_ID));

    dd = ddc.getDataDictionary();
    dm = dd.getDependencyManager();

    numDependencies = dm.countDependencies();

    if (numDependencies > 0)
View Full Code Here

      // parse it when it is set to ensure only valid values
      // are written to the actual conglomerate.
      dbcp = IdUtil.parseDbClassPath(newClasspath, normalizeToUpper);
    }

    DataDictionaryContext ddc =
      (DataDictionaryContext)ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
    if (SanityManager.DEBUG)
      if (ddc == null) SanityManager.THROWASSERT("Class path change with no connection");
    DataDictionary dd = ddc.getDataDictionary();

    //
    //Verify that all jar files on the database classpath are in the data dictionary.
    if (dbcp != null)
    {
View Full Code Here

    if (!key.equals(Property.DATABASE_CLASSPATH)) return null;

    // only do the change dynamically if we are already
    // a per-database classapath.
    if (cfDB != null) {
      DataDictionaryContext ddc =
        (DataDictionaryContext)ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
      if (SanityManager.DEBUG)
        if (ddc == null) SanityManager.THROWASSERT("Class path change with no connection");
      DataDictionary dd = ddc.getDataDictionary();

      //
      // Invalidate stored plans.
      dd.invalidateAllSPSPlans();
   
View Full Code Here

  ** Methods of JarReader
  */
  public Object readJarFile(String schemaName, String sqlName)
    throws StandardException {

    DataDictionaryContext ddc =
      (DataDictionaryContext) ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
    DataDictionary dd = ddc.getDataDictionary();

    SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true);
    FileInfoDescriptor fid = dd.getFileInfoDescriptor(sd,sqlName);
    if (fid == null)
      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

    FileResource fr = af.getTransaction(ddc.getContextManager()).getFileHandler();

    String externalName = org.apache.derby.impl.sql.execute.JarDDL.mkExternalName(schemaName, sqlName, fr.getSeparatorChar());

    Object f = fr.getAsFile(externalName, generationId);
    if (f instanceof java.io.File)
View Full Code Here

            throws StandardException
  {
    if ( dataDictionary == null )
      {
      ContextManager        cm  = ContextService.getFactory().getCurrentContextManager();
      DataDictionaryContext    ddc = (DataDictionaryContext)
                                    (cm.getContext(DataDictionaryContext.CONTEXT_ID));
      dataDictionary = ddc.getDataDictionary();
    }
    return  dataDictionary;
  }
View Full Code Here

        return convertIdentifierCase( SchemaDescriptor.STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAME);
    }

  public DataDictionary getDataDictionary()
  {
    DataDictionaryContext ddc =
      (DataDictionaryContext) getContextManager().getContext(DataDictionaryContext.CONTEXT_ID);

    if (ddc != null)
    {
      return ddc.getDataDictionary();
    }
    else
    {
      return null;
    }
View Full Code Here

   */
  private DataDictionary getDataDictionary()
  {
    if (dataDictionary == null)
    {
      DataDictionaryContext    ddc;
     
      ddc = (DataDictionaryContext)
            (ContextService.getContext(DataDictionaryContext.CONTEXT_ID));


      dataDictionary = ddc.getDataDictionary();
    }

    return dataDictionary;
  }
View Full Code Here

        return convertIdentifierCase( SchemaDescriptor.STD_DECLARED_GLOBAL_TEMPORARY_TABLES_SCHEMA_NAME);
    }

  public DataDictionary getDataDictionary()
  {
    DataDictionaryContext ddc =
      (DataDictionaryContext) getContextManager().getContext(DataDictionaryContext.CONTEXT_ID);

    if (ddc != null)
    {
      return ddc.getDataDictionary();
    }
    else
    {
      return null;
    }
View Full Code Here

      // parse it when it is set to ensure only valid values
      // are written to the actual conglomerate.
      dbcp = IdUtil.parseDbClassPath(newClasspath, normalizeToUpper);
    }

    DataDictionaryContext ddc =
      (DataDictionaryContext)ContextService.getContext(DataDictionaryContext.CONTEXT_ID);
    if (SanityManager.DEBUG)
      if (ddc == null) SanityManager.THROWASSERT("Class path change with no connection");
    DataDictionary dd = ddc.getDataDictionary();

    //
    //Verify that all jar files on the database classpath are in the data dictionary.
    if (dbcp != null)
    {
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.DataDictionaryContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.