|
Right Java tools. Open source and Enterprise.
|
com.acelet.opensource.globalEnvironment
Class GlobalLong
java.lang.Object
com.acelet.opensource.globalEnvironment.GlobalLong
- All Implemented Interfaces:
- java.io.Serializable
public class GlobalLong
- 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
|
|
Method Summary |
static void |
clear(java.sql.Connection connection)
|
static boolean |
containsKey(java.sql.Connection connection,
java.lang.String key)
|
static java.lang.Long |
get(java.sql.Connection connection,
java.lang.String key)
|
static int |
increase(java.sql.Connection connection,
java.lang.String key,
long 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.Long |
put(java.sql.Connection connection,
java.lang.String key,
long value)
|
static java.lang.Long |
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 |
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
GlobalLong
public GlobalLong()
GlobalLong
public GlobalLong(int queryTimeout)
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.Long 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,
long 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.Long put(java.sql.Connection connection,
java.lang.String key,
long value)
throws java.lang.Exception
- Throws:
java.lang.Exception
remove
public static java.lang.Long 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