|
Data access flexibility
XIC comes with a lot of options in terms of mapping. This brings a lot of flexibility and independence between the
way the business and database models can be designed.
O/R mapping options
Just to mention of few of them:
- Object identity: could be totally transparent in the Java code and managed by LiDO, or could be managed by some
database features (auto-incremented columns, sequences), or by the application. Composite primary keys are
supported as are primary keys containing foreign keys as well.
- Table renaming: LiDO provides several strategies; and the developer can supply his own renaming algorithm.
- Inheritance: could be managed with several strategies
- 1 table per class hierarchy,
- 1 table per concrete class,
- 1 table per abstract class.
- 1-1 relationships: could be managed with several strategies
- 2 classes in 2 tables,
- 2 classes in 1 table with insertion of columns of the referenced class in the owner table,
- The 2 classes in 1 table with serialization of columns of the referenced table into one
“blob” in the owner table,
- Reverse 1-1 relationship (a reference from ClassA to ClassB in the Java model maps to a Foreign Key
from TABLEB to TABLEA in the database).
- 1-N relationships: could be managed with several strategies
- Intermediate link table, which respects the Java semantic of collections,
- Reverse Foreign Key, which is more typical of a normalized relational schema,
- Serialization of the whole collection into a blob in the owner table.
- M-N relationships are fully supported.
- Field mapping
- Direct automatic mapping of basic types, plus wrappers, plus BigXXX,
- Support standard JDBC translations,
- Standard LiDO options include precision, scale, naming,
- CustomMapper: allows supporting complex mapping like type mapping, value aping and Java enumerations,
- Database initialized values,
- Auto-incremented fields.
- Field naming: LiDO provides several strategies; and the developers can supply his own renaming algorithm.
O/XML mapping options
XIC for XML also proposes a lot of mapping options allowing mapping any Java model with any XML business grammar
defined.
|