| java.lang.Object org.mandarax.jdbc.JDBCUtils
JDBCUtils | public class JDBCUtils implements LogCategories(Code) | | Some utilities. This class in in particular used to support the migration from
mandarax 2.0 to mandarax 3.0. Some functions implemented here (e.g., gathering
predicates) will later be provided by other classes (a meta object attached to
the knowledge base)
author: Jens Dietrich version: 3.3.2 <29 December 2004> since: 3.0 |
URL_NET_PREFIX | final public static String URL_NET_PREFIX(Code) | | |
getClassName | public static Class getClassName(int type)(Code) | | Specifies the class name whose instances are returned.
See Also: java.sql.Types Parameters: type - an SQL type a java class |
getSQLTypeName | public static String getSQLTypeName(Class jtype)(Code) | | Specifies the SQL type name associated with a java type.
See Also: java.sql.Types Parameters: jtype - a java type an SQL type name |
getSQLTypeName | public static String getSQLTypeName(int type)(Code) | | Specifies the SQL type name associated with a java type.
See Also: java.sql.Types Parameters: type - an SQL type an SQL type name |
getServerPart | public static String getServerPart(String url)(Code) | | Get the server address from a mandarax jdbc net url.
Parameters: url - a URL a server url |
getTypeMapping | public static int getTypeMapping(Class jtype)(Code) | | Specifies the SQL type associated with a java type.
See Also: java.sql.Types Parameters: jtype - a java type SQL type from java.sql.Types |
notSupported | public static void notSupported(String methodName, Object obj)(Code) | | Log a call of an unsupported method.
Parameters: methodName - the name of the method Parameters: obj - the object that received the method |
notSupportedThrowException | public static void notSupportedThrowException(String methodName, Object obj) throws SQLException(Code) | | Log a call of an unsupported method.
This call throws an exception.
Parameters: methodName - the name of the method Parameters: obj - the object that received the method |
parseNetUrl | public static String[] parseNetUrl(String url)(Code) | | Split a mandarax jdbc net driver url in three parts:
- a local protocol name (zkb, ruleml, ref, xkb)
- a local path
- a server name
E.g., running this method with "jdbc.mandarax.net:ref:mypackage.myserver@http://localhost:8080/mandaraxjdbc"
yields {ref,mypackage.myserver,http://localhost:8080/mandaraxjdbc}
Parameters: url - a url an array containing three strings, or null indicating that the url is not a mandarax jdbc net url |
split | public static String[] split(String txt, String sep)(Code) | | Split a string. E.g., calling this method with "23"+"54","+" yields {"23","54"}
Parameters: txt - a string Parameters: sep - a separator an array of two strings or null if the separator has not be found |
|
|