Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2007-07-18 14:56:30 -0400
committermtaal2007-07-18 14:56:30 -0400
commit66f338172dc8d8ec34ff35c9409fdecb58c3f662 (patch)
tree8c21f897b79ae4ba4f4496d28459666d6b90bc77
parent44b1f627cf264833da59a7a71cb57a06e4e21138 (diff)
downloadorg.eclipse.emf.teneo-66f338172dc8d8ec34ff35c9409fdecb58c3f662.tar.gz
org.eclipse.emf.teneo-66f338172dc8d8ec34ff35c9409fdecb58c3f662.tar.xz
org.eclipse.emf.teneo-66f338172dc8d8ec34ff35c9409fdecb58c3f662.zip
Changed sql name strategy truncation to first remove vowels.
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/extensions.html35
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/gmftutorial/teneo.mindmap2
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/resource_utility.xml2
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Dynamic.java4
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/QuickStart.java4
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Tutorial1.java4
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/jpox/extensions.html35
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/jpox/tutorial1/Tutorial1.java4
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/skin/inst.css2
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/skin/ns4_only.css2
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/skin/print.css2
-rw-r--r--doc/org.eclipse.emf.teneo.doc/tutorials/skin/tigris.css2
12 files changed, 56 insertions, 42 deletions
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/extensions.html b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/extensions.html
index 1a8bd8fa8..4386c7293 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/extensions.html
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/extensions.html
@@ -672,17 +672,20 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</p>
<p>
- This sql name strategy performs truncation of long names in a different
- way. It splits up the name in separate parts using the _ (underscore) as
- the separator. Using the underscore is logical because it is often used
- to create join table names. Then in a number of iterations it truncates
- the different parts by first truncating the part with the maximum
- length. In this way it tries to retain the unique name. In this example
- the resulting join table name will become c_pa, this is not very readable
- but at least probably more unique.
+ The truncation implemented in this name strategy performs truncation
+ by first removing vowels (the a, e, i, o, u) from the table and column names.
+ It will do this in the order u, o, a, e, i. It will remove one character at the
+ time which should result in the most readable names. If vowel removal did
+ not result in names with the correct length it will do further truncation.
+ Further truncation is done by splitting the name using the _ separator (common
+ separator in sql naming) and then truncating the longest part one character
+ at the time.
</p>
-<p>Other examples:</p>
+<p>Note that you can easily extend this class and pass your own 'removable' characters.
+ Using the extensions mechanism you can then replace the TeneoSQLNameStrategy with your own.</p>
+
+<p>Some examples:</p>
<ul>
@@ -690,12 +693,16 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
<li>child_father_mother (max length: 1) will be converted to c_f_m</li>
-<li>child_parent (max length: 7) will be converted to chi_par</li>
+<li>child_parent (max length: 7) will be converted to chl_prn</li>
+
+<li>child (max length: 4) will be converted to chld</li>
-<li>child (max length: 4) will be converted to chil</li>
+<li>
+ child.parent.id (max length: 14) will be converted to child_prent_id
+ </li>
<li>
- child.parent.id (max length: 14) will be converted to child_paren_id
+ child.parent.id (max length: 10) will be converted to chl_prn_d
</li>
</ul>
@@ -707,7 +714,7 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</div>
-<a name="N10111"></a><a name="ClassLoaderStrategy+ExtensionPoint%0A%09%09%09%09%28org.eclipse.emf.teneo.classloader.ClassLoaderStrategy%29"></a>
+<a name="N10117"></a><a name="ClassLoaderStrategy+ExtensionPoint%0A%09%09%09%09%28org.eclipse.emf.teneo.classloader.ClassLoaderStrategy%29"></a>
<div class="h3">
<h3>
ClassLoaderStrategy ExtensionPoint
@@ -730,7 +737,7 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</div>
-<a name="N10122"></a><a name="Future+Enhancements"></a>
+<a name="N10128"></a><a name="Future+Enhancements"></a>
<div class="h3">
<h3>Future Enhancements</h3>
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/gmftutorial/teneo.mindmap b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/gmftutorial/teneo.mindmap
index 752651bb6..678005b23 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/gmftutorial/teneo.mindmap
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/gmftutorial/teneo.mindmap
@@ -7,7 +7,7 @@
#
# @author <a href="mtaal@elver.org">Martin Taal</a>
-# @version $Revision: 1.10 $ $Date: 2007/07/18 16:11:21 $
+# @version $Revision: 1.11 $ $Date: 2007/07/18 18:56:31 $
# name: the name under which this information is used to register a EMFDataStore/Session Factory. Must be
# unique. IMPORTANT: this should be the same name as used in the calls to HibernateHelper
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/resource_utility.xml b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/resource_utility.xml
index 8ea1b9c33..7d5a94fce 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/resource_utility.xml
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/resource_utility.xml
@@ -6,7 +6,7 @@
http://www.eclipse.org/legal/epl-v10.html
--><!--
@author <a href="mtaal@elver.org">Martin Taal</a>
- @version $Revision: 1.15 $ $Date: 2007/07/18 16:11:21 $
+ @version $Revision: 1.16 $ $Date: 2007/07/18 18:56:31 $
--><!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">
<document>
&#9;<header>
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Dynamic.java b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Dynamic.java
index 14ef95c95..56ca51397 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Dynamic.java
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Dynamic.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: Dynamic.java,v 1.16 2007/07/18 16:11:21 mtaal Exp $
+ * $Id: Dynamic.java,v 1.17 2007/07/18 18:56:31 mtaal Exp $
*/
package hbtutorial;
@@ -41,7 +41,7 @@ import org.hibernate.Transaction;
* Dynamic Tutorial
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*/
public class Dynamic {
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/QuickStart.java b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/QuickStart.java
index 50489e174..81b35a02d 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/QuickStart.java
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/QuickStart.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: QuickStart.java,v 1.16 2007/07/18 16:11:21 mtaal Exp $
+ * $Id: QuickStart.java,v 1.17 2007/07/18 18:56:31 mtaal Exp $
*/
package hbtutorial;
@@ -33,7 +33,7 @@ import org.hibernate.Transaction;
* Quick Start Tutorial
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*/
public class QuickStart {
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Tutorial1.java b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Tutorial1.java
index 886fa1e72..3a52c6b7d 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Tutorial1.java
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/hibernate/samples/Tutorial1.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: Tutorial1.java,v 1.16 2007/07/18 16:11:21 mtaal Exp $
+ * $Id: Tutorial1.java,v 1.17 2007/07/18 18:56:31 mtaal Exp $
*/
package hbtutorial;
@@ -43,7 +43,7 @@ import org.hibernate.SessionFactory;
* Quick Start Tutorial
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*/
public class Tutorial1 {
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/extensions.html b/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/extensions.html
index 8dcbc6db0..fef455056 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/extensions.html
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/extensions.html
@@ -636,17 +636,20 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</p>
<p>
- This sql name strategy performs truncation of long names in a different
- way. It splits up the name in separate parts using the _ (underscore) as
- the separator. Using the underscore is logical because it is often used
- to create join table names. Then in a number of iterations it truncates
- the different parts by first truncating the part with the maximum
- length. In this way it tries to retain the unique name. In this example
- the resulting join table name will become c_pa, this is not very readable
- but at least probably more unique.
+ The truncation implemented in this name strategy performs truncation
+ by first removing vowels (the a, e, i, o, u) from the table and column names.
+ It will do this in the order u, o, a, e, i. It will remove one character at the
+ time which should result in the most readable names. If vowel removal did
+ not result in names with the correct length it will do further truncation. The
+ further truncation is done by splitting the name using the _ separator (common
+ separator in sql naming) and then truncating the longest part one character
+ at the time.
</p>
-<p>Other examples:</p>
+<p>Note that you can easily extend this class and pass your own 'removable' characters.
+ Using the extensions mechanism you can then replace the TeneoSQLNameStrategy with your own.</p>
+
+<p>Some examples:</p>
<ul>
@@ -654,12 +657,16 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
<li>child_father_mother (max length: 1) will be converted to c_f_m</li>
-<li>child_parent (max length: 7) will be converted to chi_par</li>
+<li>child_parent (max length: 7) will be converted to chl_prn</li>
+
+<li>child (max length: 4) will be converted to chld</li>
-<li>child (max length: 4) will be converted to chil</li>
+<li>
+ child.parent.id (max length: 14) will be converted to child_prent_id
+ </li>
<li>
- child.parent.id (max length: 14) will be converted to child_paren_id
+ child.parent.id (max length: 10) will be converted to chl_prn_d
</li>
</ul>
@@ -671,7 +678,7 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</div>
-<a name="N1010A"></a><a name="ClassLoaderStrategy+ExtensionPoint+%28org.eclipse.emf.teneo.classloader.ClassLoaderStrategy%29"></a>
+<a name="N10110"></a><a name="ClassLoaderStrategy+ExtensionPoint+%28org.eclipse.emf.teneo.classloader.ClassLoaderStrategy%29"></a>
<div class="h3">
<h3>ClassLoaderStrategy ExtensionPoint (org.eclipse.emf.teneo.classloader.ClassLoaderStrategy)</h3>
@@ -684,7 +691,7 @@ final EntityNameStrategy ens = extensionManager.getExtension(EntityNameStrategy.
</div>
-<a name="N1011B"></a><a name="Future+Enhancements"></a>
+<a name="N10121"></a><a name="Future+Enhancements"></a>
<div class="h3">
<h3>Future Enhancements</h3>
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/tutorial1/Tutorial1.java b/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/tutorial1/Tutorial1.java
index 8b369329d..6b4d0cc09 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/tutorial1/Tutorial1.java
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/jpox/tutorial1/Tutorial1.java
@@ -11,7 +11,7 @@
* Martin Taal
* </copyright>
*
- * $Id: Tutorial1.java,v 1.16 2007/07/18 16:11:21 mtaal Exp $
+ * $Id: Tutorial1.java,v 1.17 2007/07/18 18:56:31 mtaal Exp $
*/
package jpoxtutorial;
@@ -50,7 +50,7 @@ import org.jpox.PMFConfiguration;
* Tutorial
*
* @author <a href="mailto:mtaal@elver.org">Martin Taal</a>
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*/
public class Tutorial1 {
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/inst.css b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/inst.css
index 748d485de..ff5a5dab6 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/inst.css
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/inst.css
@@ -1,4 +1,4 @@
-/* $Id: inst.css,v 1.14 2007/07/18 16:11:21 mtaal Exp $
+/* $Id: inst.css,v 1.15 2007/07/18 18:56:31 mtaal Exp $
This file contains rules that extend or override the more basic formatting defined in tigris.css. Edit it to customize the look of applications using tigris.css (instances). You are responsible for maintaining your own set of (optional) deltas from tigris.css defaults; this file is intended as an example.
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/ns4_only.css b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/ns4_only.css
index 2846e129a..190fbacf7 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/ns4_only.css
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/ns4_only.css
@@ -1,4 +1,4 @@
-/* $Id: ns4_only.css,v 1.14 2007/07/18 16:11:21 mtaal Exp $
+/* $Id: ns4_only.css,v 1.15 2007/07/18 18:56:31 mtaal Exp $
simple rules suitable for Netscape 4.x only; richer rules are in tigris.css. see <http://style.tigris.org/> */
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/print.css b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/print.css
index eade37e6f..f3985d452 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/print.css
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/print.css
@@ -1,4 +1,4 @@
-/* $Id: print.css,v 1.14 2007/07/18 16:11:21 mtaal Exp $ */
+/* $Id: print.css,v 1.15 2007/07/18 18:56:31 mtaal Exp $ */
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks {
display: none;
diff --git a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/tigris.css b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/tigris.css
index 3248d933e..fa1a50abd 100644
--- a/doc/org.eclipse.emf.teneo.doc/tutorials/skin/tigris.css
+++ b/doc/org.eclipse.emf.teneo.doc/tutorials/skin/tigris.css
@@ -1,4 +1,4 @@
-/* $Id: tigris.css,v 1.14 2007/07/18 16:11:21 mtaal Exp $
+/* $Id: tigris.css,v 1.15 2007/07/18 18:56:30 mtaal Exp $
This file defines basic default formatting for HTML conforming to Tigris application style. To extend or override these rules for your instance, edit inst.css instead of this file. */

Back to the top