Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-02-05 08:04:46 -0500
committermtaal2007-02-05 08:04:46 -0500
commit13175be85ed052f2d5c1867510fdfb2a2dc0d820 (patch)
tree7ea982923beed67adfce3004df9f4c5af8c04e87
parent940067ad8cd61405f76c2d66ec492c376b7c7a17 (diff)
downloadorg.eclipse.emf.teneo-13175be85ed052f2d5c1867510fdfb2a2dc0d820.tar.gz
org.eclipse.emf.teneo-13175be85ed052f2d5c1867510fdfb2a2dc0d820.tar.xz
org.eclipse.emf.teneo-13175be85ed052f2d5c1867510fdfb2a2dc0d820.zip
[172756]
-rw-r--r--plugins/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/PersistenceOptions.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/PersistenceOptions.java b/plugins/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/PersistenceOptions.java
index 2a15705ed..8cc1720eb 100644
--- a/plugins/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/PersistenceOptions.java
+++ b/plugins/org.eclipse.emf.teneo/src/org/eclipse/emf/teneo/PersistenceOptions.java
@@ -12,7 +12,7 @@
*
* </copyright>
*
- * $Id: PersistenceOptions.java,v 1.17 2007/02/01 12:34:21 mtaal Exp $
+ * $Id: PersistenceOptions.java,v 1.18 2007/02/05 13:04:46 mtaal Exp $
*/
package org.eclipse.emf.teneo;
@@ -40,7 +40,7 @@ import org.eclipse.emf.teneo.util.SQLCaseStrategyImpl;
* As a convenience, this class offers type-safe property accessor wrappers.
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*/
public class PersistenceOptions {
@@ -106,6 +106,9 @@ public class PersistenceOptions {
/** Name of id column, default value is e_id */
public static final String ID_COLUMN_NAME = NAMING_PREFIX + "default_id_column";
+ /** The name of the id feature if no feature has a @id annotation */
+ public static final String DEFAULT_ID_FEATURE_NAME = NAMING_PREFIX + "default_id_feature";
+
/**
* The path of the persistence XML file.
*/
@@ -178,6 +181,7 @@ public class PersistenceOptions {
props.setProperty(DEFAULT_CACHE_STRATEGY, "NONE");
props.setProperty(JOIN_TABLE_NAMING_STRATEGY, "ejb3");
props.setProperty(DEFAULT_TEMPORAL_VALUE, "TIMESTAMP");
+ props.setProperty(DEFAULT_ID_FEATURE_NAME, "e_id");
return props;
}
@@ -311,6 +315,11 @@ public class PersistenceOptions {
return properties.getProperty(ID_COLUMN_NAME);
}
+ /** Returns the value of the default id property*/
+ public String getDefaultIDFeatureName() {
+ return properties.getProperty(DEFAULT_ID_FEATURE_NAME);
+ }
+
/** Returns the value of the join table naming strategy */
public String getJoinTableNamingStrategy() {
return properties.getProperty(JOIN_TABLE_NAMING_STRATEGY);

Back to the top