Package org.hsqldb.lib

Examples of org.hsqldb.lib.HashMap$KeySet


  private static synchronized Database getDatabaseObject(String paramString1, String paramString2, HsqlProperties paramHsqlProperties)
    throws HsqlException
  {
    String str = paramString2;
    HashMap localHashMap;
    if (paramString1 == "file:")
    {
      localHashMap = fileDatabaseMap;
      str = filePathToKey(paramString2);
    }
    else if (paramString1 == "res:")
    {
      localHashMap = resDatabaseMap;
    }
    else if (paramString1 == "mem:")
    {
      localHashMap = memDatabaseMap;
    }
    else
    {
      throw Trace.runtimeError(201, "DatabaseManager.getDatabaseObject");
    }
    Database localDatabase = (Database)localHashMap.get(str);
    if (localDatabase == null)
    {
      localDatabase = new Database(paramString1, paramString2, paramString1 + str, paramHsqlProperties);
      localDatabase.databaseID = dbIDCounter;
      databaseIDMap.put(dbIDCounter, localDatabase);
      dbIDCounter += 1;
      localHashMap.put(str, localDatabase);
    }
    return localDatabase;
  }
View Full Code Here


  private static synchronized Database lookupDatabaseObject(String paramString1, String paramString2)
    throws HsqlException
  {
    String str = paramString2;
    HashMap localHashMap;
    if (paramString1 == "file:")
    {
      localHashMap = fileDatabaseMap;
      str = filePathToKey(paramString2);
    }
    else if (paramString1 == "res:")
    {
      localHashMap = resDatabaseMap;
    }
    else if (paramString1 == "mem:")
    {
      localHashMap = memDatabaseMap;
    }
    else
    {
      throw Trace.runtimeError(201, "DatabaseManager.lookupDatabaseObject()");
    }
    return (Database)localHashMap.get(str);
  }
View Full Code Here

  private static synchronized void addDatabaseObject(String paramString1, String paramString2, Database paramDatabase)
    throws HsqlException
  {
    String str = paramString2;
    HashMap localHashMap;
    if (paramString1 == "file:")
    {
      localHashMap = fileDatabaseMap;
      str = filePathToKey(paramString2);
    }
    else if (paramString1 == "res:")
    {
      localHashMap = resDatabaseMap;
    }
    else if (paramString1 == "mem:")
    {
      localHashMap = memDatabaseMap;
    }
    else
    {
      throw Trace.runtimeError(201, "DatabaseManager.addDatabaseObject()");
    }
    databaseIDMap.put(paramDatabase.databaseID, paramDatabase);
    localHashMap.put(str, paramDatabase);
  }
View Full Code Here

    int i = paramDatabase.databaseID;
    String str1 = paramDatabase.getType();
    String str2 = paramDatabase.getPath();
    Object localObject1 = str2;
    notifyServers(paramDatabase);
    HashMap localHashMap;
    if (str1 == "file:")
    {
      localHashMap = fileDatabaseMap;
      try
      {
        localObject1 = filePathToKey(str2);
      }
      catch (HsqlException localHsqlException)
      {
        Iterator localIterator = localHashMap.keySet().iterator();
        Object localObject2 = null;
        while (localIterator.hasNext())
        {
          Object localObject3 = localIterator.next();
          if (localHashMap.get(localObject3) != paramDatabase)
            continue;
          localObject2 = localObject3;
        }
        if (localObject2 != null)
          localObject1 = localObject2;
      }
    }
    else if (str1 == "res:")
    {
      localHashMap = resDatabaseMap;
    }
    else if (str1 == "mem:")
    {
      localHashMap = memDatabaseMap;
    }
    else
    {
      throw Trace.runtimeError(201, "DatabaseManager.lookupDatabaseObject()");
    }
    databaseIDMap.remove(i);
    localHashMap.remove(localObject1);
    if (databaseIDMap.isEmpty())
      ValuePool.resetPool();
  }
View Full Code Here

  static final String prefix = "org.hsqldb.Library.";
  static final int prefixLength;

  static HashMap getAliasMap()
  {
    HashMap localHashMap = new HashMap(83, 1.0F);
    register(localHashMap, sNumeric);
    register(localHashMap, sString);
    register(localHashMap, sTimeDate);
    register(localHashMap, sSystem);
    return localHashMap;
View Full Code Here

      str1 = (String)localIterator.next();
      if ("DBA".equals(str1))
        continue;
      addRow(localResult, "CREATE ROLE " + str1);
    }
    HashMap localHashMap1 = paramDatabase.getAliasMap();
    HashMap localHashMap2 = Library.getAliasMap();
    localIterator = localHashMap1.keySet().iterator();
    String str4;
    while (localIterator.hasNext())
    {
      String str2 = (String)localIterator.next();
      String str3 = (String)localHashMap1.get(str2);
      str4 = (String)localHashMap2.get(str2);
      if ((str4 != null) && (str4.equals(str3)))
        continue;
      StringBuffer localStringBuffer = new StringBuffer(64);
      localStringBuffer.append("CREATE").append(' ').append("ALIAS").append(' ');
      localStringBuffer.append(str2);
View Full Code Here

TOP

Related Classes of org.hsqldb.lib.HashMap$KeySet

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.