/** * Copyright (c) 2012-2016 Marsha Chechik, Alessio Di Sandro, Michalis Famelis, * Rick Salay. * 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: * Alessio Di Sandro - Implementation. */ package edu.toronto.cs.se.modelepedia.relationaldatabase.impl; import edu.toronto.cs.se.modelepedia.relationaldatabase.*; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.impl.EFactoryImpl; import org.eclipse.emf.ecore.plugin.EcorePlugin; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class RelationalDatabaseFactoryImpl extends EFactoryImpl implements RelationalDatabaseFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static RelationalDatabaseFactory init() { try { RelationalDatabaseFactory theRelationalDatabaseFactory = (RelationalDatabaseFactory)EPackage.Registry.INSTANCE.getEFactory("http://se.cs.toronto.edu/modelepedia/RelationalDatabase"); if (theRelationalDatabaseFactory != null) { return theRelationalDatabaseFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new RelationalDatabaseFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public RelationalDatabaseFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case RelationalDatabasePackage.RELATIONAL_DATABASE: return createRelationalDatabase(); case RelationalDatabasePackage.TABLE: return createTable(); case RelationalDatabasePackage.COLUMN: return createColumn(); case RelationalDatabasePackage.FOREIGN_KEY: return createForeignKey(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public RelationalDatabase createRelationalDatabase() { RelationalDatabaseImpl relationalDatabase = new RelationalDatabaseImpl(); return relationalDatabase; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Table createTable() { TableImpl table = new TableImpl(); return table; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Column createColumn() { ColumnImpl column = new ColumnImpl(); return column; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ForeignKey createForeignKey() { ForeignKeyImpl foreignKey = new ForeignKeyImpl(); return foreignKey; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public RelationalDatabasePackage getRelationalDatabasePackage() { return (RelationalDatabasePackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static RelationalDatabasePackage getPackage() { return RelationalDatabasePackage.eINSTANCE; } } //RelationalDatabaseFactoryImpl