Top Description Fields Constructors Methods
org.apache.derby.catalog

public Class Java5SystemProcedures

extends Object
Class Inheritance
Imports
java.sql.SQLException, org.apache.derby.iapi.sql.dictionary.OptionalTool, org.apache.derby.shared.common.error.PublicAPI, .StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.Context, .ContextService, org.apache.derby.iapi.services.loader.ClassFactory, .ClassFactoryContext

System procedures which run only on Java 5 or higher.

Field Summary

Modifier and TypeField and Description
private static final String
CUSTOM_TOOL_CLASS_NAME

Generic name for all user-supplied tools: the first optional arg is the tool class name

private static final String[][]
OPTIONAL_TOOLS

Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOL

private static final int
private static final int
TOOL_NAME

Offsets into arrays in OPTIONAL_TOOLS

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static StandardException
badCustomTool(String className)

private static StandardException
badTool(String toolName)

private static String
findToolClassName(String toolName, String... optionalArgs)

Lookup the class name corresponding to the name of an optional tool

private static Context
getContext(final String contextID)

Must be private so that user code can't call this entry point.

private static String[]
stripCustomClassName(String... optionalArgs)

For a custom tool, we strip the first arg from the list of optional args.

public static void
SYSCS_REGISTER_TOOL(String
Name of the tool package.
toolName
,
boolean
True if the package should be loaded, false otherwise.
register
,
String...
Tool-specific configuration parameters.
optionalArgs
)

Load or unload an optional tool package.

private static StandardException
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CUSTOM_TOOL_CLASS_NAMEback to summary
private static final String CUSTOM_TOOL_CLASS_NAME

Generic name for all user-supplied tools: the first optional arg is the tool class name

OPTIONAL_TOOLSback to summary
private static final String[][] OPTIONAL_TOOLS

Mapping of tool names to their implementing classes for use by SYSCS_REGISTER_TOOL

TOOL_CLASS_NAMEback to summary
private static final int TOOL_CLASS_NAME
TOOL_NAMEback to summary
private static final int TOOL_NAME

Offsets into arrays in OPTIONAL_TOOLS

Constructor Detail

Java5SystemProceduresback to summary
public Java5SystemProcedures()

Method Detail

badCustomToolback to summary
private static StandardException badCustomTool(String className)
badToolback to summary
private static StandardException badTool(String toolName)
findToolClassNameback to summary
private static String findToolClassName(String toolName, String... optionalArgs) throws StandardException

Lookup the class name corresponding to the name of an optional tool

getContextback to summary
private static Context getContext(final String contextID)

Must be private so that user code can't call this entry point.

stripCustomClassNameback to summary
private static String[] stripCustomClassName(String... optionalArgs)

For a custom tool, we strip the first arg from the list of optional args. By the time we get to this method, it has already been determined that there is at least one arg and it is the name of a class which implements OptionalTool.

SYSCS_REGISTER_TOOLback to summary
public static void SYSCS_REGISTER_TOOL(String toolName, boolean register, String... optionalArgs) throws SQLException

Load or unload an optional tool package. If the tool name is the special CUSTOM_TOOL_CLASS_NAME tool, then the first optionalArg is the name of a user-supplied class which implements OptionalTool.

Parameters
toolName:String

Name of the tool package.

register:boolean

True if the package should be loaded, false otherwise.

optionalArgs:String[]

Tool-specific configuration parameters.

Exceptions
SQLException:
on error
wrapback to summary
private static StandardException wrap(Throwable t)