Right Java tools. Open source and Enterprise.
|Home | Products | Documents | Downloads | Purchase | Support | Company | Partners | Contact |

com.acelet.opensource.globalEnvironment
Class GlobalDouble

java.lang.Object
  extended by com.acelet.opensource.globalEnvironment.GlobalDouble
All Implemented Interfaces:
java.io.Serializable

public class GlobalDouble
extends java.lang.Object
implements java.io.Serializable

Version:
1.00, 2001.05.15
Author:
Wei Jiang Contributors:

See Also:
GlobalProperties, Serialized Form

Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
GlobalDouble()
           
GlobalDouble(int queryTimeout)
           
 
Method Summary
static void clear(java.sql.Connection connection)
           
static boolean containsKey(java.sql.Connection connection, java.lang.String key)
           
static java.lang.Double get(java.sql.Connection connection, java.lang.String key)
           
static int increase(java.sql.Connection connection, java.lang.String key, double increaseValue)
          Find a property and increase its value.
static boolean isEmpty(java.sql.Connection connection)
           
static java.util.Enumeration keys(java.sql.Connection connection)
           
static void main(java.lang.String[] args)
           
static java.lang.Double put(java.sql.Connection connection, java.lang.String key, double value)
           
static java.lang.Double remove(java.sql.Connection connection, java.lang.String key)
           
static int size(java.sql.Connection connection)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

GlobalDouble

public GlobalDouble()

GlobalDouble

public GlobalDouble(int queryTimeout)
Method Detail

clear

public static void clear(java.sql.Connection connection)
                  throws java.lang.Exception
Throws:
java.lang.Exception

containsKey

public static boolean containsKey(java.sql.Connection connection,
                                  java.lang.String key)
                           throws java.lang.Exception
Throws:
java.lang.Exception

get

public static java.lang.Double get(java.sql.Connection connection,
                                   java.lang.String key)
                            throws java.lang.Exception
Throws:
java.lang.Exception

increase

public static int increase(java.sql.Connection connection,
                           java.lang.String key,
                           double increaseValue)
                    throws java.lang.Exception
Find a property and increase its value. It is thread safe.

Parameters:
key - the property key.
increaseValue - the amount of increaseing. It can be positive, negative or zero.
Returns:
number of rows updated.
0 - no such key.
1 - succeed.
other - more than one row with that key exist that indicates the database setting is wrong: key is not unique or not case sensitive.
Throws:
java.lang.Exception

isEmpty

public static boolean isEmpty(java.sql.Connection connection)
                       throws java.lang.Exception
Throws:
java.lang.Exception

keys

public static java.util.Enumeration keys(java.sql.Connection connection)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

put

public static java.lang.Double put(java.sql.Connection connection,
                                   java.lang.String key,
                                   double value)
                            throws java.lang.Exception
Throws:
java.lang.Exception

remove

public static java.lang.Double remove(java.sql.Connection connection,
                                      java.lang.String key)
                               throws java.lang.Exception
Throws:
java.lang.Exception

size

public static int size(java.sql.Connection connection)
                throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Copyright Acelet Corporation. 2000-2008. All rights reserved.