/*
 * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0,
 * or the Eclipse Distribution License v. 1.0 which is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 *
 * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
 */

// Contributors:
//     Oracle - initial API and implementation from Oracle TopLink
//     12/18/2009-2.1 Guy Pelletier
//       - 211323: Add class extractor support to the EclipseLink-ORM.XML Schema


package org.eclipse.persistence.testing.models.jpa.xml.inheritance;

import org.eclipse.persistence.tools.schemaframework.*;

/**
 * This class was generated by the TopLink table creator generator.
 * It stores the meta-data (tables) that define the database schema.
 * @see org.eclipse.persistence.sessions.factories.TableCreatorClassGenerator
 */
public class InheritanceTableCreator extends org.eclipse.persistence.tools.schemaframework.TableCreator {
    public InheritanceTableCreator() {
        setName("EJB3InheritanceProject");

        addTableDefinition(buildBICYCLETable());
        addTableDefinition(buildBOATTable());
        addTableDefinition(buildBUSTable());
        addTableDefinition(buildSPORTSCARTable());
        addTableDefinition(buildTIREINFOTable());
        addTableDefinition(buildFUEL_VEHTable());
        addTableDefinition(buildVEHICLETable());
        addTableDefinition(buildCOMPANYTable());
        addTableDefinition(buildENGINEERTable());
        addTableDefinition(buildPERSONTable());

        addTableDefinition(buildAPPLETable());
        addTableDefinition(buildMACBOOKTable());
        addTableDefinition(buildMACBOOKPROTable());
    }

    public TableDefinition buildAPPLETable() {
        TableDefinition table = new TableDefinition();
        table.setName("XML_APPLE");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        table.addField(fieldID);

        return table;
    }

    public TableDefinition buildMACBOOKTable() {
        TableDefinition table = new TableDefinition();
        table.setName("XML_MACBOOK");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("XML_APPLE.ID");
        table.addField(fieldID);

        FieldDefinition fieldRAM = new FieldDefinition();
        fieldRAM.setName("RAM");
        fieldRAM.setTypeName("NUMBER");
        fieldRAM.setSize(10);
        fieldRAM.setSubSize(0);
        fieldRAM.setIsPrimaryKey(false);
        fieldRAM.setIsIdentity(false);
        fieldRAM.setUnique(false);
        fieldRAM.setShouldAllowNull(true);
        table.addField(fieldRAM);

        return table;
    }

    public TableDefinition buildMACBOOKPROTable() {
        TableDefinition table = new TableDefinition();
        table.setName("XML_MACBOOK_PRO");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("XML_MACBOOK.ID");
        table.addField(fieldID);

        FieldDefinition fieldCOLOR = new FieldDefinition();
        fieldCOLOR.setName("COLOR");
        fieldCOLOR.setTypeName("VARCHAR2");
        fieldCOLOR.setSize(10);
        fieldCOLOR.setSubSize(0);
        fieldCOLOR.setIsPrimaryKey(false);
        fieldCOLOR.setIsIdentity(false);
        fieldCOLOR.setUnique(false);
        fieldCOLOR.setShouldAllowNull(true);
        table.addField(fieldCOLOR);

        return table;
    }

    public TableDefinition buildBICYCLETable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_BICYCLE");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("CMP3_XML_VEHICLE.ID");
        table.addField(fieldID);

        FieldDefinition fieldDESCRIP = new FieldDefinition();
        fieldDESCRIP.setName("DESCRIP");
        fieldDESCRIP.setTypeName("VARCHAR2");
        fieldDESCRIP.setSize(10);
        fieldDESCRIP.setSubSize(0);
        fieldDESCRIP.setIsPrimaryKey(false);
        fieldDESCRIP.setIsIdentity(false);
        fieldDESCRIP.setUnique(false);
        fieldDESCRIP.setShouldAllowNull(true);
        table.addField(fieldDESCRIP);

