|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.engine.ConnectionInfo
public class ConnectionInfo
Encapsulates the connection settings, including user name and password.
Constructor Summary | |
---|---|
ConnectionInfo(java.lang.String name)
Create a connection info object. |
|
ConnectionInfo(java.lang.String u,
java.util.Properties info)
Create a connection info object. |
Method Summary | |
---|---|
ConnectionInfo |
clone()
|
java.lang.String |
getName()
Get the unique and normalized database name (excluding settings). |
java.lang.String |
getOriginalURL()
Get the complete original database URL. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Get the value of the given property. |
java.lang.String |
getURL()
Get the database URL. |
java.lang.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(java.lang.String key,
boolean defaultValue)
Remove a boolean property if it is set and return the value. |
void |
setBaseDir(java.lang.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(java.lang.String url)
Set the original database URL. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Overwrite a property. |
void |
setServerKey(java.lang.String serverKey)
Switch to server mode, and set the server name and database key. |
void |
setUserName(java.lang.String name)
Overwrite the user name. |
void |
setUserPasswordHash(byte[] hash)
Set the user password hash. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionInfo(java.lang.String name)
name
- the database name (including tags), but without the
"jdbc:h2:" prefixpublic ConnectionInfo(java.lang.String u, java.util.Properties info)
u
- the database URL (must start with jdbc:h2:)info
- the connection propertiesMethod Detail |
---|
public ConnectionInfo clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void setBaseDir(java.lang.String dir)
dir
- the new base directorypublic boolean isRemote()
public boolean isPersistent()
public boolean removeProperty(java.lang.String key, boolean defaultValue)
key
- the property namedefaultValue
- the default value
public java.lang.String getName()
public java.lang.String getUserName()
public java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- the property keydefaultValue
- the default value
public void setUserName(java.lang.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(java.lang.String key, java.lang.String value)
key
- the property namevalue
- the valuepublic java.lang.String getURL()
public java.lang.String getOriginalURL()
public void setOriginalURL(java.lang.String url)
url
- the database urlpublic void setServerKey(java.lang.String serverKey)
serverKey
- the server name, '/', and the security key
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |