Package org.apache.derby.iapi.db

Examples of org.apache.derby.iapi.db.DatabaseContext


        // See LanguageConnectionFactory.
        private LocaleFinder getLocaleFinder()
        {
                if (localeFinder == null)
                {
                        DatabaseContext dc = (DatabaseContext) ContextService.getContext(DatabaseContext.CONTEXT_ID);
                        if( dc != null)
                            localeFinder = dc.getDatabase();
                }

                return localeFinder;
        }
View Full Code Here


  public void pushDbContext(ContextManager cm)
  {
    /* We cache the locale in the DatabaseContext
     * so that the Datatypes can get to it easily.
     */
    DatabaseContext dc = new DatabaseContextImpl(cm, this);
  }
View Full Code Here

        // See LanguageConnectionFactory.
        private LocaleFinder getLocaleFinder()
        {
                if (localeFinder == null)
                {
                        DatabaseContext dc = (DatabaseContext) ContextService.getContext(DatabaseContext.CONTEXT_ID);
                        if( dc != null)
                            localeFinder = dc.getDatabase();
                }

                return localeFinder;
        }
View Full Code Here

        // This is not very satisfactory, as it creates a dependency on
        // the DatabaseContext. It's the best I could do on short notice,
        // though.  -  Jeff
        if (localeFinder == null)
        {
            DatabaseContext dc = (DatabaseContext)
                ContextService.getContext(DatabaseContext.CONTEXT_ID);
            if( dc != null)
                localeFinder = dc.getDatabase();
        }

        return localeFinder;
    }
View Full Code Here

  public void pushDbContext(ContextManager cm)
  {
    /* We cache the locale in the DatabaseContext
     * so that the Datatypes can get to it easily.
     */
    DatabaseContext dc = new DatabaseContextImpl(cm, this);
  }
View Full Code Here

    /**
     * Determines if the database being accessed is accessed in soft upgrade
     * mode or not.
     */
    private void determineMode() {
        DatabaseContext dbCtx = (DatabaseContext)
                ContextService.getContext(DatabaseContext.CONTEXT_ID);
        if (dbCtx == null) {
            throw new IllegalStateException("No context, unable to determine " +
                    "which stream header format to generate");
        } else {
            DataDictionary dd = dbCtx.getDatabase().getDataDictionary();
            try {
                inSoftUpgradeMode = Boolean.valueOf(!dd.checkVersion(
                        DataDictionary.DD_VERSION_DERBY_10_5, null));
            } catch (StandardException se) {
                // This should never happen as long as the second argument
View Full Code Here

  public void pushDbContext(ContextManager cm)
  {
    /* We cache the locale in the DatabaseContext
     * so that the Datatypes can get to it easily.
     */
    DatabaseContext dc = new DatabaseContextImpl(cm, this);
  }
View Full Code Here

  {
    restoreToNull();

    if (theValue != null)
    {
            DatabaseContext databaseContext = (DatabaseContext) ContextService.getContext(DatabaseContext.CONTEXT_ID);
            parseTimestamp( theValue,
                            false,
                            (databaseContext == null) ? null : databaseContext.getDatabase(),
                            (Calendar) null);
    }
    /* restoreToNull will have already set the encoded date to 0 (null value) */
  }
 
View Full Code Here

     * no context, the operation will fail.
     *
     * @throws IllegalStateException if there is no context
     */
    private void determineHeaderFormat() {
        DatabaseContext dbCtx = (DatabaseContext)
                ContextService.getContext(DatabaseContext.CONTEXT_ID);
        if (dbCtx == null) {
            throw new IllegalStateException("No context, unable to determine " +
                    "which stream header format to generate");
        } else {
            DataDictionary dd = dbCtx.getDatabase().getDataDictionary();
            try {
                isPreDerbyTenFive = Boolean.valueOf(!dd.checkVersion(
                        DataDictionary.DD_VERSION_DERBY_10_5, null));
            } catch (StandardException se) {
                // This should never happen as long as the second argument
View Full Code Here

      throws StandardException
  {
    restoreToNull();
    if (theValue != null)
        {
            DatabaseContext databaseContext = (DatabaseContext) ContextService.getContext(DatabaseContext.CONTEXT_ID);
            parseTime( theValue,
                       false,
                       (databaseContext == null) ? null : databaseContext.getDatabase(),
                       (Calendar) null);
        }
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.db.DatabaseContext

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.