        return table;
    }

    public TableDefinition buildBOATTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_BOAT");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("BOAT_ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(false);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(true);
        fieldID.setForeignKeyFieldName("CMP3_XML_VEHICLE.ID");
        table.addField(fieldID);

        FieldDefinition fieldMODEL = new FieldDefinition();
        fieldMODEL.setName("MODEL");
        fieldMODEL.setTypeName("VARCHAR2");
        fieldMODEL.setSize(10);
        fieldMODEL.setSubSize(0);
        fieldMODEL.setIsPrimaryKey(false);
        fieldMODEL.setIsIdentity(false);
        fieldMODEL.setUnique(false);
        fieldMODEL.setShouldAllowNull(true);
        table.addField(fieldMODEL);

        return table;
    }

    public TableDefinition buildBUSTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_BUS");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("BUS_ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("CMP3_XML_FUEL_VEH.ID");
        table.addField(fieldID);

        FieldDefinition fieldDRIVER_ID = new FieldDefinition();
        fieldDRIVER_ID.setName("DRIVER_ID");
        fieldDRIVER_ID.setTypeName("NUMBER");
        fieldDRIVER_ID.setSize(15);
        fieldDRIVER_ID.setSubSize(0);
        fieldDRIVER_ID.setIsPrimaryKey(false);
        fieldDRIVER_ID.setIsIdentity(false);
        fieldDRIVER_ID.setUnique(false);
        fieldDRIVER_ID.setShouldAllowNull(true);
        fieldDRIVER_ID.setForeignKeyFieldName("CMP3_XML_PERSON.ID");
        table.addField(fieldDRIVER_ID);

        return table;
    }

    public TableDefinition buildSPORTSCARTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_SPORTS_CAR");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("CMP3_XML_FUEL_VEH.ID");
        table.addField(fieldID);

        FieldDefinition fieldFUEL_CAP = new FieldDefinition();
        fieldFUEL_CAP.setName("MAX_SPEED");
        fieldFUEL_CAP.setTypeName("NUMBER");
        fieldFUEL_CAP.setSize(10);
        fieldFUEL_CAP.setSubSize(0);
        fieldFUEL_CAP.setIsPrimaryKey(false);
        fieldFUEL_CAP.setIsIdentity(false);
        fieldFUEL_CAP.setUnique(false);
        fieldFUEL_CAP.setShouldAllowNull(true);
        table.addField(fieldFUEL_CAP);

        return table;
    }

    public TableDefinition buildCOMPANYTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_COMPANY");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        table.addField(fieldID);

        FieldDefinition fieldNAME = new FieldDefinition();
        fieldNAME.setName("NAME");
        fieldNAME.setTypeName("VARCHAR2");
        fieldNAME.setSize(100);
        fieldNAME.setSubSize(0);
        fieldNAME.setIsPrimaryKey(false);
        fieldNAME.setIsIdentity(false);
        fieldNAME.setUnique(false);
        fieldNAME.setShouldAllowNull(false);
        table.addField(fieldNAME);

        return table;
    }

    public TableDefinition buildFUEL_VEHTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_FUEL_VEH");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        fieldID.setForeignKeyFieldName("CMP3_XML_VEHICLE.ID");
        table.addField(fieldID);

        FieldDefinition fieldDESCRIP = new FieldDefinition();
        fieldDESCRIP.setName("DESCRIP");
        fieldDESCRIP.setTypeName("VARCHAR2");
        fieldDESCRIP.setSize(30);
        fieldDESCRIP.setSubSize(0);
        fieldDESCRIP.setIsPrimaryKey(false);
        fieldDESCRIP.setIsIdentity(false);
        fieldDESCRIP.setUnique(false);
        fieldDESCRIP.setShouldAllowNull(true);
        table.addField(fieldDESCRIP);

        FieldDefinition fieldFUEL_CAP = new FieldDefinition();
        fieldFUEL_CAP.setName("FUEL_CAP");
        fieldFUEL_CAP.setTypeName("NUMBER");
        fieldFUEL_CAP.setSize(10);
        fieldFUEL_CAP.setSubSize(0);
        fieldFUEL_CAP.setIsPrimaryKey(false);
        fieldFUEL_CAP.setIsIdentity(false);
        fieldFUEL_CAP.setUnique(false);
        fieldFUEL_CAP.setShouldAllowNull(true);
        table.addField(fieldFUEL_CAP);

        FieldDefinition fieldFUEL_TYP = new FieldDefinition();
        fieldFUEL_TYP.setName("FUEL_TYP");
        fieldFUEL_TYP.setTypeName("VARCHAR2");
        fieldFUEL_TYP.setSize(30);
        fieldFUEL_TYP.setSubSize(0);
        fieldFUEL_TYP.setIsPrimaryKey(false);
        fieldFUEL_TYP.setIsIdentity(false);
        fieldFUEL_TYP.setUnique(false);
        fieldFUEL_TYP.setShouldAllowNull(true);
        table.addField(fieldFUEL_TYP);

        return table;
    }

    public TableDefinition buildENGINEERTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_ENGINEER");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        table.addField(fieldID);

        FieldDefinition fieldTITLE = new FieldDefinition();
        fieldTITLE.setName("TITLE");
        fieldTITLE.setTypeName("VARCHAR2");
        fieldTITLE.setSize(10);
        fieldTITLE.setSubSize(0);
        fieldTITLE.setIsPrimaryKey(false);
        fieldTITLE.setIsIdentity(false);
        fieldTITLE.setUnique(false);
        fieldTITLE.setShouldAllowNull(true);
        table.addField(fieldTITLE);

        return table;
    }

    public TableDefinition buildPERSONTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_PERSON");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        table.addField(fieldID);

        FieldDefinition fieldNAME = new FieldDefinition();
        fieldNAME.setName("NAME");
        fieldNAME.setTypeName("VARCHAR2");
        fieldNAME.setSize(20);
        fieldNAME.setSubSize(0);
        fieldNAME.setIsPrimaryKey(false);
        fieldNAME.setIsIdentity(false);
        fieldNAME.setUnique(false);
        fieldNAME.setShouldAllowNull(true);
        table.addField(fieldNAME);

        FieldDefinition fieldC_TYPE = new FieldDefinition();
        fieldC_TYPE.setName("DTYPE");
        fieldC_TYPE.setTypeName("VARCHAR2");
        fieldC_TYPE.setSize(100);
        fieldC_TYPE.setSubSize(0);
        fieldC_TYPE.setIsPrimaryKey(false);
        fieldC_TYPE.setIsIdentity(false);
        fieldC_TYPE.setUnique(false);
        fieldC_TYPE.setShouldAllowNull(true);
        table.addField(fieldC_TYPE);

        FieldDefinition fieldREP_ID = new FieldDefinition();
        fieldREP_ID.setName("REP_ID");
        fieldREP_ID.setTypeName("NUMBER");
        fieldREP_ID.setSize(15);
        fieldREP_ID.setSubSize(0);
        fieldREP_ID.setIsPrimaryKey(false);
        fieldREP_ID.setIsIdentity(false);
        fieldREP_ID.setUnique(false);
        fieldREP_ID.setShouldAllowNull(true);
        fieldREP_ID.setForeignKeyFieldName("CMP3_XML_PERSON.ID");
        table.addField(fieldREP_ID);

        FieldDefinition fieldFRIEND_ID = new FieldDefinition();
        fieldFRIEND_ID.setName("FRIEND_ID");
        fieldFRIEND_ID.setTypeName("NUMBER");
        fieldFRIEND_ID.setSize(15);
        fieldFRIEND_ID.setSubSize(0);
        fieldFRIEND_ID.setIsPrimaryKey(false);
        fieldFRIEND_ID.setIsIdentity(false);
        fieldFRIEND_ID.setUnique(false);
        fieldFRIEND_ID.setShouldAllowNull(true);
        fieldFRIEND_ID.setForeignKeyFieldName("CMP3_XML_ENGINEER.ID");
        table.addField(fieldFRIEND_ID);

        FieldDefinition fieldCAR_ID = new FieldDefinition();
        fieldCAR_ID.setName("CAR_ID");
        fieldCAR_ID.setTypeName("NUMBER");
        fieldCAR_ID.setSize(15);
        fieldCAR_ID.setSubSize(0);
        fieldCAR_ID.setIsPrimaryKey(false);
        fieldCAR_ID.setIsIdentity(false);
        fieldCAR_ID.setUnique(false);
        fieldCAR_ID.setShouldAllowNull(true);
        fieldCAR_ID.setForeignKeyFieldName("CMP3_XML_FUEL_VEH.ID");
        table.addField(fieldCAR_ID);

        FieldDefinition fieldBOAT_ID = new FieldDefinition();
        fieldBOAT_ID.setName("BOAT_ID");
        fieldBOAT_ID.setTypeName("NUMBER");
        fieldBOAT_ID.setSize(15);
        fieldBOAT_ID.setSubSize(0);
        fieldBOAT_ID.setIsPrimaryKey(false);
        fieldBOAT_ID.setIsIdentity(false);
        fieldBOAT_ID.setUnique(false);
        fieldBOAT_ID.setShouldAllowNull(true);
        table.addField(fieldBOAT_ID);

        return table;
    }

    public TableDefinition buildVEHICLETable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_VEHICLE");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(true);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(false);
        table.addField(fieldID);

        FieldDefinition fieldTYPE = new FieldDefinition();
        fieldTYPE.setName("VEH_TYPE");
        fieldTYPE.setTypeName("VARCHAR2");
        fieldTYPE.setSize(15);
        fieldTYPE.setSubSize(0);
        fieldTYPE.setIsPrimaryKey(false);
        fieldTYPE.setIsIdentity(false);
        fieldTYPE.setUnique(false);
        fieldTYPE.setShouldAllowNull(true);
        table.addField(fieldTYPE);

        FieldDefinition fieldCAPACITY = new FieldDefinition();
        fieldCAPACITY.setName("CAPACITY");
        fieldCAPACITY.setTypeName("NUMBER");
        fieldCAPACITY.setSize(10);
        fieldCAPACITY.setSubSize(0);
        fieldCAPACITY.setIsPrimaryKey(false);
        fieldCAPACITY.setIsIdentity(false);
        fieldCAPACITY.setUnique(false);
        fieldCAPACITY.setShouldAllowNull(true);
        table.addField(fieldCAPACITY);

        FieldDefinition fieldOWNER_ID = new FieldDefinition();
        fieldOWNER_ID.setName("OWNER_ID");
        fieldOWNER_ID.setTypeName("NUMBER");
        fieldOWNER_ID.setSize(15);
        fieldOWNER_ID.setSubSize(0);
        fieldOWNER_ID.setIsPrimaryKey(false);
        fieldOWNER_ID.setIsIdentity(false);
        fieldOWNER_ID.setUnique(false);
        fieldOWNER_ID.setShouldAllowNull(true);
        fieldOWNER_ID.setForeignKeyFieldName("CMP3_XML_COMPANY.ID");
        table.addField(fieldOWNER_ID);

        return table;
    }

    public TableDefinition buildTIREINFOTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_TIRE");

        FieldDefinition fieldID = new FieldDefinition();
        fieldID.setName("ID");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(false);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(true);
        table.addField(fieldID);

        fieldID = new FieldDefinition();
        fieldID.setName("PRESSURE");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(false);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(true);
        table.addField(fieldID);

        fieldID = new FieldDefinition();
        fieldID.setName("SPEEDRATING");
        fieldID.setTypeName("NUMBER");
        fieldID.setSize(15);
        fieldID.setSubSize(0);
        fieldID.setIsPrimaryKey(false);
        fieldID.setIsIdentity(false);
        fieldID.setUnique(false);
        fieldID.setShouldAllowNull(true);
        table.addField(fieldID);

        FieldDefinition fieldTYPE = new FieldDefinition();
        fieldTYPE.setName("TIRE_TYPE");
        fieldTYPE.setTypeName("VARCHAR2");
        fieldTYPE.setSize(15);
        fieldTYPE.setSubSize(0);
        fieldTYPE.setIsPrimaryKey(false);
        fieldTYPE.setIsIdentity(false);
        fieldTYPE.setUnique(false);
        fieldTYPE.setShouldAllowNull(true);
        table.addField(fieldTYPE);

        return table;
    }

    public TableDefinition buildVEH_SEQTable() {
        TableDefinition table = new TableDefinition();
        table.setName("CMP3_XML_INHERITANCE_SEQ");

        FieldDefinition fieldSEQ_COUNT = new FieldDefinition();
        fieldSEQ_COUNT.setName("SEQ_COUNT");
        fieldSEQ_COUNT.setTypeName("NUMBER");
        fieldSEQ_COUNT.setSize(15);
        fieldSEQ_COUNT.setSubSize(0);
        fieldSEQ_COUNT.setIsPrimaryKey(false);
        fieldSEQ_COUNT.setIsIdentity(false);
        fieldSEQ_COUNT.setUnique(false);
        fieldSEQ_COUNT.setShouldAllowNull(false);
        table.addField(fieldSEQ_COUNT);

        FieldDefinition fieldSEQ_NAME = new FieldDefinition();
        fieldSEQ_NAME.setName("SEQ_NAME");
        fieldSEQ_NAME.setTypeName("VARCHAR2");
        fieldSEQ_NAME.setSize(80);
        fieldSEQ_NAME.setSubSize(0);
        fieldSEQ_NAME.setIsPrimaryKey(true);
        fieldSEQ_NAME.setIsIdentity(false);
        fieldSEQ_NAME.setUnique(false);
        fieldSEQ_NAME.setShouldAllowNull(false);
        table.addField(fieldSEQ_NAME);

        return table;
    }
}
