public TableDefinition buildCHILDNAMTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CHILDNAM");

    FieldDefinition fieldHOLDER_ID = new FieldDefinition();
    fieldHOLDER_ID.setName("HOLDER_ID");
    fieldHOLDER_ID.setTypeName("NUMBER");
    fieldHOLDER_ID.setSize(18);
    fieldHOLDER_ID.setSubSize(0);
    fieldHOLDER_ID.setIsPrimaryKey(true);
    fieldHOLDER_ID.setIsIdentity(false);
    fieldHOLDER_ID.setUnique(false);
    fieldHOLDER_ID.setShouldAllowNull(false);
    table.addField(fieldHOLDER_ID);

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

    ForeignKeyConstraint foreignKeyFK_CHILDNAM_HOLDER_ID = new ForeignKeyConstraint();
    foreignKeyFK_CHILDNAM_HOLDER_ID.setName("CHILD_HOLDER");
    foreignKeyFK_CHILDNAM_HOLDER_ID.setTargetTable("HOLDER");
    foreignKeyFK_CHILDNAM_HOLDER_ID.addSourceField("HOLDER_ID");
    foreignKeyFK_CHILDNAM_HOLDER_ID.addTargetField("SSN");
    table.addForeignKeyConstraint(foreignKeyFK_CHILDNAM_HOLDER_ID);

    return table;
  }
  public static TableDefinition buildEMPLOYEE_SEQTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CMP3_XML_EMPLOYEE_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;
  }
  public TableDefinition buildAboutToInsertSingleTable() {
    TableDefinition table = new TableDefinition();
    table.setName("AboutToInsertSingle");

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

    FieldDefinition fieldNUMBER = new FieldDefinition();
    fieldNUMBER.setName("EXTRA_NUMBER");
    fieldNUMBER.setTypeName("NUMERIC");
    fieldNUMBER.setSize(28);
    fieldNUMBER.setSubSize(0);
    fieldNUMBER.setIsPrimaryKey(false);
    fieldNUMBER.setIsIdentity(false);
    fieldNUMBER.setUnique(false);
    fieldNUMBER.setShouldAllowNull(true);
    table.addField(fieldNUMBER);

    return table;
  }
  public static TableDefinition buildENGINETable() {
    // CREATE TABLE JPA_OR_ENGINE (ID NUMBER(10) NOT NULL, SERIALNUMBER NUMBER(19) NULL, PRIMARY KEY
    // (ID))
    TableDefinition table = new TableDefinition();
    table.setName("JPA_OR_ENGINE");

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

    FieldDefinition fieldSERIALNUMBER = new FieldDefinition();
    fieldSERIALNUMBER.setName("SERIALNUMBER");
    fieldSERIALNUMBER.setTypeName("NUMERIC");
    fieldSERIALNUMBER.setSize(18);
    fieldSERIALNUMBER.setSubSize(0);
    fieldSERIALNUMBER.setIsPrimaryKey(false);
    fieldSERIALNUMBER.setIsIdentity(false);
    fieldSERIALNUMBER.setShouldAllowNull(true);
    fieldSERIALNUMBER.setUnique(false);
    table.addField(fieldSERIALNUMBER);

    return table;
  }
  public static TableDefinition buildTIREDETAILTable() {
    // 474752 :CREATE TABLE TIREDETAIL (ID NUMBER(10) NOT NULL, DETAIL VARCHAR2(255), PRIMARY KEY
    // (ID))
    TableDefinition table = new TableDefinition();
    table.setName("OR_TIREDETAIL");

    FieldDefinition fieldID = new FieldDefinition();
    fieldID.setName("TIRE_ID");
    fieldID.setTypeName("NUMERIC");
    fieldID.setSize(10);
    fieldID.setSubSize(0);
    fieldID.setIsPrimaryKey(true);
    fieldID.setIsIdentity(true);
    fieldID.setShouldAllowNull(false);
    fieldID.setUnique(false);
    table.addField(fieldID);

    FieldDefinition fieldDetail = new FieldDefinition();
    fieldDetail.setName("DETAIL");
    fieldDetail.setTypeName("VARCHAR");
    fieldDetail.setSize(255);
    fieldDetail.setSubSize(0);
    fieldDetail.setIsPrimaryKey(false);
    fieldDetail.setIsIdentity(false);
    fieldDetail.setShouldAllowNull(true);
    fieldDetail.setUnique(false);
    table.addField(fieldDetail);

    return table;
  }
  public TableDefinition buildVHCL_POLTable() {
    TableDefinition table = new TableDefinition();
    table.setName("VHCL_POL");

    FieldDefinition fieldPOL_ID = new FieldDefinition();
    fieldPOL_ID.setName("POL_ID");
    fieldPOL_ID.setTypeName("NUMBER");
    fieldPOL_ID.setSize(18);
    fieldPOL_ID.setSubSize(0);
    fieldPOL_ID.setIsPrimaryKey(true);
    fieldPOL_ID.setIsIdentity(false);
    fieldPOL_ID.setUnique(false);
    fieldPOL_ID.setShouldAllowNull(false);
    table.addField(fieldPOL_ID);

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

    ForeignKeyConstraint foreignKeyFK_VHCL_POL_POL_ID = new ForeignKeyConstraint();
    foreignKeyFK_VHCL_POL_POL_ID.setName("VHCL_POL_POLICY");
    foreignKeyFK_VHCL_POL_POL_ID.setTargetTable("POLICY");
    foreignKeyFK_VHCL_POL_POL_ID.addSourceField("POL_ID");
    foreignKeyFK_VHCL_POL_POL_ID.addTargetField("POL_ID");
    table.addForeignKeyConstraint(foreignKeyFK_VHCL_POL_POL_ID);

    return table;
  }
  public static TableDefinition buildSALARYTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CMP3_XML_SALARY");

    FieldDefinition fieldEMP_ID = new FieldDefinition();
    fieldEMP_ID.setName("E_ID");
    fieldEMP_ID.setTypeName("NUMERIC");
    fieldEMP_ID.setSize(15);
    fieldEMP_ID.setSubSize(0);
    fieldEMP_ID.setIsPrimaryKey(true);
    fieldEMP_ID.setIsIdentity(false);
    fieldEMP_ID.setUnique(false);
    fieldEMP_ID.setShouldAllowNull(false);
    fieldEMP_ID.setForeignKeyFieldName("CMP3_XML_EMPLOYEE.EMP_ID");
    table.addField(fieldEMP_ID);

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

    return table;
  }
  public static TableDefinition buildCHASSISTable() {
    // CREATE TABLE JPA_OR_CHASSIS (ID NUMBER(10) NOT NULL, SERIALNUMBER NUMBER(19) NULL, PRIMARY
    // KEY (ID))
    TableDefinition table = new TableDefinition();
    table.setName("JPA_OR_CHASSIS");

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

    FieldDefinition serialNumber = new FieldDefinition();
    serialNumber.setName("SERIALNUMBER");
    serialNumber.setTypeName("NUMERIC");
    serialNumber.setSize(18);
    serialNumber.setSubSize(0);
    serialNumber.setIsPrimaryKey(false);
    serialNumber.setIsIdentity(false);
    serialNumber.setShouldAllowNull(true);
    serialNumber.setUnique(false);
    table.addField(serialNumber);

    return table;
  }
  public static TableDefinition buildPARTNERLINKTable() {
    TableDefinition table = new TableDefinition();
    table.setName("XML_MW");

    FieldDefinition fieldMID = new FieldDefinition();
    fieldMID.setName("M");
    fieldMID.setTypeName("NUMERIC");
    fieldMID.setSize(15);
    fieldMID.setSubSize(0);
    fieldMID.setIsPrimaryKey(false);
    fieldMID.setIsIdentity(false);
    fieldMID.setUnique(false);
    fieldMID.setShouldAllowNull(true);
    fieldMID.setForeignKeyFieldName("XML_MAN.ID");
    table.addField(fieldMID);

    FieldDefinition fieldWID = new FieldDefinition();
    fieldWID.setName("W");
    fieldWID.setTypeName("NUMERIC");
    fieldWID.setSize(15);
    fieldWID.setSubSize(0);
    fieldWID.setIsPrimaryKey(false);
    fieldWID.setIsIdentity(false);
    fieldWID.setUnique(false);
    fieldWID.setShouldAllowNull(true);
    fieldWID.setForeignKeyFieldName("XML_WOMAN.ID");
    table.addField(fieldWID);

    return table;
  }
  public TableDefinition buildINS_PHONETable() {
    TableDefinition table = new TableDefinition();
    table.setName("INS_PHONE");

    FieldDefinition fieldHOLDER_SSN = new FieldDefinition();
    fieldHOLDER_SSN.setName("HOLDER_SSN");
    fieldHOLDER_SSN.setTypeName("NUMBER");
    fieldHOLDER_SSN.setSize(18);
    fieldHOLDER_SSN.setSubSize(0);
    fieldHOLDER_SSN.setIsPrimaryKey(true);
    fieldHOLDER_SSN.setIsIdentity(false);
    fieldHOLDER_SSN.setUnique(false);
    fieldHOLDER_SSN.setShouldAllowNull(false);
    table.addField(fieldHOLDER_SSN);

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

    FieldDefinition fieldAREACODE = new FieldDefinition();
    fieldAREACODE.setName("AREACODE");
    fieldAREACODE.setTypeName("NUMBER");
    fieldAREACODE.setSize(3);
    fieldAREACODE.setSubSize(0);
    fieldAREACODE.setIsPrimaryKey(false);
    fieldAREACODE.setIsIdentity(false);
    fieldAREACODE.setUnique(false);
    fieldAREACODE.setShouldAllowNull(true);
    table.addField(fieldAREACODE);

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

    ForeignKeyConstraint foreignKeyFK_INS_PHONE_HOLDER_SSN = new ForeignKeyConstraint();
    foreignKeyFK_INS_PHONE_HOLDER_SSN.setName("INS_PHONE_HOLDER");
    foreignKeyFK_INS_PHONE_HOLDER_SSN.setTargetTable("HOLDER");
    foreignKeyFK_INS_PHONE_HOLDER_SSN.addSourceField("HOLDER_SSN");
    foreignKeyFK_INS_PHONE_HOLDER_SSN.addTargetField("SSN");
    table.addForeignKeyConstraint(foreignKeyFK_INS_PHONE_HOLDER_SSN);

    return table;
  }
  public static TableDefinition buildSPARKPLUGTable() {
    // CREATE TABLE JPA_OR_SPARK_PLUG (ID NUMBER(10) NOT NULL, SERIALNUMBER NUMBER(19) NULL,
    // ENGINE_ID NUMBER(10) NULL, PRIMARY KEY (ID))
    TableDefinition table = new TableDefinition();
    table.setName("JPA_OR_SPARK_PLUG");

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

    FieldDefinition fieldSERIALNUMBER = new FieldDefinition();
    fieldSERIALNUMBER.setName("SERIALNUMBER");
    fieldSERIALNUMBER.setTypeName("NUMERIC");
    fieldSERIALNUMBER.setSize(18);
    fieldSERIALNUMBER.setSubSize(0);
    fieldSERIALNUMBER.setIsPrimaryKey(false);
    fieldSERIALNUMBER.setIsIdentity(false);
    fieldSERIALNUMBER.setShouldAllowNull(true);
    fieldSERIALNUMBER.setUnique(false);
    table.addField(fieldSERIALNUMBER);

    FieldDefinition fieldENGINE = new FieldDefinition();
    fieldENGINE.setName("ENGINE_ID");
    fieldENGINE.setTypeName("NUMERIC");
    fieldENGINE.setSize(10);
    fieldENGINE.setSubSize(0);
    fieldENGINE.setIsPrimaryKey(false);
    fieldENGINE.setIsIdentity(false);
    fieldENGINE.setShouldAllowNull(true);
    fieldENGINE.setUnique(false);
    table.addField(fieldENGINE);

    // ALTER TABLE JPA_OR_SPARK_PLUG ADD CONSTRAINT JPA_OR_SPARK_PLUG_ENGINE_ID FOREIGN KEY
    // (ENGINE_ID) REFERENCES JPA_OR_ENGINE (ID)
    ForeignKeyConstraint foreignKeySPARKPLUG_ENGINE = new ForeignKeyConstraint();
    foreignKeySPARKPLUG_ENGINE.setName("FK_SPK_PG_ENG_ID");
    foreignKeySPARKPLUG_ENGINE.setTargetTable("JPA_OR_ENGINE");
    foreignKeySPARKPLUG_ENGINE.addSourceField("ENGINE_ID");
    foreignKeySPARKPLUG_ENGINE.addTargetField("ID");
    table.addForeignKeyConstraint(foreignKeySPARKPLUG_ENGINE);

    return table;
  }
