Having a single set of object relational mappings across different instances of the same schemas
First Claim
1. A method in a data processing system for providing a single set of object relational mappings across different instances of the same schemas, comprising:
- configuring multiple datasources for a class;
setting a mapping identifier at runtime, wherein the mapping identifier is used to access a particular datasource;
generating mapping code from the particular datasource based on the mapping identifier;
acquiring a schema identifier from the generated mapping code;
prepending the schema identifier to tables in a SQL generated code; and
using a schema name associated with the schema identifier to connect to a schema instance in the particular datasource.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, system, and computer instructions for providing a single set of object relational mappings across different instances of the same schemas. With the present invention, multiple datasources are first configured for class (or set of object definitions). A mapping identifier is set at runtime, wherein the mapping ID is used to access the correct datasource. Mapping code is then generated from the datasource based on the mapping identifier. A schema identifier is acquired from the generated mapping code and prepended to tables in the in the SQL generated code. The schema name is used to connect to the correct schema within a datasource. The mapping ID is also used to access the correct JNDI name to access the correct data source which represents a physical database.
47 Citations
20 Claims
-
1. A method in a data processing system for providing a single set of object relational mappings across different instances of the same schemas, comprising:
-
configuring multiple datasources for a class;
setting a mapping identifier at runtime, wherein the mapping identifier is used to access a particular datasource;
generating mapping code from the particular datasource based on the mapping identifier;
acquiring a schema identifier from the generated mapping code;
prepending the schema identifier to tables in a SQL generated code; and
using a schema name associated with the schema identifier to connect to a schema instance in the particular datasource. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A data processing system for providing a single set of object relational mappings across different instances of the same schemas, comprising:
-
an application runtime administrative interface for configuring multiple datasources for a class;
an internal application programming interface for setting a mapping identifier at runtime, wherein the mapping identifier is used to access a particular datasource; and
an object relational mapping code generator for generating mapping code from the particular datasource based on the mapping identifier;
wherein the internal application programming interface acquires a schema identifier from the generated mapping code; and
wherein the object relational mapping code generator prepends the schema identifier to tables to tables in a SQL generated code; and
wherein the internal application programming interface uses a schema name associated with the schema identifier to connect to the particular datasource. - View Dependent Claims (8, 9, 10, 11, 12, 13)
-
-
14. A computer program product in a computer readable medium for providing a single set of object relational mappings across different instances of the same schemas, comprising:
-
first instructions for configuring multiple datasources for a class;
second instructions for setting a mapping identifier at runtime, wherein the mapping identifier is used to access a particular datasource;
third instructions for generating mapping code from the particular datasource based on the mapping identifier;
fourth instructions for acquiring a schema identifier from the generated mapping code;
fifth instructions for prepending the schema identifier to tables in a SQL generated code; and
sixth instructions for using a schema name associated with the schema identifier to connect to a schema instance in the particular datasource. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification