Top Description Fields Constructors Methods
org.h2.server.web

public Class ConnectionInfo

extends Object
implements Comparable<ConnectionInfo>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
org.h2.util.StringUtils

The connection info object is a wrapper for database connection information such as the database URL, user name and password. This class is used by the H2 Console.

Field Summary

Modifier and TypeField and Description
public String
driver

The driver class name.

pack-priv int
lastAccess

The last time this connection was used.

pack-priv String
name

The connection display name.

public String
url

The database URL.

public String
user

The user name.

Constructor Summary

AccessConstructor and Description
pack-priv
public

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(ConnectionInfo
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

private static String
get(String[] array, int i)

pack-priv String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

driverback to summary
public String driver

The driver class name.

lastAccessback to summary
pack-priv int lastAccess

The last time this connection was used.

nameback to summary
pack-priv String name

The connection display name.

urlback to summary
public String url

The database URL.

userback to summary
public String user

The user name.

Constructor Detail

ConnectionInfoback to summary
pack-priv ConnectionInfo()
ConnectionInfoback to summary
public ConnectionInfo(String data)

Method Detail

compareToback to summary
public int compareTo(ConnectionInfo o)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
o:ConnectionInfo

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
getback to summary
private static String get(String[] array, int i)
getStringback to summary
pack-priv String getString()