Differences
This shows you the differences between two versions of the page.
| — |
tutorial:other_features [2020/04/16 10:56] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ===== OneToOne relationship. ===== | ||
| + | It is quite difficult to manage OneToOne relationship with Hibernate for 2 reasons: | ||
| + | * By default, Hibernate POJO generation does not support OneToOne relationship. | ||
| + | * Once you have added correct annotations to POJO in order to support OneToOne relationship, Eager loading of OnetoOne second member when quering on first member becomes a real problem. | ||
| + | | ||
| + | To prevent, these drawbacks, Adichatz provides a POJO rewriter which rewrite POJO members so that OneToOne is effective and Lazy loading is conserved. | ||
| + | ===== Composite key. ===== | ||
| + | Consider that you have an object with a composite key as following: | ||
| + | * Parent key | ||
| + | * Increment | ||
| + | Adichatz proposes to manage directly the incrementation of this kind of key. | ||
| + | ===== Dynamic blocks. ===== | ||
| + | |||
| + | A dynamic block is composite containing field which must be created (**Valid** status) or not created (**Invalid** status) following a condition. | ||
| + | When the condition changes the status of the block must change. | ||
| + | If the block contains validations, they must be raised only when block has a **Valid** status: If an error occurs (e.g. a mandatory field is empty), and the condition of the block is no longer checked, the error must disappeared respectively if the condition is checked, the error must occur. | ||
| + | An other difficulty is to link dynamic behavior with databinding service. If a change in another editor causes a change the condition value, the status of the block must change. | ||
| + | |||
| + | <WRAP adihi><html><center><big></html>//Adichatz provides a simple way to manage dynamic blocks.//<html></big></center></html></WRAP> | ||
| + | |||
| + | <sxh xml; first-line: 27; highlight: [30,31,32,33,34]; title: excerpt from 'FilmDIGENERATED.axml' file (new version).> | ||
| + | <composite id="activeComposite"> | ||
| + | <layout layoutConstraints="wrap 1, ins 0, hidemode 3" columnConstraints="[fill, grow]"/> | ||
| + | <pgroup text="#MSG(Film,active)" id="activeGroup"> | ||
| + | <dynamicClause listenedFieldId="active" listenedContainerId="detailContainer"> | ||
| + | <conditionCode>#BEAN().getActive()</conditionCode> | ||
| + | <postCode>#CONTROLLER(fieldComposite).getComposite().layout(); | ||
| + | #CONTROLLER(detailContainer).reflow();</postCode> | ||
| + | </dynamicClause> | ||
| + | <layout layoutConstraints="wrap 2" columnConstraints="[align right]10[fill,grow]"/> | ||
| + | <formattedText editPattern="######" format="Short" property="rentalDuration" mandatory="true" id="rentalDuration"/> | ||
| + | <numericText pattern="##.##" property="rentalRate" mandatory="true" style="SWT.BORDER | SWT.RIGHT" id="rentalRate"/> | ||
| + | <numericText pattern="###.##" property="replacementCost" mandatory="true" style="SWT.BORDER | SWT.RIGHT" id="replacementCost"/> | ||
| + | </pgroup> | ||
| + | </composite> | ||
| + | </sxh> | ||