|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.postgresql.pljava.management.Commands
public class Commands
This methods of this class are implementations of SQLJ commands.
SELECT sqlj.install_jar(<jar_url>, <jar_name>, <deploy>);
jar_url The URL that denotes the location of the jar that should be loaded jar_name This is the name by which this jar can be referenced once it has been loaded deploy True if the jar should be deployed according to a deployment descriptor
, false otherwise
SELECT sqlj.install_jar(<jar_image>, <jar_name>, <deploy>);
jar_image The byte array that constitutes the contents of the jar that should be loaded jar_name This is the name by which this jar can be referenced once it has been loaded deploy True if the jar should be deployed according to a deployment descriptor
, false otherwise
SELECT sqlj.replace_jar(<jar_url>, <jar_name>, <redeploy>);
jar_url The URL that denotes the location of the jar that should be loaded jar_name The name of the jar to be replaced redeploy True if the old and new jar should be undeployed and deployed according to their respective deployment descriptors
, false otherwise
SELECT sqlj.replace_jar(<jar_image>, <jar_name>, <redeploy>);
jar_image The byte array that constitutes the contents of the jar that should be loaded jar_name The name of the jar to be replaced redeploy True if the old and new jar should be undeployed and deployed according to their respective deployment descriptors
, false otherwise
SELECT sqlj.remove_jar(<jar_name>, <undeploy>);
jar_name The name of the jar to be removed undeploy True if the jar should be undeployed according to its deployment descriptor
, false otherwise
SELECT sqlj.get_classpath(<schema>);
schema The name of the schema
SELECT sqlj.set_classpath(<schema>, <classpath>);
schema The name of the schema classpath The colon separated list of jar names
SELECT sqlj.add_type_mapping(<sqlTypeName>, <className>);
sqlTypeName The name of the SQL composite type. The name can be qualified with a schema (namespace). If the schema is omitted, it will be resolved according to the current setting of the search_path. className The name of the class. The class must be found in the classpath in effect for the current schema
SELECT sqlj.drop_type_mapping(<sqlTypeName>);
sqlTypeName The name of the SQL composite type. The name can be qualified with a schema (namespace). If the schema is omitted, it will be resolved according to the current setting of the search_path.
Constructor Summary | |
---|---|
Commands()
|
Method Summary | |
---|---|
static void |
addClassImages(int jarId,
InputStream urlStream)
Reads the jar found at the specified URL and stores the entries in the jar_entry table. |
static void |
addTypeMapping(String sqlTypeName,
String javaClassName)
Defines the mapping between a composite type and a Java class. |
static void |
dropTypeMapping(String sqlTypeName)
Drops the mapping between a composite type and a Java class. |
static String |
getClassPath(String schemaName)
Return the classpath that has been defined for the schema named schemaName This method is exposed in SQL as
sqlj.get_classpath(VARCHAR) . |
static String |
getCurrentSchema()
|
static void |
installJar(byte[] image,
String jarName,
boolean deploy)
Installs a new Jar in the database jar repository under name jarName . |
static void |
installJar(String urlString,
String jarName,
boolean deploy)
Installs a new Jar in the database jar repository under name jarName . |
static void |
removeJar(String jarName,
boolean undeploy)
Removes the jar named jarName from the database jar
repository. |
static void |
replaceJar(byte[] jarImage,
String jarName,
boolean redeploy)
Replaces the image of jar named jarName in the database
jar repository. |
static void |
replaceJar(String urlString,
String jarName,
boolean redeploy)
Replaces the image of jar named jarName in the database
jar repository. |
static void |
setClassPath(String schemaName,
String path)
Define the class path to use for Java functions, triggers, and procedures that are created in the schema named schemaName This
method is exposed in SQL as
sqlj.set_classpath(VARCHAR, VARCHAR) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Commands()
Method Detail |
---|
public static void addClassImages(int jarId, InputStream urlStream) throws SQLException
jarId
- The id used for the foreign key to the jar_repository tableurlStream
- The URL
SQLException
public static void addTypeMapping(String sqlTypeName, String javaClassName) throws SQLException
sqlTypeName
- The name of the SQL composite type. The name can be
qualified with a schema (namespace). If the schema is omitted,
it will be resolved according to the current setting of the
search_path
.javaClassName
- The name of the class. The class must be found in
the classpath in effect for the current schema
SQLException
public static void dropTypeMapping(String sqlTypeName) throws SQLException
sqlTypeName
- The name of the SQL composite type. The name can be
qualified with a schema (namespace). If the schema is omitted,
it will be resolved according to the current setting of the
search_path
.
SQLException
public static String getClassPath(String schemaName) throws SQLException
schemaName
This method is exposed in SQL as
sqlj.get_classpath(VARCHAR)
.
schemaName
- Name of the schema for which this path is valid.
null
if this schema has
no classpath.
SQLException
public static String getCurrentSchema() throws SQLException
SQLException
public static void installJar(byte[] image, String jarName, boolean deploy) throws SQLException
jarName
. Once installed classpaths can be defined that
refrences this jar. This method is exposed in SQL as
sqlj.install_jar(BYTEA, VARCHAR, BOOLEAN)
.
image
- The byte array that constitutes the jar content.jarName
- The name by which the system will refer to this jar.deploy
- If set, execute install commands found in the deployment
descriptor.
SQLException
- if the jarName
contains characters
that are invalid or if the named jar already exists in the
system.setClassPath(java.lang.String, java.lang.String)
public static void installJar(String urlString, String jarName, boolean deploy) throws SQLException
jarName
. Once installed classpaths can be defined that
refrences this jar. This method is exposed in SQL as
sqlj.install_jar(VARCHAR, VARCHAR, BOOLEAN)
.
urlString
- The location of the jar that will be installed.jarName
- The name by which the system will refer to this jar.deploy
- If set, execute install commands found in the deployment
descriptor.
SQLException
- if the jarName
contains characters
that are invalid or if the named jar already exists in the
system.setClassPath(java.lang.String, java.lang.String)
public static void removeJar(String jarName, boolean undeploy) throws SQLException
jarName
from the database jar
repository. Class path entries that references this jar will also be
removed (just the entry, not the whole path). This method is exposed in
SQL as sqlj.remove_jar(VARCHAR, BOOLEAN)
.
jarName
- The name by which the system referes this jar.undeploy
- If set, execute remove commands found in the deployment
descriptor of the jar.
SQLException
- if the named jar cannot be found in the repository.public static void replaceJar(byte[] jarImage, String jarName, boolean redeploy) throws SQLException
jarName
in the database
jar repository. This method is exposed in SQL as
sqlj.replace_jar(BYTEA, VARCHAR, BOOLEAN)
.
jarImage
- The byte array that constitutes the jar content.jarName
- The name by which the system referes this jar.redeploy
- If set, execute remove commands found in the deployment
descriptor of the old jar and install commands found in the
deployment descriptor of the new jar.
SQLException
- if the named jar cannot be found in the repository.public static void replaceJar(String urlString, String jarName, boolean redeploy) throws SQLException
jarName
in the database
jar repository. This method is exposed in SQL as
sqlj.replace_jar(VARCHAR, VARCHAR, BOOLEAN)
.
urlString
- The location of the jar that will be installed.jarName
- The name by which the system referes this jar.redeploy
- If set, execute remove commands found in the deployment
descriptor of the old jar and install commands found in the
deployment descriptor of the new jar.
SQLException
- if the named jar cannot be found in the repository.public static void setClassPath(String schemaName, String path) throws SQLException
schemaName
This
method is exposed in SQL as
sqlj.set_classpath(VARCHAR, VARCHAR)
.
schemaName
- Name of the schema for which this path is valid.path
- Colon separated list of names. Each name must denote the name
of a jar that is present in the jar repository.
SQLException
- If no schema can be found with the givene name, or
if one or several names of the path denotes a nonexistant jar
file.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |