Package org.apache.derby.impl.sql.execute

Examples of org.apache.derby.impl.sql.execute.AutoincrementCounter


    if (autoincrementCacheHashtable == null)
    {
      autoincrementCacheHashtable = new HashMap();
    }

    AutoincrementCounter aic =
      (AutoincrementCounter)autoincrementCacheHashtable.get(key);
    if (aic != null)
    {
      if (SanityManager.DEBUG)     
      {
        SanityManager.THROWASSERT(
                "Autoincrement Counter already exists:" + key);
      }
      return;
    }
   
    aic = new AutoincrementCounter(initialValue,
                     increment, 0, s, t, c, position);
    autoincrementCacheHashtable.put(key, aic);
  }
View Full Code Here


      throws StandardException              
  {
    String key = AutoincrementCounter.makeIdentity(schemaName,tableName,
                             columnName);
   
    AutoincrementCounter aic =
      (AutoincrementCounter)autoincrementCacheHashtable.get(key);

    if (aic == null)
    {
      if (SanityManager.DEBUG)     
      {
        SanityManager.THROWASSERT("counter doesn't exist:" + key);
      }
      return 0;
    }
    else
    {
      return aic.update();
    }
  }
View Full Code Here

    DataDictionary dd = getDataDictionary();
    for (Iterator it = autoincrementCacheHashtable.keySet().iterator();
       it.hasNext(); )
    {
      Object key = it.next();
      AutoincrementCounter aic =
        (AutoincrementCounter)autoincrementCacheHashtable.get(key);
      Long value = aic.getCurrentValue();
      aic.flushToDisk(getTransactionExecute(), dd, tableUUID);
      if (value != null)
      {
        autoincrementHT.put(key, value);
      }
    }
View Full Code Here

        if (autoincrementCacheHashtable == null)
        {
            autoincrementCacheHashtable = new HashMap();
        }

        AutoincrementCounter aic =
            (AutoincrementCounter)autoincrementCacheHashtable.get(key);
        if (aic != null)
        {
            if (SanityManager.DEBUG)           
            {
                SanityManager.THROWASSERT(
                              "Autoincrement Counter already exists:" + key);
            }
            return;
        }
       
        aic = new AutoincrementCounter(initialValue,
                                       increment, 0, s, t, c, position);
        autoincrementCacheHashtable.put(key, aic);
    }
View Full Code Here

            throws StandardException                          
    {
        String key = AutoincrementCounter.makeIdentity(schemaName,tableName,
                                                       columnName);
       
        AutoincrementCounter aic =
            (AutoincrementCounter)autoincrementCacheHashtable.get(key);

        if (aic == null)
        {
            if (SanityManager.DEBUG)           
            {
                SanityManager.THROWASSERT("counter doesn't exist:" + key);
            }
            return 0;
        }
        else
        {
            return aic.update();
        }
    }
View Full Code Here

        DataDictionary dd = getDataDictionary();
        for (Iterator it = autoincrementCacheHashtable.keySet().iterator();
             it.hasNext(); )
        {
            Object key = it.next();
            AutoincrementCounter aic =
                (AutoincrementCounter)autoincrementCacheHashtable.get(key);
            Long value = aic.getCurrentValue();
            aic.flushToDisk(getTransactionExecute(), dd, tableUUID);
            if (value != null)
            {
                autoincrementHT.put(key, value);
            }
        }
View Full Code Here

    if (autoincrementCacheHashtable == null)
    {
      autoincrementCacheHashtable = new Hashtable();
    }

    AutoincrementCounter aic =
      (AutoincrementCounter)autoincrementCacheHashtable.get(key);
    if (aic != null)
    {
      if (SanityManager.DEBUG)     
      {
        SanityManager.THROWASSERT(
                "Autoincrement Counter already exists:" + key);
      }
      return;
    }
   
    aic = new AutoincrementCounter(initialValue,
                     increment, 0, s, t, c, position);
    autoincrementCacheHashtable.put(key, aic);
  }
View Full Code Here

      throws StandardException              
  {
    String key = AutoincrementCounter.makeIdentity(schemaName,tableName,
                             columnName);
   
    AutoincrementCounter aic =
      (AutoincrementCounter)autoincrementCacheHashtable.get(key);

    if (aic == null)
    {
      if (SanityManager.DEBUG)     
      {
        SanityManager.THROWASSERT("counter doesn't exist:" + key);
      }
      return 0;
    }
    else
    {
      return aic.update();
    }
  }
View Full Code Here

    DataDictionary dd = getDataDictionary();
    for (Enumeration e = autoincrementCacheHashtable.keys();
       e.hasMoreElements(); )
    {
      Object key = e.nextElement();
      AutoincrementCounter aic =
        (AutoincrementCounter)autoincrementCacheHashtable.get(key);
      Long value = aic.getCurrentValue();
      aic.flushToDisk(getTransactionExecute(), dd, tableUUID);
      if (value != null)
      {
        autoincrementHT.put(key, value);
      }
    }
View Full Code Here

    if (autoincrementCacheHashtable == null)
    {
      autoincrementCacheHashtable = new HashMap();
    }

    AutoincrementCounter aic =
      (AutoincrementCounter)autoincrementCacheHashtable.get(key);
    if (aic != null)
    {
      if (SanityManager.DEBUG)     
      {
        SanityManager.THROWASSERT(
                "Autoincrement Counter already exists:" + key);
      }
      return;
    }
   
    aic = new AutoincrementCounter(initialValue,
                     increment, 0, s, t, c, position);
    autoincrementCacheHashtable.put(key, aic);
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.impl.sql.execute.AutoincrementCounter

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.