About Ispirer Systems

Ispirer Home Page Database Migration Application Conversion Downloads


Sqlways.ini File - Section [JAVA]

This article describes sqlways.ini file's [JAVA] section and options it contains.

Option name Description
CONNECTION This option controls generation of connections in java code. If this option is empty or DEFAULT is specified, SQLWays will generate connections in all classes with Embedded SQL. If this option is set to MAP, SQLWays will generate connection mapping code and instance method, no matter whether the DML statements are used or not. If SINGLE is specified, SQLWays will generate connection code in separate class if DML statements are used.
PASSWORD This option sets assigned value into String password parameter of DriverManager method getConnection. When the option is empty or isn't specified, by default SQLWays will assign empty value into String password parameter of DriverManager method getConnection.
USERNAME This option sets assigned value into String user parameter of DriverManager method getConnection. When the option is empty or isn't specified, by default SQLWays will assign empty value into String user parameter of DriverManager method getConnection.
CONNECTIONURL This option sets assigned value into String url parameter of DriverManager method getConnection. When the option is empty or isn't specified, by default SQLWays will assign “jdbc:default:connection” value into String url parameter of DriverManager method getConnection.
CONVERT_SQL_IN_CONST_STRING This option controls how the query inside constant string will be treated. When the whole SQL query is built in one constant string, you need to set this option to “Yes” and SQLWays will try to convert it.
Possible values “Yes”, “No” or empty. Default value - “No” or empty
OVERALL_TRY_CATCH This option specifies whether the generated Java code will be placed inside the TRY CATCH block. If this options is set to “Yes”, TRY CATCH block will be generated. If option is set to “No”, default conversion will be used.
Possible values “Yes”, “No” or empty.
Default value - “Yes”.
UI_TYPE This option defines User Interface type for Java as a target direction, for example “SPRINGBOOT”, “JSF”, “JSFSimple”, “SWING”. For the whole list of supported values for this option, please contact our support team.
ENABLE_CAMEL_CASE If this option is set to “Yes”, camel case will be used for all identifiers in generated Java code.
Possible values “Yes”, “No” or empty.
Default value - “Yes”.
STATIC_OBJ This option controls generation of static modifier. If this option is empty or set to “Yes”, the class fields and methods will be generated with Static modifier. Static methods will be invoked with the class name. If this option is set to “No”, class fields and methods will be generated without static modifier. In this case, reference to java methods will be implemented with an object reference.
Possible values - “No”, “Yes” or Empty.
Default value - “Yes” or Empty.
USE_DOUBLE This options controls the conversion of NUMBER data type when migrating from Oracle to Java. The cases when NUMBER data type is used without precision and scale, when NUMBER(n,0) and n >= 19, and when NUMBER(n,m) with m !=0, will be converted to BigDecimal by default. But if this option is set to “Yes”, such cases will be converted to Double data type.
Possible values “Yes”, “No” or empty.
Default value - “No” or Empty.
SOURCE_APP_TYPE This option defines the source application type when migrating to Java code, for example “ORACLE FORMS”. For the whole list of supported source application please contact our support team: support@ispirer.com
CONVERT_EXCEPT The option allows to specify objects, that shouldn't be converted to Java and that should stay on Oracle side, and which should be called directly from database. By default, Ispirer Toolkit converts all calls of procedures, functions to calls of Java methods, but the objects that are specified in CONVERT_EXCEPT option will be called from the database.
Possible values - <empty> or names of objects (functions, procedures, packages) and regular expressions listed via coma.
Default value - <empty>. Usage example.
LOGGER The option allows to specify which logging framework to use: log4j or slf4j. By default, slf4j is used, but if the option is specified to log4j, the tool will use the log4j library.
Possible values - log4j, slf4j or <empty>.
Default value - <empty>. Usage example.

Please note: the option works only for the Oracle, SQL Server, Sybase ASE and Sybase ASA sources!
DEPENDENCY_INJECTION This option allows to control whether an object dependency is created in the traditional way or using dependency injection. By default, Ispirer Toolkit creates object dependencies in the traditional way, but if you specify the Spring option, the tool will use the Spring DI container for dependency injection.
Possible values - <empty> or Spring.
Default value - <empty>. Usage example.

Please note: the option works only for the Oracle to Java, SQL Server to Java directions!
EXTRACT_SQL The option allows to extract SQL queries into XML files and then retrieve the required query line from the XML file when it is needed to execute it.
Compared to the default solution of specifying query lines directly in the code, extracting queries into XML files makes queries easier to maintain.
The tool creates one XML file per object (function, procedure, package), each XML file contains all queries from the corresponding object.
Possible values - yes or <empty>.
Default value - <empty>. Usage example.

Please note: the option works only for the Oracle to Java direction!
ISPIRER_PACKAGE The option controls in which package the utility classes will be generated.
Possible values - any name for the package.
Default value - com.ispirer.<source_db_name>. Usage example.

Please note: the option works only for the Oracle, SQL Server, Sybase ASE and Sybase ASA sources!

Example:

[JAVA]
CONNECTION=single
CONNECTIONURL=jdbc:oracle:thin:@localhost:1521:xe
USERNAME=oracle
PASSWORD=oracle

[JAVA]
CONNECTION=SINGLE
CONNECTIONURL=jdbc:informix-sqli://192.168.2.94:1526/test:INFORMIXSERVER=ol_vmdbsrv007 
USERNAME=informix 
PASSWORD=Ifmx_9.4