oqt:translate

Full name:

net.sf.oqt:oqt-maven-plugin:0.4-SNAPSHOT:translate

Description:

The QueryTranslatorBuildMojo is the mojo which will convert all the known JPQL queries to SQL queries.

This plugin will gather the following information from your ORM:

  • The list of entities per package
  • The list of named queries per entity
  • The list of SQL queries per named query
  • The list of erroneous queries.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: site.

Required Parameters

Name Type Since Description
dictionary String - The databse dictionary is it's known by the openJPA version on the classpath.
driverName String - The drivername for the database connection.

The driver must be on the classpath. It is advised to provide the driver as a dependency for this plugin.


packageNames List - The list of packages where the plugin must go look for entities.

The plugin will automatically look in all the subpackages.

If this plugin is ran outside the model-module, then it's advised to give the model as a dependency of this plugin.


url String - The JDBC database url.

The URL to the database must be valid and the database must be up and running and acception connections. The database may be empty and the user which is used to connect to this database does not required write access.


Optional Parameters

Name Type Since Description
password String - The password for the database connection
reportTypes List 0.3 Defines what should be outputed to text files.

Currently supported types are:

  • JPQL
  • SQL

username String - The username for the databases connection

Parameter Details

dictionary:

The databse dictionary is it's known by the openJPA version on the classpath.
  • Type: java.lang.String
  • Required: Yes

driverName:

The drivername for the database connection.

The driver must be on the classpath. It is advised to provide the driver as a dependency for this plugin.

  • Type: java.lang.String
  • Required: Yes

packageNames:

The list of packages where the plugin must go look for entities.

The plugin will automatically look in all the subpackages.

If this plugin is ran outside the model-module, then it's advised to give the model as a dependency of this plugin.

  • Type: java.util.List
  • Required: Yes

password:

The password for the database connection
  • Type: java.lang.String
  • Required: No

reportTypes:

Defines what should be outputed to text files.

Currently supported types are:

  • JPQL
  • SQL
  • Type: java.util.List
  • Since: 0.3
  • Required: No

url:

The JDBC database url.

The URL to the database must be valid and the database must be up and running and acception connections. The database may be empty and the user which is used to connect to this database does not required write access.

  • Type: java.lang.String
  • Required: Yes

username:

The username for the databases connection
  • Type: java.lang.String
  • Required: No