Scalable Database Server, HiRDB Version 8 UAP Development Guide
9.4.2 Package, class, and method definitions
This section describes the points to be observed when defining packages, classes, and methods. For details about the packages, classes, and methods, see the manual provided with JDK.
- Organization of this subsection
- (1) Package
- (2) Class
- (3) Method
(1) Package
- Specification of a package name is optional.
- If you specify the package name, the length of the package-name.class-name character string must be no longer than 255 characters.
- You cannot use either of the following package names:
- Package name existing in JRE
- Package name provided by HiRDB
- A class name must be no longer than 255 characters.
- Define a class in the format public class <class-name>.
(3) Method
- A method name must be no longer than 255 characters.
- Define a method as follows:
- Java stored procedure
public static void <method-name>
- Java stored function
public static <return-value> <method-name>
- If there is a possibility of an exception occurring in the method, you must either declare the exception in the throw section or specify try.catch. For Java stored procedures, there is a possibility of an SQLException exception occurring in nearly all JDBC methods.
- A method can reference a class included in the Java platform core API or a class included in the JAR file that contains the current method.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.