Loader
Date: 2010-07-30

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.postgresql.pljava.sqlj
Class Loader

    java.lang.Object
      java.lang.ClassLoader
          org.postgresql.pljava.sqlj.Loader

    public class Loader

extends java.lang.ClassLoader

Method Summary
`static void` | `clearSchemaLoaders()` Removes all cached schema loaders, functions, and type maps.
`protected java.lang.Class` | `findClass(java.lang.String name)`
`protected java.net.URL` | `findResource(java.lang.String name)`
`protected java.util.Enumeration<java.net.URL>` | `findResources(java.lang.String name)`
`static java.lang.ClassLoader` | `getCurrentLoader()` Obtains the loader that is in effect for the current schema (i.e. the schema that is first in the search path).
`static java.lang.ClassLoader` | `getSchemaLoader(java.lang.String schemaName)` Obtain a loader that has been configured for the class path of the schema named `schemaName`.
`static java.util.Map` | `getTypeMap(java.lang.String schema)` Returns the SQL type `Oid` to Java `Class` map that contains the Java UDT mappings for the given `schema`.

Methods inherited from class java.lang.ClassLoader
`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### clearSchemaLoaders

    public static void clearSchemaLoaders()

  Removes all cached schema loaders, functions, and type maps. This method is called by the utility functions that manipulate the data that has been cached. It is not intended to be called from user code.

### getCurrentLoader

    public static java.lang.ClassLoader getCurrentLoader()
                                                  throws java.sql.SQLException

  Obtains the loader that is in effect for the current schema (i.e. the schema that is first in the search path).

  Returns:
    A loader
  Throws:
    `java.sql.SQLException`

### getSchemaLoader

    public static java.lang.ClassLoader getSchemaLoader(java.lang.String schemaName)
                                                 throws java.sql.SQLException

  Obtain a loader that has been configured for the class path of the schema named `schemaName`. Class paths are defined using the SQL procedure `sqlj.set_classpath`.

  Parameters:
    `schemaName` - The name of the schema.
  Returns:
    A loader.
  Throws:
    `java.sql.SQLException`

### getTypeMap

    public static java.util.Map getTypeMap(java.lang.String schema)
                                    throws java.sql.SQLException

  Returns the SQL type `Oid` to Java `Class` map that contains the Java UDT mappings for the given `schema`. This method is called by the function mapping mechanisms. Application code should never call this method.

  Parameters:
    `schema` - The schema
  Returns:
    The Map, possibly empty but never `null`.
  Throws:
    `java.sql.SQLException`

### findClass

    protected java.lang.Class findClass(java.lang.String name)
                                 throws java.lang.ClassNotFoundException

  Overrides:
    `findClass` in class `java.lang.ClassLoader`
  Throws:
    `java.lang.ClassNotFoundException`

### findResource

    protected java.net.URL findResource(java.lang.String name)

  Overrides:
    `findResource` in class `java.lang.ClassLoader`

### findResources

    protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name)
                                                         throws java.io.IOException

  Overrides:
    `findResources` in class `java.lang.ClassLoader`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003, 2004, 2005 TADA AB - Taby Sweden. \ Distributed under the terms shown in COPYRIGHT