org.apache.derby.iapi.db
Class PropertyInfo

java.lang.Object
  extended byorg.apache.derby.iapi.db.PropertyInfo

public final class PropertyInfo
extends java.lang.Object

PropertyInfo is a class with static methods that retrieve the properties associated with a table or index and set and retrieve properties associated with a database.

This class can only be used within an SQL-J statement, a Java procedure or a server side Java method.

This class can be accessed using the class alias PROPERTYINFO in SQL-J statements.

IBM Corp. reserves the right to change, rename, or remove this interface at any time.


Constructor Summary
private PropertyInfo()
          Internal use only.
 
Method Summary
private static java.util.Properties getConglomerateProperties(java.lang.String schemaName, java.lang.String conglomerateName, boolean isIndex)
          Get the Properties associated with a given conglomerate
static java.lang.String getDatabaseProperty(java.lang.String key)
          Fetch the value of a property of the database on the current connection.
static java.util.Properties getIndexProperties(java.lang.String schemaName, java.lang.String indexName)
          Get the Properties associated with a given index.
static java.util.Properties getTableProperties(java.lang.String schemaName, java.lang.String tableName)
          Get the Properties associated with a given table.
static void setDatabaseProperty(java.lang.String key, java.lang.String value)
          Set or delete the value of a property of the database on the current connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyInfo

private PropertyInfo()
Internal use only.

Method Detail

getTableProperties

public static java.util.Properties getTableProperties(java.lang.String schemaName,
                                                      java.lang.String tableName)
                                               throws java.sql.SQLException
Get the Properties associated with a given table.

Parameters:
schemaName - The name of the schema that the table is in.
tableName - The name of the table.
Returns:
Properties The Properties associated with the specified table. (An empty Properties is returned if the table does not exist.)
Throws:
java.sql.SQLException - on error

getIndexProperties

public static java.util.Properties getIndexProperties(java.lang.String schemaName,
                                                      java.lang.String indexName)
                                               throws java.sql.SQLException
Get the Properties associated with a given index.

Parameters:
schemaName - The name of the schema that the index is in.
indexName - The name of the index.
Returns:
Properties The Properties associated with the specified index. (An empty Properties is returned if the index does not exist.)
Throws:
java.sql.SQLException - on error

getDatabaseProperty

public static java.lang.String getDatabaseProperty(java.lang.String key)
                                            throws java.sql.SQLException
Fetch the value of a property of the database on the current connection.

Parameters:
key - the property key
Returns:
the value of the property or null if the property is not set.
Throws:
java.sql.SQLException - on error

setDatabaseProperty

public static void setDatabaseProperty(java.lang.String key,
                                       java.lang.String value)
                                throws java.sql.SQLException
Set or delete the value of a property of the database on the current connection.

Parameters:
key - the property key
value - the new value, if null the property is deleted.
Throws:
java.sql.SQLException - on error

getConglomerateProperties

private static java.util.Properties getConglomerateProperties(java.lang.String schemaName,
                                                              java.lang.String conglomerateName,
                                                              boolean isIndex)
                                                       throws java.sql.SQLException
Get the Properties associated with a given conglomerate

Parameters:
schemaName - The name of the schema that the conglomerate is in.
conglomerateName - The name of the conglomerate.
Returns:
Properties The Properties associated with the specified conglomerate. (An empty Properties is returned if the conglomerate does not exist.)
Throws:
java.sql.SQLException - on error

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.