Dali Java Persistence Tools User Guide Release 3.2 Release 3.2 |
|
Reference |
Property pages |
Home > User Guide > Reference > Wizards
This section includes information on the following wizards:
Use the Generate Custom Entities Wizard to create JPA entities from your database tables.
The wizard consists of the following pages:
Use the Select Tables dialog to specify the database connection and tables from which to create entities.
Property | Description |
---|---|
Connection |
Select a database connection or click Add Connection to create a new connection. |
Schema |
Select the database schema from which to select tables. |
Tables |
Select the tables from which to create Java persistent entities. The tables shown are determined by the database connection and schema selections. |
Update class list in persistence.xml |
Specify if Dali should update the |
Related tasks
Related reference
Use this page to create or edit the association between the database table and entity.
Property | Description |
---|---|
Table associations |
Select an association to modify or click New Association to create a new table association with the Create New Association wizard wizard. |
Generate this association |
Specify if Dali should create the selected association. If enabled, you can specify the Cardinality and Table join for the table association. |
Generate a reference to <ROW> in <TABLE> |
Specify if the entity should contain a reference to the specified table. If enabled, you can also enter the Property name and select the Cascade method (all, persist, merge, remove, or refresh) for the reference. |
Related tasks
Related reference
Use this page to specify the default information Dali will use when generating the entities from the database tables. You will be able to override this information for specific entities.
Property | Description |
---|---|
Mapping defaults |
Use these options to define the table mapping information for the entity. |
Key generator |
Select the generator used for this mapping. |
Sequence name |
Enter a name for the sequence. You can use $table and $pk as variables in the name. These will be replaced by the table name and primary key column name (respectively) when Dali generates a table mapping. |
Entity access |
Specify the default entity access method: Field (default) or Property. |
Associations fetch |
Specify the default fetch mode for associations: Default, as defined by the application (default), or Lazy. |
Collection properties type |
Specify if the collection properties are a Set or List. |
Always generate optional JPA annotations and DDL parameters |
Specify if Dali should include this information in the entity. |
Domain Java class |
Use these options to define the Source folder and class information (Package, Superclass, and Interfaces) for the entity. |
Related tasks
Related reference
Use this page to customize each generated entity. Select an item in the Table and columns area, then complete the following fields for each item.
Property | Description |
---|---|
Mapping defaults |
Use these options to define the table mapping information for the entity. |
Class name |
Name of the entity class |
Key generator |
Select the generator used for this mapping. |
Sequence name |
Enter a name for the sequence. You can use $table and $pk as variables in the name. These will be replaced by the table name and primary key column name (respectively) when Dali generates a table mapping. |
Entity access |
Specify the default entity access method: Field (default) or Property. |
Domain Java Class |
Use these options to define the class information (Superclass and Interfaces) for the entity. |
Generate this property |
Enable this option to generate the following properties for the selected column. |
Column mapping |
|
Property name |
The name of the property derived from the column |
Mapping type |
The attribute type |
Mapping kind |
The type of mapping for the attribute |
Column is updatable |
Specify if the column is included in SQL |
Column is insertable |
Specify if the column is included in SQL |
Domain Java Class |
Use these options to define the getter and setter scope for the entity. |
Related tasks
Related reference
Use the Generate Dynamic Custom Entities wizard to create dynamic EclipseLink JPA entities from your database tables.
The wizard consists of the following pages:
Use the Select Tables dialog to specify the database connection and tables from which to create entities.
Property | Description |
---|---|
Connection |
Select a database connection or click Add Connection to create a new connection. |
Schema |
Select the database schema from which to select tables. |
Tables |
Select the tables from which to create Java persistent entities. The tables shown are determined by the database connection and schema selections. |
Update class list in persistence.xml |
Specify if Dali should update the |
Related tasks
Related reference
Use this page to create or edit the association between the database table and entity.
Property | Description |
---|---|
Table associations |
Select an association to modify or click New Association to create a new table association with the Create New Association wizard wizard. |
Generate this association |
Specify if Dali should create the selected association. If enabled, you can specify the Cardinality and Table join for the table association. |
Generate a reference to <ROW> in <TABLE> |
Specify if the entity should contain a reference to the specified table. If enabled, you can also enter the Property name and select the Cascade method (all, persist, merge, remove, or refresh) for the reference. |
Related tasks
Related reference
Use this page to specify the default information Dali will use when generating the entities from the database tables. You will be able to override this information for specific entities.
Property | Description | Default |
---|---|---|
XML Mapping File |
The name and location of the mapping file. |
|
Dynamic Class Defaults |
||
Package |
Default package name for dynamic classes |
|
Mapping defaults |
||
Key generator |
Default generation strategy for primary keys:
|
None |
Sequence name |
When using a Key generator, specify its name. Note: You can use the variables |
|
Associations fetch |
Specify the default fetch strategy for generated entities:
|
Default |
Collection properties type |
Specify the default collection type, for generated entities:
|
java.util.List |
Related tasks
Related reference
Use this page to customize each generated entity. Select an item in the Table and columns area, then complete the following fields for each item.
Property | Description |
---|---|
Mapping defaults |
Use these options to define the table mapping information for the entity. |
Class name |
|
Key generator |
Select the generator used for this mapping. |
Sequence name |
Enter a name for the sequence. You can use $table and $pk as variables in the name. These will be replaced by the table name and primary key column name (respectively) when Dali generates a table mapping. |
Entity access |
Specify the default entity access method: Field (default) or Property. |
Domain Java Class |
Use these options to define the class information (Superclass and Interfaces) for the entity. |
Related tasks
Related reference
The Create JPA wizard enables you to quickly add an entity and also add persistence fields to that entity. In addition, this wizard adds the accessor methods (getter
and setter
) in the class file. The wizard consists of the following pages:
This table lists the properties of the Entity Class page of the Create JPA Entity wizard.
Property | Description | Default |
---|---|---|
Project |
The name of the JPA project. |
|
Source Folder |
The location of the JPA project's src folder. |
|
Java Package |
The name of the class package. |
|
Class name |
The name of the Java class. |
|
Superclass |
Select the superclass. |
|
Because the wizard creates a Java class with an Select Mapped Superclass if you defined a superclass. To add an
|
Entity |
|
Select Add to entity mappings in XML to create XML mappings in Use the Mapping file field to specify the file to use. By default, mappings are stored in the |
Related tasks
Related reference
This table lists the properties of the Entity Properties page of the Create JPA Entity wizard.
Property | Description | Default |
---|---|---|
Entity name |
The name of the entity. By default, this value is the same as the one entered as the class name. If the entity name differs from the class name, then the entity name is added as an attribute. For example: |
Determined by server. |
Table name |
Select Use default to match the name of the mapped table name to the entity name. Otherwise, clear the Use default option and enter the name in the Table Name field. These options result in the addition of the |
Use default. |
Entity fields |
Click the Add button to add persistence fields using the Entity Fields dialog. This dialog enable you to build a field by entering a field name and selecting among persistence types. The Key option enables you to mark a field as a primary key. The dialog's Browse function enables you to add other persistence types described in the JPA specification. The Edit button enables you to change the name or type set for a persistent field. |
|
Access type |
Select whether the entity's access to instance variables is field-based or property-based, as defined in the JPA specification.
|
Field |
Related tasks
Related reference
The New Mapping File wizard enables you to add an orm.xml
file to a JPA project if no object map exists at the location specified. For example, if you cleared the Create orm.xml option on the JPA Facet page, you can later add the orm.xml
file to the src file of the project using this wizard.
The Create ORM Mapping File wizard consists of the following pages:
Use this page of the Create ORM Mapping File wizard to specify the location of the ORM mapping file.
Property | Description | Default |
---|---|---|
Project |
The name of the JPA project. |
Selected. |
Source folder |
The location of the project's src folder. If needed, click Browse to point the wizard to the src file's location. |
Selected. |
File Path |
The location for the new |
Selected. |
File name |
Name of the OR mapping file. |
|
Related tasks
Related reference
Use this page of the Create ORM Mapping File wizard to specify additional options for the ORM mapping file.
Property | Description | Default |
---|---|---|
Default Access |
Select whether the access to the entity is field-based or property-based, as defined in JPA specification.
|
None |
Add to persistence unit |
Designates the persistence unit for this object map file. |
Current project's default persistence unit |
Related tasks
Related reference
The Create New JPA Project wizard allows you to create a new Java project using JPA. The wizard consists of the following pages:
This table lists the properties available on the New JPA Project page of the Create New JPA Project wizard.
Property | Description | Default |
---|---|---|
Project name |
Name of the Eclipse JPA project. |
|
Project location |
Location of the workspace in which to save the project. Unselect the Use default location option and click Browse to select a new location. |
Current workspace |
Target runtime |
Select a pre-defined target for the project. Click New Runtime to create a new environment with the New Server Runtime wizard. |
<None> |
JPA Version |
Select the Java Persistence API version for the project. |
2.0 |
Configurations |
Select a project configuration with pre-defined facets. Select Modify to manually select the facets for this project. |
|
EAR membership |
Specify if this project should be included in an EAR file for deployment. Select the EAR Project Name, or click New Project to create a new EAR project. |
|
Working sets |
Specify if this project should be included in an existing working set. The drop down field shows a list of previous selected working sets. Select Add project to working sets, then select a Working set in which to add this project. |
Related tasks
Related reference
This table lists the properties available on the Java page of the Create New JPA Project wizard.
Property | Description | Default |
---|---|---|
Source folders on build path |
Click Add Folder to select an existing Java source folder to add to this project. |
|
Default output folder |
Specify the location of the |
|
Related tasks
Related reference
This table lists the properties available on the JPA Facet page of the Create New JPA Project wizard.
Property | Description | Default |
---|---|---|
Platform |
Vendor-specific JPA implementation. |
Generic |
Select a specific JPA library configuration. Click Manage libraries to create or update a user library. Click Download libraries to download a specific library configuration. Depending on your JPA implementation (for example, Generic or EclipseLink), different options may be available when working with JPA projects |
||
Type |
Select User Library to select from the available user-defined or downloaded libraries. If you select Disable, you must manually include the JPA implementation library on the project classpath. |
User Library |
Include libraries with this application |
Specify if the selected libraries are included when deploying the application. |
Selected |
Connection |
Select the database connection to use with the project. Dali requires an active database connection to use and validate the persistent entities and mappings. Click Add connection to create a new database connection. |
|
Add driver library to build path |
Specify if the connection driver libraries are included when deploying the application. |
|
Override default schema from connection |
Select a schema other than the default one that is derived from the connection information. Use this option if the default schema cannot be used. For example, use this option when the deployment login differs from the design-time login. |
The value calculated by Dali. |
Specify if Dali will discover annotated classes automatically, or if the annotated classes must be listed in the persistence.xml file. Note: To insure application portability, you should explicitly list the managed persistence classes that are included in the persistence unit. |
Determined by server. |
|
Specify if Dali should create a default |
Selected |
Related tasks
Related reference
The Create New JAXB Project wizard allows you to create a new Java project using JAXB. The wizard consists of the following pages:
This table lists the properties available on the New JPA Project page of the Create New JPA Project wizard.
Property | Description | Default |
---|---|---|
Project name |
Name of the Eclipse JPA project. |
|
Project location |
Location of the workspace in which to save the project. Unselect the Use default location option and click Browse to select a new location. |
Current workspace |
Target runtime |
Select a pre-defined target for the project. Click New Runtime to create a new environment with the New Server Runtime wizard. |
<None> |
JAXB Version |
Select the Java Architecture for XML Binding (JAXB) version for the project. |
2.2 |
Configurations |
Select a project configuration with pre-defined facets. Select Modify to manually select the facets for this project. |
|
Working sets |
Specify if this project should be included in an existing working set. The drop down field shows a list of previous selected working sets. Select Add project to working sets, then select a Working set in which to add this project. |
Related tasks
Related reference
This table lists the properties available on the Java page of the Create New JAXB Project wizard.
Property | Description | Default |
---|---|---|
Source folders on build path |
Click Add Folder to select an existing Java source folder to add to this project. |
|
Default output folder |
Specify the location of the |
|
Related tasks
Related reference
This table lists the properties available on the JPA Facet page of the Create New JAXB Project wizard.
Property | Description | Default |
---|---|---|
Platform |
Vendor-specific JPA implementation. |
Generic |
Select a specific JPA library configuration. Click Manage libraries to create or update a user library. Click Download libraries to download a specific library configuration. Depending on your JPA implementation (for example, Generic or EclipseLink), different options may be available when working with JPA projects |
||
Type |
Select User Library to select from the available user-defined or downloaded libraries. If you select Disable, you must manually include the JPA implementation library on the project classpath. |
User Library |
Include libraries with this application |
Specify if the selected libraries are included when deploying the application. |
Selected |
Related tasks
Related reference
The New Database Web services from Builder XML wizard allows you to add database web services (DBWS) to an existing dynamic web services project, from an XML source. The wizard consists of the following pages:
Use this page to select the dynamic web services project in which to add the Database Web Services.
Related tasks
Creating a Dynamic Web project
Related reference
Use this page to select the XML files from which to generate the database web services.
Click Import to use the Import Wizard to import an existing XML file.
Related tasks
Related reference
Use the Generate Tables from Entities Wizard to quickly create DDL scripts from your persistent entities. Dali automatically creates the necessary primary and foreign keys, based on the entity mappings.
WARNING: Generating tables will |
The Generate Tables from Entities wizard consists of the Schema Generation page.
This table lists the properties of the Schema Generation page of the Generate Tables from Entities wizard.
Property | Description | Default |
---|---|---|
Generation Output Mode |
Specify how Dali should generate the DDL:
|
Database |
Related tasks
Related reference
Use the Create New Association wizard to specify association tables when generating an entity.
The wizard consists of the following pages:
Use this page to specify the association tables for an entity.
Property | Description |
---|---|
Association kind |
Specify if the association is Simple (1:M) or Many to Many (M:M). |
Association tables |
Click Table Selection, then select the two tables to associate. When creating a Many to Many association, you can select a Join Table for the association. |
Related tasks
Related reference
Use this dialog to specify the join columns of an association table.
Click Add to specify the join columns between the two tables.
Related tasks
Related reference