| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <head> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta content="Apache Forrest" name="Generator"> |
| <meta name="Forrest-version" content="0.7"> |
| <meta name="Forrest-skin-name" content="elver4"> |
| <style type="text/css"> |
| /* */ |
| @import "../skin/tigris.css"; |
| @import "../skin/quirks.css"; |
| @import "../skin/inst.css"; |
| /* */ |
| </style> |
| <link media="print" href="../skin/print.css" type="text/css" rel="stylesheet"> |
| <link href="../skin/forrest.css" type="text/css" rel="stylesheet"> |
| <link rel="shortcut icon" href="../"> |
| <script type="text/javascript" src="../skin/tigris.js"></script><script src="../skin/menu.js" language="javascript" type="text/javascript"></script> |
| <title>Options to control OR Mapping and Runtime behavior</title> |
| <meta content="text/css" http-equiv="Content-style-type"> |
| </head> |
| <body class="composite" onload="focus()"> |
| <div id="banner"> |
| <table width="100%" cellpadding="8" cellspacing="0" border="0"> |
| <tr> |
| <td align="left"> |
| <div> |
| <a href="http://www.elver.org"><img class="logoImage" alt="Elver Store" src="../images/ELV2.gif"></a> |
| </div> |
| <span class="alt">Elver Store</span></td><td align="center"> |
| <div> |
| <a href="http://www.elver.org/"><img class="logoImage" alt="Elver" src="../images/empty.gif"></a> |
| </div> |
| </td><td valign="top" align="right"> |
| <div class="right" align="right" id="login"> |
| <form target="_blank" action="http://www.google.com/search" method="get"> |
| <select name="as_sitesearch"><option value="">Search...</option><option value="www.elver.org">The elver site</option><option value="">The web</option></select> for |
| <input size="15" name="as_q" id="query" type="text"><input name="Search" value="Go" type="submit"> |
| </form> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div id="toptabs" class="tabs"> |
| <table border="0" cellspacing="0" cellpadding="4"> |
| <tr> |
| <td><a class="base-selected" href="../index.html">Home</a></td><th><a class="base-selected" href="../hibernate/index.html">EMF Hibernate</a></th><td><a class="base-selected" href="../jpox/index.html">EMF JDO/JPOX</a></td><td><a class="base-selected" href="../services/index.html">Services</a></td> |
| </tr> |
| </table> |
| </div> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" id="breadcrumbs"> |
| <tr> |
| <td></td><td> |
| <div class="published" align="right"> |
| <script type="text/javascript" language="JavaScript"><!-- |
| document.write("Published: " + document.lastModified); |
| // --></script> |
| </div> |
| </td> |
| </tr> |
| </table> |
| <table id="main" width="100%" cellpadding="4" cellspacing="0" border="0"> |
| <tr valign="top"> |
| <td style="padding: 0px" width="20%" id="leftcol"> |
| <table width="100%" class="menuarea" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td width="6px" valign="top"> |
| <table border="0" cellpadding="0" cellspacing="0" class="leftpagemargin"> |
| <tr> |
| <td class="subborder trail"> </td> |
| </tr> |
| </table> |
| </td><td class="dialog"> |
| <div class="menu"> |
| <div onclick="SwitchMenu('menu_1.1')" id="menu_1.1Title" class="menutitle">Home</div> |
| <div id="menu_1.1" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/index.html">Introduction</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/status.html">Status</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/features.html">Features</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/overview.html">Overview</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/changelog.html">Changelog</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/installation.html">Download & Install</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/knownissues.html">Known Issues</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/quick_tutorial.html">Quick Start</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/license.html">License</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.2')" id="menu_1.2Title" class="menutitle">Library Tutorial</div> |
| <div id="menu_1.2" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_intro.html">Introduction</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_1.html">Setup Environment</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_2.html">Create and Store EMF Object</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_3.html">Retrieve EMF Objects</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_4.html">Query EMF Objects</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialone/tutorial1_5.html">Using EMF/JPOX Resources</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.3')" id="menu_1.3Title" class="menutitle">Library Editor Tutorial</div> |
| <div id="menu_1.3" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialtwo/tutorial2_intro.html">Introduction</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialtwo/tutorial2_1.html">Initialize the Library Editor</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/tutorialtwo/tutorial2_2.html">Run the Library Editor</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.4')" id="menu_1.4Title" class="menutitle">GMF Editor Tutorial</div> |
| <div id="menu_1.4" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/gmftutorial/tutorial1.html">Introduction</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/gmftutorial/tutorial2.html">Environment Setup</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/gmftutorial/tutorial3.html">Running the editor</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_selected_1.5')" id="menu_selected_1.5Title" class="menutitle">Details</div> |
| <div id="menu_selected_1.5" class="selectedmenuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/dynamic.html">Dynamic EMF Tutorial</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/inheritance.html">Inheritance Mapping</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/hibernate_relations.html">Modeling Associations</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/hbdatastore.html">HbDataStore</a> |
| </div> |
| <div class="menupage"> |
| <div class="menupagetitle">Options</div> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/hibernate_details.html">EMF - Hibernate Details</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/hibernateresources.html">EMF Hibernate Resources</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/resource_utility.html">Resource Utility</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/troubleshooting.html">Troubleshooting</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.6')" id="menu_1.6Title" class="menutitle">Annotations (JPA/EJB3)</div> |
| <div id="menu_1.6" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/ejb3_format.html">Format</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/ejb3_examples.html">Examples</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/ejb3_features.html">JPA/EJB3</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.7')" id="menu_1.7Title" class="menutitle">XML Schema</div> |
| <div id="menu_1.7" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/features_details.html">XML Schema Support</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/schema_list.html">XML Schema Examples</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/featuremap.html">Feature Map/Mixed Content</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.8')" id="menu_1.8Title" class="menutitle">Support</div> |
| <div id="menu_1.8" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/upgrading.html">Upgrading</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/mailinglist.html">Newsgroup</a> |
| </div> |
| <div class="menuitem"> |
| <a href="../hibernate/emfhibsupport.html">EMF/Hibernate Support</a> |
| </div> |
| </div> |
| <div onclick="SwitchMenu('menu_1.9')" id="menu_1.9Title" class="menutitle">Developer</div> |
| <div id="menu_1.9" class="menuitemgroup"> |
| <div class="menuitem"> |
| <a href="../hibernate/svn.html">CVS</a> |
| </div> |
| </div> |
| </div> |
| </td> |
| </tr> |
| <tr> |
| <td></td><td> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0"> |
| <tr> |
| <td class="border bottom-left"></td><td class="border bottomborder"></td><td class="border bottom-right"></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2" height="10"></td> |
| </tr> |
| </table> |
| <table></table> |
| <table></table> |
| <div class="strut"> </div> |
| </td><td> |
| <div class="content"> |
| <div id="bodycol"> |
| <div id="apphead"> |
| <h2> |
| <em>Options to control OR Mapping and Runtime behavior</em> |
| </h2> |
| </div> |
| <div class="app" id="projecthome"> |
| |
| <p>The options described here are all present in the <em>org.eclipse.emf.teneo.PersistenceOptions</em> class. The constant names used |
| in this page all refer to this class.</p> |
| |
| <p>Options are passed to the HbDataStore using a Properties object which is set using the HbDataStore.setPersistenceProperties method.</p> |
| |
| <p>Boolean options can have the lower case String values: "false" or "true".</p> |
| |
| <ul> |
| |
| <li> |
| <strong>PersistenceOptions.ALWAYS_VERSION</strong>: this option (boolean, default: true) determines if the system should automatically |
| add a version attribute to each class mapping. If set to true (the default) then the system will add a version property to the mapping if |
| no other eattribute has a version annotation. If set to false then the version property is not added automatically.</li> |
| |
| <li> |
| <strong>PersistenceOptions.DEFAULT_CACHE_STRATEGY</strong>: this option allows you to set second level caching at a global level. |
| If set to a value other than NONE then all EClasses and collection EFeatures will have caching set. |
| The value is one of NONE, READ_ONLY, NONSTRICT_READ_WRITE, READ_WRITE, TRANSACTIONAL.</li> |
| |
| <li> |
| <strong>PersistenceOptions.DEFAULT_ID_FEATURE_NAME</strong>: with this option it is possible to let Teneo automatically identify the id-property. |
| All efeatures with this name are used as persistence id. The default value is e_id (same as for the default id column name). To ensure that no efeature is |
| by accident considered as the id-feature this should be set to an empty string.</li> |
| |
| <li> |
| <strong>PersistenceOptions.DEFAULT_TEMPORAL_VALUE</strong>: this option controls the default mapping to use for temporal (e.g. java.util.Date) properties. |
| The default is TIMESTAMP, other allowed values are DATE, TIME.</li> |
| |
| <li> |
| <strong>PersistenceOptions.DISABLE_ECONTAINER_MAPPING</strong>: this option (boolean) controls if the container relations |
| are mapped explicitly in the database, see also <a href="hibernate_relations.html#Storing+container+relation">here</a>.</li> |
| |
| <li> |
| <strong>PersistenceOptions.FETCH_CONTAINMENT_EAGERLY</strong>: if set to "true" will set the fetch strategy of all |
| containment references to EAGER. This means that containment relations are completely read in memory. Default is "false".</li> |
| |
| <li> |
| <strong>PersistenceOptions.ID_COLUMN_NAME</strong>: can be used to set the id column name which is used |
| to store the id of an object. The id column is only added automatically if the model does not define a primary key for the |
| type. Default the id column name is e_id, however not all databases support _ in the name.</li> |
| |
| <li> |
| <strong>PersistenceOptions.INHERITANCE_MAPPING</strong>: the default inheritance mapping strategy to use, this can be |
| JOINED or SINGLE_TABLE, see <a href="inheritance.html">here</a> for more information. Default is SINGLE_TABLE.</li> |
| |
| <li> |
| <strong>PersistenceOptions.JOIN_TABLE_FOR_NON_CONTAINED_ASSOCIATIONS</strong>: boolean, if set to true then always a join table is created |
| for one-to-many non-contained associations.</li> |
| |
| <li> |
| <strong>PersistenceOptions.JOIN_TABLE_NAMING_STRATEGY</strong>: string option which |
| can have two values: ejb3 (=default) or unique. In ejb3 a join table name is the concatenation of the two entity names with an underscore (_) separator. |
| The unique value will create a join table with the name of the refering entity name and estructural feature name, |
| e.g. Writer_books in the Library example. |
| </li> |
| |
| <li> |
| <strong>PersistenceOptions.MAXIMUM_SQL_NAME_LENGTH</strong>: can be used to control the column and table name length. This is especially |
| relevant in case the default annotation process creates foreign key columns or your property names are too long. |
| Foreign key column names are created by concatenating the name of the (e)class and the propertyname. The resulting name can be to long for certain databases. |
| By setting this option the system will truncate column names to this length. If the column/table name has a suffix (separated by a _) then the |
| system will truncate the part before the suffix.</li> |
| |
| <li> |
| <strong>PersistenceOptions.OPTIMISTIC</strong>: if this property is "false" then no version properties are added to the |
| mapping of EClasses. Default is "true".</li> |
| |
| <li> |
| <strong>PersistenceOptions.PERSISTENCE_XML</strong>: the location of the xml annotations file. The location should be a resource |
| path.</li> |
| |
| <li> |
| <strong>PersistenceOptions.QUALIFY_ENTITY_NAME</strong>: if set to PersistenceOptions.QUALIFY_ENTITY_NAME_NSPREFIX then |
| all EClass names (used as entityname) will be qualified with the nsprefix of the EPackage. The nsprefix is prepended to the |
| EClass name with a dot as a separator, for example: library.Writer. Note that all HQL queries should then use the |
| qualified EClass names.</li> |
| |
| <li> |
| <strong>PersistenceOptions.SET_CASCADE_ALL_ON_CONTAINMENT</strong>: as a default Teneo will set a cascade style ALL on a |
| containment relation. This also enables dependent or orphan delete behavior. However it makes more difficult to support cut/paste |
| operations using resources (see <a href="hibernate_details.html#cutpaste">here</a>). This option can be used to control the dependent or |
| orphan delete behavior on a containment relation. If set to false then all cascade styles are set with |
| dependent/orphan-delete disabled. If set to true (the default) then all cascade styles are set including orphan-delete/dependent. |
| </li> |
| |
| <li> |
| <strong>PersistenceOptions.SET_ENTITY_AUTOMATICALLY</strong>: if set to "false" then only EClasses which have an |
| Entity annotation will be mapped. Default is "true", this means that all EClasses are mapped to the persistent store.</li> |
| |
| <li> |
| <strong>PersistenceOptions.SQL_CASE_STRATEGY</strong>: controls if the table and column names are uppercased, lowercased or |
| no specific casing is done. The value lowercase will force lower case for all table/column name, the value |
| uppercase will force uppercase for all table/column names, none wil do not casing. It is also possible to set this |
| option to the classname of a class implementing the org.eclipse.emf.teneo.util.SQLCaseStrategy interface.</li> |
| |
| <li> |
| <strong>PersistenceOptions.UPDATE_SCHEMA</strong>: if set to "false" then the database schema is not updated |
| when initializing a HbDataStore. This improves startup times. Default is "true".</li> |
| |
| <li> |
| <strong>PersistenceOptions.USE_MAPPING_FILE</strong>: if set to "true" then Teneo will not do an automatic mapping of the |
| ecore model to Hibernate but instead search for a hibernate.hbm.xml in the classpath of the EMF generated java classes.</li> |
| |
| <li> |
| <strong>PersistenceOptions.VERSION_COLUMN_NAME</strong>: can be used to set the version column name which is used |
| to store the version of an object in case of optimistic locking. Default the version column name is e_version, however not all |
| databases support _ in the name.</li> |
| |
| </ul> |
| |
| </div> |
| </div> |
| </div> |
| </td> |
| </tr> |
| </table> |
| <div width="100%" id="footer"> |
| <table width="100%" cellpadding="4" cellspacing="0" border="0"> |
| <tr> |
| <td class="footer"><a href="license.html"> |
| Copyright © 2007 The Elver Project</a> |
| - All rights reserved. |
| </td> |
| </tr> |
| </table> |
| </div> |
| </body> |
| </html> |