Extending EclipseDatabase


This chapter is composed of :

  1. Introduction
  2. Database Definition
  3. Database Definition Update
  4. New Database Definition
    1. name
    2. label
    3. jdbcClass
    4. jdbcURL
    5. jdbcLevel
    6. torqueAdapter
    7. ojbPlatform

1. Introduction

EclipseDatabase comes with a set of predefined known databases.

However, users should be able to:

Once you add a new Database definition, you could add templates to be used with the following wizards :

 

2. Database Definition

In the %ECLIPSE_HOME%/plugins/com.soyatec.database_x.y.z/data directory

 

 

you should see a file called

database.xml

 

 

3. Database Definition Update

Most of the time when you want to modify an existing Database definition you need to modify either its jdbcClass or its jdbcURL definition.

Other values should remain untouched, otherwise strange side effects could occur.

Edit the database.xml file and patch the needed values.

Restart your Eclipse Platform to see the updated values.

 

4. New Database Definition

If you want to add a new Database definition, cut and paste an existing Database definition and modify the needed values.

Attribute values should be encoded with numerical entities.

 

4.1. name

Name is the internal EclipseDatabase key.

This value should be unique among Database definitions.

 

4.2. label

Label is the EclipseDatabase displayed label.

This value should be unique for a better understanding.

 

4.3. jdbcClass

jdbcClass is the corresponding JDBC Java Class.

 

4.4. jdbcURL

jdbcURL is the corresponding JDBC Connection URL pattern.

 

4.5. jdbcLevel

jdbcLevel is the corresponding JDBC Driver level.

Valid values should be :

This value is used with the OJB Code Generator.

 

4.6. torqueAdapter

torqueAdapter is the name used to discriminate Templates.

Below your Plugin Templates or MyTemplates you should see the following directories.

Torque/sql/base

Torque/sql/db-init

Torque/sql/id-table

Torque/sql/load

 

 

 

4.7. ojbPlatform

ojbPlatform is the targeted OJB Platform when you use the Object Relational Bridge Resources wizard.

The DatabaseExplorer provides a shortcut through MyEclipseDTD to access the OJB's DTD.

In the Object Relational Bridge DTD you should see the valid platform values :