Ejemplo n.º 12
0
  public TableDefinition buildPHONEVLIOTable() {
    TableDefinition table = new TableDefinition();
    table.setName("PHONEVLIO");

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

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

    FieldDefinition fieldAREA_CODE = new FieldDefinition();
    fieldAREA_CODE.setName("AREA_CODE");
    fieldAREA_CODE.setTypeName("VARCHAR2");
    fieldAREA_CODE.setSize(3);
    fieldAREA_CODE.setSubSize(0);
    fieldAREA_CODE.setIsPrimaryKey(false);
    fieldAREA_CODE.setIsIdentity(false);
    fieldAREA_CODE.setUnique(false);
    fieldAREA_CODE.setShouldAllowNull(true);
    table.addField(fieldAREA_CODE);

    FieldDefinition fieldP_NUMBER = new FieldDefinition();
    fieldP_NUMBER.setName("P_NUMBER");
    fieldP_NUMBER.setTypeName("VARCHAR2");
    fieldP_NUMBER.setSize(7);
    fieldP_NUMBER.setSubSize(0);
    fieldP_NUMBER.setIsPrimaryKey(false);
    fieldP_NUMBER.setIsIdentity(false);
    fieldP_NUMBER.setUnique(false);
    fieldP_NUMBER.setShouldAllowNull(true);
    table.addField(fieldP_NUMBER);

    return table;
  }
  public TableDefinition buildRewardTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_REWARD");

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

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

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

    FieldDefinition fieldMafiosoId = new FieldDefinition();
    fieldMafiosoId.setName("MAFIOSO_ID");
    fieldMafiosoId.setTypeName("NUMERIC");
    fieldMafiosoId.setSize(15);
    fieldMafiosoId.setShouldAllowNull(false);
    fieldMafiosoId.setIsPrimaryKey(true);
    fieldMafiosoId.setUnique(false);
    fieldMafiosoId.setIsIdentity(false);
    fieldMafiosoId.setForeignKeyFieldName("JPA_MAFIOSO.ID");
    table.addField(fieldMafiosoId);

    return table;
  }
  public TableDefinition buildContractTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_CONTRACT");

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

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

    FieldDefinition fieldVersion = new FieldDefinition();
    fieldVersion.setName("VERSION");
    fieldVersion.setTypeName("NUMERIC");
    fieldVersion.setSize(15);
    fieldVersion.setShouldAllowNull(true);
    fieldVersion.setIsPrimaryKey(false);
    fieldVersion.setUnique(false);
    fieldVersion.setIsIdentity(false);
    table.addField(fieldVersion);

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

    return table;
  }
  public TableDefinition buildMafiaFamily_TagsTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_FAMILY_TAGS");

    FieldDefinition fieldFamilyId = new FieldDefinition();
    fieldFamilyId.setName("FAMILY_ID");
    fieldFamilyId.setTypeName("NUMERIC");
    fieldFamilyId.setSize(15);
    fieldFamilyId.setIsPrimaryKey(false);
    fieldFamilyId.setIsIdentity(false);
    fieldFamilyId.setUnique(false);
    fieldFamilyId.setShouldAllowNull(false);
    // fieldFamilyId.setForeignKeyFieldName("JPA_MAFIA_FAMILY.ID");
    table.addField(fieldFamilyId);

    FieldDefinition fieldTag = new FieldDefinition();
    fieldTag.setName("TAG");
    fieldTag.setTypeName("VARCHAR2");
    fieldTag.setSize(60);
    fieldTag.setSubSize(0);
    fieldTag.setIsPrimaryKey(false);
    fieldTag.setIsIdentity(false);
    fieldTag.setUnique(false);
    fieldTag.setShouldAllowNull(true);
    table.addField(fieldTag);

    return table;
  }
  public TableDefinition buildMafiaFamily_RevenueTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_FAMILY_REVENUE");

    FieldDefinition fieldFamilyId = new FieldDefinition();
    fieldFamilyId.setName("ID");
    fieldFamilyId.setTypeName("NUMERIC");
    fieldFamilyId.setSize(15);
    fieldFamilyId.setIsPrimaryKey(false);
    fieldFamilyId.setIsIdentity(false);
    fieldFamilyId.setUnique(false);
    fieldFamilyId.setShouldAllowNull(false);
    // fieldFamilyId.setForeignKeyFieldName("JPA_MAFIA_FAMILY.ID");
    table.addField(fieldFamilyId);

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

    return table;
  }
  public TableDefinition buildVHCL_CLMTable() {
    TableDefinition table = new TableDefinition();
    table.setName("VHCL_CLM");

    FieldDefinition fieldCLM_ID = new FieldDefinition();
    fieldCLM_ID.setName("CLM_ID");
    fieldCLM_ID.setTypeName("NUMBER");
    fieldCLM_ID.setSize(18);
    fieldCLM_ID.setSubSize(0);
    fieldCLM_ID.setIsPrimaryKey(true);
    fieldCLM_ID.setIsIdentity(false);
    fieldCLM_ID.setUnique(false);
    fieldCLM_ID.setShouldAllowNull(false);
    table.addField(fieldCLM_ID);

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

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

    ForeignKeyConstraint foreignKeyFK_VHCL_CLM_CLM_ID = new ForeignKeyConstraint();
    foreignKeyFK_VHCL_CLM_CLM_ID.setName("VHCL_CLM_CLAIM");
    foreignKeyFK_VHCL_CLM_CLM_ID.setTargetTable("CLAIM");
    foreignKeyFK_VHCL_CLM_CLM_ID.addSourceField("CLM_ID");
    foreignKeyFK_VHCL_CLM_CLM_ID.addTargetField("CLM_ID");
    table.addForeignKeyConstraint(foreignKeyFK_VHCL_CLM_CLM_ID);

    return table;
  }
  public static TableDefinition buildWHEELNUTTable() {
    // CREATE TABLE JPA_OR_WHEEL_NUT (ID NUMBER(10) NOT NULL, WHEEL_ID NUMBER(10) NULL, PRIMARY KEY
    // (ID))
    TableDefinition table = new TableDefinition();
    table.setName("JPA_OR_WHEEL_NUT");

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

    FieldDefinition fieldWHEEL = new FieldDefinition();
    fieldWHEEL.setName("WHEEL_ID");
    fieldWHEEL.setTypeName("NUMERIC");
    fieldWHEEL.setSize(10);
    fieldWHEEL.setSubSize(0);
    fieldWHEEL.setIsPrimaryKey(false);
    fieldWHEEL.setIsIdentity(false);
    fieldWHEEL.setShouldAllowNull(true);
    fieldWHEEL.setUnique(false);
    table.addField(fieldWHEEL);

    // ALTER TABLE JPA_OR_WHEEL_NUT ADD CONSTRAINT FK_JPA_OR_WHEEL_NUT_WHEEL_ID FOREIGN KEY
    // (WHEEL_ID) REFERENCES JPA_OR_WHEEL (ID)
    ForeignKeyConstraint foreignKeyWHEELNUT_WHEEL = new ForeignKeyConstraint();
    foreignKeyWHEELNUT_WHEEL.setName("FK_WH_NUT_WL_ID");
    foreignKeyWHEELNUT_WHEEL.setTargetTable("JPA_OR_WHEEL");
    foreignKeyWHEELNUT_WHEEL.addSourceField("WHEEL_ID");
    foreignKeyWHEELNUT_WHEEL.addTargetField("ID");
    table.addForeignKeyConstraint(foreignKeyWHEELNUT_WHEEL);

    return table;
  }
  public TableDefinition buildMafiaFamilyTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_MAFIA_FAMILY");

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

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

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

    return table;
  }
  public static TableDefinition buildCACHEABLE_FORCE_PROTECTED_ENTITYTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_CACHEABLE_FORCE_PROTECTED");

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

    FieldDefinition fieldNAME = new FieldDefinition();
    fieldNAME.setName("NAME");
    fieldNAME.setTypeName("VARCHAR");
    fieldNAME.setSize(75);
    fieldNAME.setShouldAllowNull(true);
    fieldNAME.setIsPrimaryKey(false);
    fieldNAME.setUnique(false);
    fieldNAME.setIsIdentity(false);
    table.addField(fieldNAME);

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

    FieldDefinition falseFK = new FieldDefinition();
    falseFK.setName("FALSE_FK");
    falseFK.setTypeName("NUMERIC");
    falseFK.setSize(15);
    falseFK.setShouldAllowNull(true);
    falseFK.setIsPrimaryKey(false);
    falseFK.setUnique(false);
    falseFK.setIsIdentity(false);
    table.addField(falseFK);

    return table;
  }
  public static TableDefinition buildREADONLYCLASSTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CMP3_XML_READONLY");

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

    return table;
  }
  public static TableDefinition buildWHEELRIMTable() {
    // CREATE TABLE JPA_OR_WHEEL_RIM (ID NUMBER(10) NOT NULL, PRIMARY KEY (ID))
    TableDefinition table = new TableDefinition();
    table.setName("JPA_OR_WHEEL_RIM");

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

    return table;
  }
  public static TableDefinition buildWOMANTable() {
    TableDefinition table = new TableDefinition();
    table.setName("XML_WOMAN");

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

    FieldDefinition field1 = new FieldDefinition();
    field1.setName("F_NAME");
    field1.setTypeName("VARCHAR");
    field1.setSize(40);
    field1.setShouldAllowNull(true);
    field1.setIsPrimaryKey(false);
    field1.setUnique(false);
    field1.setIsIdentity(false);
    table.addField(field1);

    FieldDefinition field2 = new FieldDefinition();
    field2.setName("L_NAME");
    field2.setTypeName("VARCHAR");
    field2.setSize(40);
    field2.setShouldAllowNull(true);
    field2.setIsPrimaryKey(false);
    field2.setUnique(false);
    field2.setIsIdentity(false);
    table.addField(field2);

    return table;
  }
  public TableDefinition buildMafiosoTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_MAFIOSO");

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

    FieldDefinition fieldFirstName = new FieldDefinition();
    fieldFirstName.setName("FIRSTNAME");
    fieldFirstName.setTypeName("VARCHAR");
    fieldFirstName.setSize(30);
    fieldFirstName.setShouldAllowNull(true);
    fieldFirstName.setIsPrimaryKey(false);
    fieldFirstName.setUnique(false);
    fieldFirstName.setIsIdentity(false);
    table.addField(fieldFirstName);

    FieldDefinition fieldLastName = new FieldDefinition();
    fieldLastName.setName("LASTNAME");
    fieldLastName.setTypeName("VARCHAR");
    fieldLastName.setSize(30);
    fieldLastName.setShouldAllowNull(true);
    fieldLastName.setIsPrimaryKey(false);
    fieldLastName.setUnique(false);
    fieldLastName.setIsIdentity(false);
    table.addField(fieldLastName);

    FieldDefinition fieldNickname = new FieldDefinition();
    fieldNickname.setName("NICKNAME");
    fieldNickname.setTypeName("VARCHAR");
    fieldNickname.setSize(30);
    fieldNickname.setShouldAllowNull(true);
    fieldNickname.setIsPrimaryKey(false);
    fieldNickname.setUnique(false);
    fieldNickname.setIsIdentity(false);
    table.addField(fieldNickname);

    FieldDefinition fieldGender = new FieldDefinition();
    fieldGender.setName("GENDER");
    fieldGender.setTypeName("VARCHAR");
    fieldGender.setSize(1);
    fieldGender.setShouldAllowNull(true);
    fieldGender.setIsPrimaryKey(false);
    fieldGender.setUnique(false);
    fieldGender.setIsIdentity(false);
    table.addField(fieldGender);

    FieldDefinition fieldFamily = new FieldDefinition();
    fieldFamily.setName("FAMILY_ID");
    fieldFamily.setTypeName("NUMERIC");
    fieldFamily.setSize(15);
    fieldFamily.setShouldAllowNull(true);
    fieldFamily.setIsPrimaryKey(false);
    fieldFamily.setUnique(false);
    fieldFamily.setIsIdentity(false);
    // fieldFamily.setForeignKeyFieldName("JPA_MAFIA_FAMILY.ID");
    table.addField(fieldFamily);

    FieldDefinition fielDiscriminatorType = new FieldDefinition();
    fielDiscriminatorType.setName("DTYPE");
    fielDiscriminatorType.setTypeName("VARCHAR");
    fielDiscriminatorType.setSize(20);
    fielDiscriminatorType.setShouldAllowNull(false);
    fielDiscriminatorType.setIsPrimaryKey(false);
    fielDiscriminatorType.setUnique(false);
    fielDiscriminatorType.setIsIdentity(false);
    table.addField(fielDiscriminatorType);

    FieldDefinition fieldAddress = new FieldDefinition();
    fieldAddress.setName("ADDRESS_ID");
    fieldAddress.setTypeName("NUMERIC");
    fieldAddress.setSize(15);
    fieldAddress.setShouldAllowNull(true);
    fieldAddress.setIsPrimaryKey(false);
    fieldAddress.setUnique(false);
    fieldAddress.setIsIdentity(false);
    table.addField(fieldAddress);

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

    return table;
  }
  public static TableDefinition buildADDRESSTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CMP3_XML_ADDRESS");

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

    FieldDefinition fieldSTREET = new FieldDefinition();
    fieldSTREET.setName("STREET");
    fieldSTREET.setTypeName("VARCHAR2");
    fieldSTREET.setSize(60);
    fieldSTREET.setSubSize(0);
    fieldSTREET.setIsPrimaryKey(false);
    fieldSTREET.setIsIdentity(false);
    fieldSTREET.setUnique(false);
    fieldSTREET.setShouldAllowNull(true);
    table.addField(fieldSTREET);

    FieldDefinition fieldCITY = new FieldDefinition();
    fieldCITY.setName("CITY");
    fieldCITY.setTypeName("VARCHAR2");
    fieldCITY.setSize(60);
    fieldCITY.setSubSize(0);
    fieldCITY.setIsPrimaryKey(false);
    fieldCITY.setIsIdentity(false);
    fieldCITY.setUnique(false);
    fieldCITY.setShouldAllowNull(true);
    table.addField(fieldCITY);

    FieldDefinition fieldPROVINCE = new FieldDefinition();
    fieldPROVINCE.setName("PROVINCE");
    fieldPROVINCE.setTypeName("VARCHAR2");
    fieldPROVINCE.setSize(60);
    fieldPROVINCE.setSubSize(0);
    fieldPROVINCE.setIsPrimaryKey(false);
    fieldPROVINCE.setIsIdentity(false);
    fieldPROVINCE.setUnique(false);
    fieldPROVINCE.setShouldAllowNull(true);
    table.addField(fieldPROVINCE);

    FieldDefinition fieldPOSTALCODE = new FieldDefinition();
    fieldPOSTALCODE.setName("P_CODE");
    fieldPOSTALCODE.setTypeName("VARCHAR2");
    fieldPOSTALCODE.setSize(67);
    fieldPOSTALCODE.setSubSize(0);
    fieldPOSTALCODE.setIsPrimaryKey(false);
    fieldPOSTALCODE.setIsIdentity(false);
    fieldPOSTALCODE.setUnique(false);
    fieldPOSTALCODE.setShouldAllowNull(true);
    table.addField(fieldPOSTALCODE);

    FieldDefinition fieldCOUNTRY = new FieldDefinition();
    fieldCOUNTRY.setName("COUNTRY");
    fieldCOUNTRY.setTypeName("VARCHAR2");
    fieldCOUNTRY.setSize(60);
    fieldCOUNTRY.setSubSize(0);
    fieldCOUNTRY.setIsPrimaryKey(false);
    fieldCOUNTRY.setIsIdentity(false);
    fieldCOUNTRY.setUnique(false);
    fieldCOUNTRY.setShouldAllowNull(true);
    table.addField(fieldCOUNTRY);

    FieldDefinition fieldType = new FieldDefinition();
    fieldType.setName("TYPE");
    fieldType.setTypeName("VARCHAR2");
    fieldType.setSize(150);
    fieldType.setSubSize(0);
    fieldType.setIsPrimaryKey(false);
    fieldType.setIsIdentity(false);
    fieldType.setUnique(false);
    fieldType.setShouldAllowNull(true);
    table.addField(fieldType);

    return table;
  }
  public TableDefinition buildAddressTable() {
    TableDefinition table = new TableDefinition();
    table.setName("JPA_MAFIOSO_ADDRESS");

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

    FieldDefinition fieldStreet = new FieldDefinition();
    fieldStreet.setName("STREET");
    fieldStreet.setTypeName("VARCHAR2");
    fieldStreet.setSize(60);
    fieldStreet.setSubSize(0);
    fieldStreet.setIsPrimaryKey(false);
    fieldStreet.setIsIdentity(false);
    fieldStreet.setUnique(false);
    fieldStreet.setShouldAllowNull(true);
    table.addField(fieldStreet);

    FieldDefinition fieldCity = new FieldDefinition();
    fieldCity.setName("CITY");
    fieldCity.setTypeName("VARCHAR2");
    fieldCity.setSize(60);
    fieldCity.setSubSize(0);
    fieldCity.setIsPrimaryKey(false);
    fieldCity.setIsIdentity(false);
    fieldCity.setUnique(false);
    fieldCity.setShouldAllowNull(true);
    table.addField(fieldCity);

    FieldDefinition fieldProvince = new FieldDefinition();
    fieldProvince.setName("PROVINCE");
    fieldProvince.setTypeName("VARCHAR2");
    fieldProvince.setSize(60);
    fieldProvince.setSubSize(0);
    fieldProvince.setIsPrimaryKey(false);
    fieldProvince.setIsIdentity(false);
    fieldProvince.setUnique(false);
    fieldProvince.setShouldAllowNull(true);
    table.addField(fieldProvince);

    FieldDefinition fieldPostalCode = new FieldDefinition();
    fieldPostalCode.setName("P_CODE");
    fieldPostalCode.setTypeName("VARCHAR2");
    fieldPostalCode.setSize(67);
    fieldPostalCode.setSubSize(0);
    fieldPostalCode.setIsPrimaryKey(false);
    fieldPostalCode.setIsIdentity(false);
    fieldPostalCode.setUnique(false);
    fieldPostalCode.setShouldAllowNull(true);
    table.addField(fieldPostalCode);

    FieldDefinition fieldCountry = new FieldDefinition();
    fieldCountry.setName("COUNTRY");
    fieldCountry.setTypeName("VARCHAR2");
    fieldCountry.setSize(60);
    fieldCountry.setSubSize(0);
    fieldCountry.setIsPrimaryKey(false);
    fieldCountry.setIsIdentity(false);
    fieldCountry.setUnique(false);
    fieldCountry.setShouldAllowNull(true);
    table.addField(fieldCountry);

    FieldDefinition fieldVersion = new FieldDefinition();
    fieldVersion.setName("VERSION");
    fieldVersion.setTypeName("NUMERIC");
    fieldVersion.setSize(15);
    fieldVersion.setIsPrimaryKey(false);
    fieldVersion.setUnique(false);
    fieldVersion.setIsIdentity(false);
    fieldVersion.setShouldAllowNull(true);
    table.addField(fieldVersion);

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

    return table;
  }
  public TableDefinition buildCLAIMTable() {
    TableDefinition table = new TableDefinition();
    table.setName("CLAIM");

    FieldDefinition fieldCLM_ID = new FieldDefinition();
    fieldCLM_ID.setName("CLM_ID");
    fieldCLM_ID.setTypeName("NUMBER");
    fieldCLM_ID.setSize(18);
    fieldCLM_ID.setSubSize(0);
    fieldCLM_ID.setIsPrimaryKey(true);
    fieldCLM_ID.setIsIdentity(false);
    fieldCLM_ID.setUnique(false);
    fieldCLM_ID.setShouldAllowNull(false);
    table.addField(fieldCLM_ID);

    FieldDefinition fieldPOL_ID = new FieldDefinition();
    fieldPOL_ID.setName("POL_ID");
    fieldPOL_ID.setTypeName("NUMBER");
    fieldPOL_ID.setSize(18);
    fieldPOL_ID.setSubSize(0);
    fieldPOL_ID.setIsPrimaryKey(false);
    fieldPOL_ID.setIsIdentity(false);
    fieldPOL_ID.setUnique(false);
    fieldPOL_ID.setShouldAllowNull(true);
    table.addField(fieldPOL_ID);

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

    FieldDefinition fieldAMOUNT = new FieldDefinition();
    fieldAMOUNT.setName("AMOUNT");
    fieldAMOUNT.setTypeName("FLOAT");
    fieldAMOUNT.setSize(18);
    fieldAMOUNT.setSubSize(4);
    fieldAMOUNT.setIsPrimaryKey(false);
    fieldAMOUNT.setIsIdentity(false);
    fieldAMOUNT.setUnique(false);
    fieldAMOUNT.setShouldAllowNull(true);
    table.addField(fieldAMOUNT);

    FieldDefinition fieldDISEASE = new FieldDefinition();
    fieldDISEASE.setName("DISEASE");
    fieldDISEASE.setTypeName("VARCHAR2");
    fieldDISEASE.setSize(50);
    fieldDISEASE.setSubSize(0);
    fieldDISEASE.setIsPrimaryKey(false);
    fieldDISEASE.setIsIdentity(false);
    fieldDISEASE.setUnique(false);
    fieldDISEASE.setShouldAllowNull(true);
    table.addField(fieldDISEASE);

    FieldDefinition fieldAREA = new FieldDefinition();
    fieldAREA.setName("AREA");
    fieldAREA.setTypeName("NUMBER");
    fieldAREA.setSize(18);
    fieldAREA.setSubSize(4);
    fieldAREA.setIsPrimaryKey(false);
    fieldAREA.setIsIdentity(false);
    fieldAREA.setUnique(false);
    fieldAREA.setShouldAllowNull(true);
    table.addField(fieldAREA);

    ForeignKeyConstraint foreignKeyFK_CLAIM_POL_ID = new ForeignKeyConstraint();
    foreignKeyFK_CLAIM_POL_ID.setName("CLAIM_POL");
    foreignKeyFK_CLAIM_POL_ID.setTargetTable("POLICY");
    foreignKeyFK_CLAIM_POL_ID.addSourceField("POL_ID");
    foreignKeyFK_CLAIM_POL_ID.addTargetField("POL_ID");
    table.addForeignKeyConstraint(foreignKeyFK_CLAIM_POL_ID);

    return table;
  }
  public TableDefinition buildHOLDERTable() {
    TableDefinition table = new TableDefinition();
    table.setName("HOLDER");

    FieldDefinition fieldSSN = new FieldDefinition();
    fieldSSN.setName("SSN");
    fieldSSN.setTypeName("NUMBER");
    fieldSSN.setSize(18);
    fieldSSN.setSubSize(0);
    fieldSSN.setIsPrimaryKey(true);
    fieldSSN.setIsIdentity(false);
    fieldSSN.setUnique(false);
    fieldSSN.setShouldAllowNull(false);
    table.addField(fieldSSN);

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

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

    FieldDefinition fieldSEX = new FieldDefinition();
    fieldSEX.setName("SEX");
    fieldSEX.setTypeName("CHAR");
    fieldSEX.setSize(1);
    fieldSEX.setSubSize(0);
    fieldSEX.setIsPrimaryKey(false);
    fieldSEX.setIsIdentity(false);
    fieldSEX.setUnique(false);
    fieldSEX.setShouldAllowNull(true);
    table.addField(fieldSEX);

    FieldDefinition fieldBDATE = new FieldDefinition();
    fieldBDATE.setName("BDATE");
    fieldBDATE.setTypeName("DATE");
    fieldBDATE.setSize(7);
    fieldBDATE.setSubSize(0);
    fieldBDATE.setIsPrimaryKey(false);
    fieldBDATE.setIsIdentity(false);
    fieldBDATE.setUnique(false);
    fieldBDATE.setShouldAllowNull(true);
    table.addField(fieldBDATE);

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

    return table;
  }
  public TableDefinition buildINS_ADDRTable() {
    TableDefinition table = new TableDefinition();
    table.setName("INS_ADDR");

    FieldDefinition fieldSSN = new FieldDefinition();
    fieldSSN.setName("SSN");
    fieldSSN.setTypeName("NUMBER");
    fieldSSN.setSize(18);
    fieldSSN.setSubSize(0);
    fieldSSN.setIsPrimaryKey(true);
    fieldSSN.setIsIdentity(false);
    fieldSSN.setUnique(false);
    fieldSSN.setShouldAllowNull(false);
    table.addField(fieldSSN);

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

    FieldDefinition fieldCITY = new FieldDefinition();
    fieldCITY.setName("CITY");
    fieldCITY.setTypeName("VARCHAR2");
    fieldCITY.setSize(25);
    fieldCITY.setSubSize(0);
    fieldCITY.setIsPrimaryKey(false);
    fieldCITY.setIsIdentity(false);
    fieldCITY.setUnique(false);
    fieldCITY.setShouldAllowNull(true);
    table.addField(fieldCITY);

    FieldDefinition fieldSTATE = new FieldDefinition();
    fieldSTATE.setName("STATE");
    fieldSTATE.setTypeName("VARCHAR2");
    fieldSTATE.setSize(2);
    fieldSTATE.setSubSize(0);
    fieldSTATE.setIsPrimaryKey(false);
    fieldSTATE.setIsIdentity(false);
    fieldSTATE.setUnique(false);
    fieldSTATE.setShouldAllowNull(true);
    table.addField(fieldSTATE);

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

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

    ForeignKeyConstraint foreignKeyFK_INS_ADDR_SSN = new ForeignKeyConstraint();
    foreignKeyFK_INS_ADDR_SSN.setName("ADDRESS_HOLDER");
    foreignKeyFK_INS_ADDR_SSN.setTargetTable("HOLDER");
    foreignKeyFK_INS_ADDR_SSN.addSourceField("SSN");
    foreignKeyFK_INS_ADDR_SSN.addTargetField("SSN");
    table.addForeignKeyConstraint(foreignKeyFK_INS_ADDR_SSN);

    return table;
  }
  public TableDefinition buildPOLICYTable() {
    TableDefinition table = new TableDefinition();
    table.setName("POLICY");

    FieldDefinition fieldPOL_ID = new FieldDefinition();
    fieldPOL_ID.setName("POL_ID");
    fieldPOL_ID.setTypeName("NUMBER");
    fieldPOL_ID.setSize(18);
    fieldPOL_ID.setSubSize(0);
    fieldPOL_ID.setIsPrimaryKey(true);
    fieldPOL_ID.setIsIdentity(false);
    fieldPOL_ID.setUnique(false);
    fieldPOL_ID.setShouldAllowNull(false);
    table.addField(fieldPOL_ID);

    FieldDefinition fieldSSN = new FieldDefinition();
    fieldSSN.setName("SSN");
    fieldSSN.setTypeName("NUMBER");
    fieldSSN.setSize(18);
    fieldSSN.setSubSize(0);
    fieldSSN.setIsPrimaryKey(false);
    fieldSSN.setIsIdentity(false);
    fieldSSN.setUnique(false);
    fieldSSN.setShouldAllowNull(true);
    table.addField(fieldSSN);

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

    FieldDefinition fieldPOL_TYPE = new FieldDefinition();
    fieldPOL_TYPE.setName("POL_TYPE");
    fieldPOL_TYPE.setTypeName("NUMBER");
    fieldPOL_TYPE.setSize(1);
    fieldPOL_TYPE.setSubSize(0);
    fieldPOL_TYPE.setIsPrimaryKey(false);
    fieldPOL_TYPE.setIsIdentity(false);
    fieldPOL_TYPE.setUnique(false);
    fieldPOL_TYPE.setShouldAllowNull(true);
    table.addField(fieldPOL_TYPE);

    FieldDefinition fieldMAX_COV = new FieldDefinition();
    fieldMAX_COV.setName("MAX_COV");
    fieldMAX_COV.setTypeName("NUMBER");
    fieldMAX_COV.setSize(18);
    fieldMAX_COV.setSubSize(4);
    fieldMAX_COV.setIsPrimaryKey(false);
    fieldMAX_COV.setIsIdentity(false);
    fieldMAX_COV.setUnique(false);
    fieldMAX_COV.setShouldAllowNull(true);
    table.addField(fieldMAX_COV);

    FieldDefinition fieldCOV_RATE = new FieldDefinition();
    fieldCOV_RATE.setName("COV_RATE");
    // NUMBER corresponds to long which is mapped to INTEGER data type in some database such as DB2
    // and MySQL.
    // FLOAT should be used which reflect float java type.
    fieldCOV_RATE.setTypeName("FLOAT(16)");
    fieldCOV_RATE.setSize(18);
    fieldCOV_RATE.setSubSize(4);
    fieldCOV_RATE.setIsPrimaryKey(false);
    fieldCOV_RATE.setIsIdentity(false);
    fieldCOV_RATE.setUnique(false);
    fieldCOV_RATE.setShouldAllowNull(true);
    table.addField(fieldCOV_RATE);

    FieldDefinition fieldCNST_DTE = new FieldDefinition();
    fieldCNST_DTE.setName("CNST_DTE");
    fieldCNST_DTE.setTypeName("DATE");
    fieldCNST_DTE.setSize(7);
    fieldCNST_DTE.setSubSize(0);
    fieldCNST_DTE.setIsPrimaryKey(false);
    fieldCNST_DTE.setIsIdentity(false);
    fieldCNST_DTE.setUnique(false);
    fieldCNST_DTE.setShouldAllowNull(true);
    table.addField(fieldCNST_DTE);

    ForeignKeyConstraint foreignKeyFK_POLICY_SSN = new ForeignKeyConstraint();
    foreignKeyFK_POLICY_SSN.setName("POLICY_HOLDER");
    foreignKeyFK_POLICY_SSN.setTargetTable("HOLDER");
    foreignKeyFK_POLICY_SSN.addSourceField("SSN");
    foreignKeyFK_POLICY_SSN.addTargetField("SSN");
    table.addForeignKeyConstraint(foreignKeyFK_POLICY_SSN);

    return table;
  }