Java API Class Worksheet
Introduction
A Java API Class Worksheet describes how AlchemyJ Compiler should generate a class. It defines the name of the class, the package it is in, the functions it provides and the worksheets it uses.
It contains the following sections:
Basic Settings
Define the basic information for a Java Class.
Item | Description |
---|---|
Sub-package name | Input the sub-package name that this class should be in. The actual package this class will be in is [package name].[Sub Package Name]. The Class that should be put into the same package should have the same sub-package name here. |
Class Name | Define the name of this Java Class. It must begin with an alphabet and contain no space or dot. |
Functions
It defines a list of functions this class provides and their properties.
Item | Description | Remark |
---|---|---|
Function Point | The name of this Function Point used in AlchemyJ Studio. It can be a name with spaces. | The function point list will be shown in AlchemyJ > Run Function Point. |
Method Name | The Name of the function in generated Java code. This is the method name that other Java developers will use when calling this function in their project. | It must begin with an alphabet and contain no space or dot. If it is blank, the Function Point would be used as the method name when compiling. |
Return Class | The type of the return value. | The value can be: Integer: A whole number between -2,147,483,648 and 2,147,483,647. Double: A whole number between 4.9406564584124654 x 10^-324. to 1.7976931348623157 x 10^308 Date: Date value String: Text value Object: Object |
Return Data Address | The cell address where AlchemyJ should refer to for the output of this function. | It should include the sheet name. For example, Sheet1!A2. If the Return Class is Object, this should be the address of a Data Relationship Schema. |
DB Operation Type | It defines if DB connection and transaction management are required. | Blank - This function does not involve any database operations. Non-transactional – This function has database operation but it does not need Transaction management. Transactional - This function has database operations. If there is any error, the transaction will be rolled back. |
Functions input parameters
Input parameters for defined functions if any
Item | Description | Remark |
---|---|---|
Function Point | The function point this input parameter refers to. | The value must exist in the Function Point column of Functions table. |
Name | The Name of this parameter. | It must begin with an alphabet and contain no space or dot. |
Class | The value this parameter may hold. | The value can be: Integer: A whole number between -2,147,483,648 and 2,147,483,647. Double: A whole number between 4.9406564584124654 x 10^-324. to 1.7976931348623157 x 10^308 Date: Date value String: Text value Object: Object |
Data Address | The cell address where this parameter value should be written to. | It should include the sheet name. For example, Sheet1!A2. If the Class is object, the Data Address should be the address of a Data Relationship Schema. |
Example Value | The example value of the parameter. | It will be used in Testing Tool as default value. |
Related Worksheets
The section defines the worksheet and the area this class uses. When ‘’Enable automatic sheet detection' is enabled in the AlchemyJ Properties and no value is inputted in this section, the AlchemyJ compiler will detect the used sheet range automatically.
Otherwise, it needs to define the used worksheet range in this section. There is no need to include system worksheets and definition worksheets, such as : %%AppConfig, %%SysRuntime, ##JavaApiPackage and so on. The worksheets of the component and snippet should be included, such as the Data Relationship Schema.
Item | Description | Remark |
---|---|---|
Worksheet Effective Range | The address of the range you used and the worksheet name should be included. | For better performance, only include the ranges that are related to this class. |