| java.lang.Object org.hsqldb.DINameSpace
DINameSpace | final class DINameSpace (Code) | | Provides catalog and schema related definitions and functionality.
Additional features include accessibility tests, class loading, filtered
iteration and inverted alias mapping functionality regarding Java Classes
and Methods defined within the context of this database name space support
object.
author: boucherb@users version: 1.8.0 since: 1.7.2 |
Constructor Summary | |
public | DINameSpace(Database database) Constructs a new name space support object for the
specified Database object. |
Method Summary | |
void | addBuiltinToSet(HashSet set) Adds to the given Set the fully qualified names of the Class objects
internally granted to PUBLIC in support of core operation. | Class | classForMethodFQN(String fqn) Retrieves the declaring Class object for the specified
fully qualified method name, using (if possible) the classLoader
attribute of this object's database. | Class | classForName(String name) Retrieves the Class object specified by the
name argument, using, if possible, the
classLoader attribute of the database. | String | getCatalogName(Object o) Retrieves the name of the catalog corresponding to the indicated
object. | HashMap | getInverseAliasMap() Retrieves a map from each distinct value of this object's database
SQL routine CALL alias map to the list of keys in the input map
mapping to that value. | static String | getMethodFQN(Method m) Retrieves the fully qualified name of the given Method object. | static String | getMethodSpecificName(Method m) Retrieves the specific name of the given Method object. | String | getSchemaName(Object o) | static String | getSignature(Method method) | boolean | isBuiltin(Class clazz) Retrieves whether the indicated Class object is systematically
granted to PUBLIC in support of core operation. | boolean | isBuiltin(String name) Retrieves whether the Class object indicated by the fully qualified
class name is systematically granted to PUBLIC in support of
core operation. | boolean | isReportCatalogs() Retrieves whether this object is reporting catalog qualifiers. | Iterator | iterateAccessibleTriggerClassNames(User user) Retrieves an Iterator object describing the
fully qualified names of all Java Class objects
that are both trigger body implementations and that are accessible
(whose fire method can potentially be invoked) by actions upon this
object's database by the specified User . | Iterator | iterateAllAccessibleMethods(Session session, boolean andAliases) Retrieves a composite Iterator consisting of the elements
from
DINameSpace.iterateRoutineMethods for each Class granted to the
specified session. | Iterator | iterateCatalogNames() Retrieves an Iterator whose elements form the set of
distinct names of all visible catalogs, relative to this object's
database. | Iterator | iterateRoutineMethods(String className, boolean andAliases) Retrieves an Iterator object describing the Java
Method objects that are both the entry points
to executable SQL database objects (such as SQL functions and
stored procedures) within the context of this name space. | Session[] | listVisibleSessions(Session session) Retrieves the set of distinct, visible sessions connected to this
object's database, as a list. |
DINameSpace | public DINameSpace(Database database) throws HsqlException(Code) | | Constructs a new name space support object for the
specified Database object.
Parameters: database - The Database object for which to provide namespace support throws: HsqlException - if a database access error occurs |
addBuiltinToSet | void addBuiltinToSet(HashSet set)(Code) | | Adds to the given Set the fully qualified names of the Class objects
internally granted to PUBLIC in support of core operation.
Parameters: the - HashSet to which to add the fully qualified names ofthe Class objects internally granted to PUBLIC in support ofcore operation. |
classForMethodFQN | Class classForMethodFQN(String fqn)(Code) | | Retrieves the declaring Class object for the specified
fully qualified method name, using (if possible) the classLoader
attribute of this object's database.
Parameters: fqn - the fully qualified name of the method for which toretrieve the declaring Class object. the declaring Class object for thespecified fully qualified method name |
classForName | Class classForName(String name) throws ClassNotFoundException(Code) | | Retrieves the Class object specified by the
name argument, using, if possible, the
classLoader attribute of the database.
Parameters: name - the fully qualified name of the Class object to retrieve. throws: ClassNotFoundException - if the specified class objectcannot be found in the context of this name space the Class object specified by thename argument |
getCatalogName | String getCatalogName(Object o)(Code) | | Retrieves the name of the catalog corresponding to the indicated
object.
Note: the uri of this object's database is returned whenever
catalog reporting is turned on.
This a stub that will be used until such time (if ever) that the
engine actually supports the concept of multiple hosted
catalogs.
the name of specified object's qualifying catalog, or null ifcatalog reporting is turned off. Parameters: o - the object for which the name of its qualifying catalogis to be retrieved |
getInverseAliasMap | HashMap getInverseAliasMap()(Code) | | Retrieves a map from each distinct value of this object's database
SQL routine CALL alias map to the list of keys in the input map
mapping to that value.
The requested map |
getMethodFQN | static String getMethodFQN(Method m)(Code) | | Retrieves the fully qualified name of the given Method object.
Parameters: m - The Method object for which to retreive the fullyqualified name the fully qualified name of the specified Method object. |
getMethodSpecificName | static String getMethodSpecificName(Method m)(Code) | | Retrieves the specific name of the given Method object.
Parameters: m - The Method object for which to retreive the specific name the specific name of the specified Method object. |
isBuiltin | boolean isBuiltin(Class clazz)(Code) | | Retrieves whether the indicated Class object is systematically
granted to PUBLIC in support of core operation.
whether the indicated Class object is systematicallygranted to PUBLIC in support of core operation Parameters: clazz - The Class object for which to make the determination |
isBuiltin | boolean isBuiltin(String name)(Code) | | Retrieves whether the Class object indicated by the fully qualified
class name is systematically granted to PUBLIC in support of
core operation.
true if system makes grant, else false Parameters: name - fully qualified name of a Class |
isReportCatalogs | boolean isReportCatalogs()(Code) | | Retrieves whether this object is reporting catalog qualifiers.
true if this object is reporting catalog qualifiers, else false. |
iterateAccessibleTriggerClassNames | Iterator iterateAccessibleTriggerClassNames(User user) throws HsqlException(Code) | | Retrieves an Iterator object describing the
fully qualified names of all Java Class objects
that are both trigger body implementations and that are accessible
(whose fire method can potentially be invoked) by actions upon this
object's database by the specified User .
Parameters: user - the User for which to retrieve theIterator throws: HsqlException - if a database access error occurs an Iterator object describing thefully qualified names of all Java Class objects that are both trigger body implementationsand that are accessible (whose fire method canpotentially be invoked) by actions upon this object's databaseby the specified User . |
iterateCatalogNames | Iterator iterateCatalogNames() throws HsqlException(Code) | | Retrieves an Iterator whose elements form the set of
distinct names of all visible catalogs, relative to this object's
database.
If catalog reporting is turned off, then the empty Iterator is
returned.
Note: in the present implementation, if catalog reporting is
turned on, then the iteration consists of a single element that is the
uri of this object's database; HSQLDB currently does not support the
concept a single engine hosting multiple catalogs.
An Iterator whose elements are String objectsnaming all visible catalogs, relative to this object's database. throws: HsqlException - never (reserved for future use) |
iterateRoutineMethods | Iterator iterateRoutineMethods(String className, boolean andAliases) throws HsqlException(Code) | | Retrieves an Iterator object describing the Java
Method objects that are both the entry points
to executable SQL database objects (such as SQL functions and
stored procedures) within the context of this name space.
Each element of the Iterator is an Object[3] array
whose elements are:
- a
Method object.
- an
HsqlArrayList object whose elements are the SQL call
aliases for the method.
- the
String "ROUTINE"
Note: Admin users are actually free to invoke *any* public
static non-abstract Java Method that can be found through the database
class loading process, either as a SQL stored procedure or SQL function,
as long as its parameters and return type are compatible with the
engine's supported SQL type / Java Class mappings.
An Iterator object whose elements form the setof distinct Method objects accessible asexecutable as SQL routines within the current executioncontext. Elements are Object[3] instances, with [0] being aMethod object, [1] being an alias list object and[2] being the String "ROUTINE" If the Method object at index [0] has aliases,and the andAliases parameter is specifiedas true , then there is an HsqlArrayListat index [1] whose elements are String objectswhose values are the SQL call aliases for the method.Otherwise, the value of index [1] is null . Parameters: className - The fully qualified name of the class for which toretrieve the iteration Parameters: andAliases - if true , alias lists for qualifyingmethods are additionally retrieved. throws: HsqlException - if a database access error occurs |
listVisibleSessions | Session[] listVisibleSessions(Session session)(Code) | | Retrieves the set of distinct, visible sessions connected to this
object's database, as a list.
Parameters: session - The context in which to produce the list the set of distinct, visible sessions connectedto this object's database, as a list. |
|
|