Constructor and Description |
---|
ConnectionInfo(String name)
Create a connection info object.
|
ConnectionInfo(String u,
Properties info)
Create a connection info object.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
String |
getName()
Get the unique and normalized database name (excluding settings).
|
String |
getOriginalURL()
Get the complete original database URL.
|
String |
getProperty(String key,
String defaultValue)
Get the value of the given property.
|
String |
getURL()
Get the database URL.
|
String |
getUserName()
Get the name of the user.
|
boolean |
isPersistent()
Check if the referenced database is persistent.
|
boolean |
isRemote()
Check if this is a remote connection.
|
boolean |
removeProperty(String key,
boolean defaultValue)
Remove a boolean property if it is set and return the value.
|
void |
setBaseDir(String dir)
Set the base directory of persistent databases, unless the database is in
the user home folder (~).
|
void |
setFilePasswordHash(byte[] hash)
Set the file password hash.
|
void |
setOriginalURL(String url)
Set the original database URL.
|
void |
setProperty(String key,
String value)
Overwrite a property.
|
void |
setServerKey(String serverKey)
Switch to server mode, and set the server name and database key.
|
void |
setUserName(String name)
Overwrite the user name.
|
void |
setUserPasswordHash(byte[] hash)
Set the user password hash.
|
public ConnectionInfo(String name)
name
- the database name (including tags), but without the
"jdbc:h2:" prefixpublic ConnectionInfo(String u, Properties info)
u
- the database URL (must start with jdbc:h2:)info
- the connection propertiespublic Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public void setBaseDir(String dir)
dir
- the new base directorypublic boolean isRemote()
public boolean isPersistent()
public boolean removeProperty(String key, boolean defaultValue)
key
- the property namedefaultValue
- the default valuepublic String getName()
public String getUserName()
public String getProperty(String key, String defaultValue)
key
- the property keydefaultValue
- the default valuepublic void setUserName(String name)
name
- the user namepublic void setUserPasswordHash(byte[] hash)
hash
- the new hash valuepublic void setFilePasswordHash(byte[] hash)
hash
- the new hash valuepublic void setProperty(String key, String value)
key
- the property namevalue
- the valuepublic String getURL()
public String getOriginalURL()
public void setOriginalURL(String url)
url
- the database urlpublic void setServerKey(String serverKey)
serverKey
- the server name, '/', and the security keyCopyright © 2012 JBoss by Red Hat. All Rights Reserved.