diff options
Diffstat (limited to 'hibernate/org.eclipse.emf.teneo.hibernate.eclipse/src/org/eclipse/emf/teneo/hibernate/eclipse/GenerateHBMActionSuperClass.java')
-rwxr-xr-x | hibernate/org.eclipse.emf.teneo.hibernate.eclipse/src/org/eclipse/emf/teneo/hibernate/eclipse/GenerateHBMActionSuperClass.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.eclipse/src/org/eclipse/emf/teneo/hibernate/eclipse/GenerateHBMActionSuperClass.java b/hibernate/org.eclipse.emf.teneo.hibernate.eclipse/src/org/eclipse/emf/teneo/hibernate/eclipse/GenerateHBMActionSuperClass.java new file mode 100755 index 000000000..038ef4c6a --- /dev/null +++ b/hibernate/org.eclipse.emf.teneo.hibernate.eclipse/src/org/eclipse/emf/teneo/hibernate/eclipse/GenerateHBMActionSuperClass.java @@ -0,0 +1,39 @@ +/** + * <copyright> Copyright (c) 2005, 2006, 2007, 2008 Springsite BV (The Netherlands) and others All rights + * reserved. This program and the accompanying materials are made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html Contributors: Martin Taal </copyright> $Id: + * GenerateHBMActionSuperClass.java,v 1.2 2007/02/01 12:34:24 mtaal Exp $ + */ + +package org.eclipse.emf.teneo.hibernate.eclipse; + +import java.util.HashMap; + +import org.eclipse.emf.teneo.PersistenceOptions; +import org.eclipse.emf.teneo.annotations.pannotation.InheritanceType; +import org.eclipse.emf.teneo.eclipse.genxml.GenerateMappingAction; +import org.eclipse.emf.teneo.hibernate.HbConstants; +import org.eclipse.emf.teneo.hibernate.mapper.GenerateHBM; +import org.eclipse.jface.action.IAction; +import org.eclipse.ui.IActionDelegate; + +/** + * Eclipse popup action to generate a hbm file based on the ecore files. + * + * @author <a href="mailto:mtaal@elver.org">Martin Taal</a> + * @version $Revision: 1.7 $ + */ + +public class GenerateHBMActionSuperClass extends GenerateMappingAction { + /** + * @see IActionDelegate#run(IAction) + */ + @Override + public void run(IAction action) { + final HashMap<String, String> options = new HashMap<String, String>(); + options.put(PersistenceOptions.INHERITANCE_MAPPING, InheritanceType.SINGLE_TABLE.getName()); + super.run(action, HbConstants.HBM_FILE_NAME, Messages.getString("teneo.generate.hbm"), options, + GenerateHBM.class.getName()); + } +}
\ No newline at end of file |