Class DatabaseURL
- java.lang.Object
-
- org.hsqldb.DatabaseURL
-
public class DatabaseURL extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringS_ALIASstatic java.lang.StringS_FILEstatic java.lang.StringS_HSQLstatic java.lang.StringS_HSQLSstatic java.lang.StringS_HTTPstatic java.lang.StringS_HTTPSstatic java.lang.StringS_MEMstatic java.lang.StringS_RESstatic java.lang.StringS_URL_INTERNALstatic java.lang.StringS_URL_PREFIXstatic java.lang.Stringurl_connection_typestatic java.lang.Stringurl_database
-
Constructor Summary
Constructors Constructor and Description DatabaseURL()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleanisFileBasedDatabaseType(java.lang.String type)Returns true if type represents an in-process connection to a file backed database.static booleanisInProcessDatabaseType(java.lang.String type)Returns true if type represents an in-process connection to database.static HsqlPropertiesparseURL(java.lang.String url, boolean hasPrefix, boolean noPath)Parses the url into components that are returned in a properties object.
-
-
-
Field Detail
-
S_MEM
public static final java.lang.String S_MEM
- See Also:
- Constant Field Values
-
S_FILE
public static final java.lang.String S_FILE
- See Also:
- Constant Field Values
-
S_RES
public static final java.lang.String S_RES
- See Also:
- Constant Field Values
-
S_ALIAS
public static final java.lang.String S_ALIAS
- See Also:
- Constant Field Values
-
S_HSQL
public static final java.lang.String S_HSQL
- See Also:
- Constant Field Values
-
S_HSQLS
public static final java.lang.String S_HSQLS
- See Also:
- Constant Field Values
-
S_HTTP
public static final java.lang.String S_HTTP
- See Also:
- Constant Field Values
-
S_HTTPS
public static final java.lang.String S_HTTPS
- See Also:
- Constant Field Values
-
S_URL_PREFIX
public static final java.lang.String S_URL_PREFIX
- See Also:
- Constant Field Values
-
S_URL_INTERNAL
public static final java.lang.String S_URL_INTERNAL
- See Also:
- Constant Field Values
-
url_connection_type
public static final java.lang.String url_connection_type
- See Also:
- Constant Field Values
-
url_database
public static final java.lang.String url_database
- See Also:
- Constant Field Values
-
-
Method Detail
-
isFileBasedDatabaseType
public static boolean isFileBasedDatabaseType(java.lang.String type)
Returns true if type represents an in-process connection to a file backed database.
-
isInProcessDatabaseType
public static boolean isInProcessDatabaseType(java.lang.String type)
Returns true if type represents an in-process connection to database.
-
parseURL
public static HsqlProperties parseURL(java.lang.String url, boolean hasPrefix, boolean noPath)
Parses the url into components that are returned in a properties object.The following components are isolated:
- url: the original url
connection_type: a static string that indicate the protocol. If the url does not begin with a valid protocol, null is returned by this method instead of the properties object.
host: name of host in networked modes in lowercase
port: port number in networked mode, or 0 if not present
path: path of the resource on server in networked modes, minimum (slash) with path elements appended apart from servlet path which is (slash) plus the name of the servlet
database: database name. For memory, networked modes, this is returned in lowercase, for file: and res: databases the original case of characters is preserved. Returns empty string if name is not present in the url.
for each protocol if port number is not in the url
Additional connection properties specified as key/value pairs.
- Parameters:
url- StringhasPrefix- indicates URL prefix is presentnoPath- indicates empty path and verbatim use of path elements as database- Returns:
- null returned if the part that should represent the port is not an integer or the part for database name is empty. Empty HsqlProperties returned if if url does not begin with valid protocol and could refer to another JDBC driver.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG