Package org.mybatis.generator.api

Examples of org.mybatis.generator.api.IntrospectedTable


  }

  public static IntrospectedTable createIntrospectedTable(TableConfiguration tableConfiguration,
      FullyQualifiedTable table, Context context) {

    IntrospectedTable answer = createIntrospectedTableForValidation(context);
    answer.setFullyQualifiedTable(table);
    answer.setTableConfiguration(tableConfiguration);

    return answer;
  }
View Full Code Here


      type = IntrospectedTableMyBatis3Impl.class.getName();
    } else if ("MyBatis3".equalsIgnoreCase(type)) { //$NON-NLS-1$
      type = IntrospectedTableMyBatis3Impl.class.getName();
    }

    IntrospectedTable answer = (IntrospectedTable) createInternalObject(type);
    answer.setContext(context);

    return answer;
  }
View Full Code Here

    // now introspectedTables has all the columns from all the
    // tables in the configuration. Do some validation...

    Iterator<IntrospectedTable> iter = introspectedTables.iterator();
    while (iter.hasNext()) {
      IntrospectedTable introspectedTable = iter.next();

      if (!introspectedTable.hasAnyColumns()) {
        // add warning that the table has no columns, remove from the
        // list
        String warning = getString("Warning.1", introspectedTable.getFullyQualifiedTable().toString()); //$NON-NLS-1$
        warnings.add(warning);
        iter.remove();
      } else if (!introspectedTable.hasPrimaryKeyColumns() && !introspectedTable.hasBaseColumns()) {
        // add warning that the table has only BLOB columns, remove from
        // the list
        String warning = getString("Warning.18", introspectedTable.getFullyQualifiedTable().toString()); //$NON-NLS-1$
        warnings.add(warning);
        iter.remove();
      } else {
        // now make sure that all columns called out in the
        // configuration
        // actually exist
        reportIntrospectionWarnings(introspectedTable, tc, introspectedTable.getFullyQualifiedTable());
      }
    }

    return introspectedTables;
  }
View Full Code Here

          isTrue(tc.getProperty(PropertyRegistry.TABLE_IGNORE_QUALIFIERS_AT_RUNTIME)),
          tc.getProperty(PropertyRegistry.TABLE_RUNTIME_CATALOG),
          tc.getProperty(PropertyRegistry.TABLE_RUNTIME_SCHEMA),
          tc.getProperty(PropertyRegistry.TABLE_RUNTIME_TABLE_NAME), delimitIdentifiers, context);

      IntrospectedTable introspectedTable = ObjectFactory.createIntrospectedTable(tc, table, context);

      for (IntrospectedColumn introspectedColumn : entry.getValue()) {
        introspectedTable.addColumn(introspectedColumn);
      }

      calculatePrimaryKey(table, introspectedTable);

      answer.add(introspectedTable);
View Full Code Here

    if (javaClientGeneratorConfiguration != null) {
      javaClientGeneratorConfiguration.validate(errors, id);
    }

    IntrospectedTable it = null;
    try {
      it = ObjectFactory.createIntrospectedTableForValidation(this);
    } catch (Exception e) {
      errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
    }

    if (it != null && it.requiresXMLGenerator()) {
      if (sqlMapGeneratorConfiguration == null) {
        errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
      } else {
        sqlMapGeneratorConfiguration.validate(errors, id);
      }
View Full Code Here

        // now introspectedTables has all the columns from all the
        // tables in the configuration. Do some validation...

        Iterator<IntrospectedTable> iter = introspectedTables.iterator();
        while (iter.hasNext()) {
            IntrospectedTable introspectedTable = iter.next();

            if (!introspectedTable.hasAnyColumns()) {
                // add warning that the table has no columns, remove from the
                // list
                String warning = getString(
                                "Warning.1", introspectedTable.getFullyQualifiedTable().toString()); //$NON-NLS-1$
                warnings.add(warning);
                iter.remove();
            } else if (!introspectedTable.hasPrimaryKeyColumns()
                    && !introspectedTable.hasBaseColumns()) {
                // add warning that the table has only BLOB columns, remove from
                // the list
                String warning = getString(
                                "Warning.18", introspectedTable.getFullyQualifiedTable().toString()); //$NON-NLS-1$
                warnings.add(warning);
                iter.remove();
            } else {
                // now make sure that all columns called out in the
                // configuration
                // actually exist
                reportIntrospectionWarnings(introspectedTable, tc,
                        introspectedTable.getFullyQualifiedTable());
            }
        }

        return introspectedTables;
    }
View Full Code Here

                    tc.getProperty(PropertyRegistry.TABLE_RUNTIME_CATALOG),
                    tc.getProperty(PropertyRegistry.TABLE_RUNTIME_SCHEMA),
                    tc.getProperty(PropertyRegistry.TABLE_RUNTIME_TABLE_NAME),
                    delimitIdentifiers, context);

            IntrospectedTable introspectedTable = ObjectFactory
                    .createIntrospectedTable(tc, table, context);

            for (IntrospectedColumn introspectedColumn : entry.getValue()) {
                introspectedTable.addColumn(introspectedColumn);
            }

            calculatePrimaryKey(table, introspectedTable);

            answer.add(introspectedTable);
View Full Code Here

        if (javaClientGeneratorConfiguration != null) {
            javaClientGeneratorConfiguration.validate(errors, id);
        }

        IntrospectedTable it = null;
        try {
            it = ObjectFactory.createIntrospectedTableForValidation(this);
        } catch (Exception e) {
            errors.add(getString("ValidationError.25", id)); //$NON-NLS-1$
        }
       
        if (it != null && it.requiresXMLGenerator()) {
            if (sqlMapGeneratorConfiguration == null) {
                errors.add(getString("ValidationError.9", id)); //$NON-NLS-1$
            } else {
                sqlMapGeneratorConfiguration.validate(errors, id);
            }
View Full Code Here

   
    public static IntrospectedTable createIntrospectedTable(
            TableConfiguration tableConfiguration, FullyQualifiedTable table,
            Context context) {

        IntrospectedTable answer = createIntrospectedTableForValidation(context);
        answer.setFullyQualifiedTable(table);
        answer.setTableConfiguration(tableConfiguration);

        return answer;
    }
View Full Code Here

            type = IntrospectedTableMyBatis3Impl.class.getName();
        } else if ("MyBatis3Simple".equalsIgnoreCase(type)) { //$NON-NLS-1$
            type = IntrospectedTableMyBatis3SimpleImpl.class.getName();
        }

        IntrospectedTable answer = (IntrospectedTable) createInternalObject(type);
        answer.setContext(context);

        return answer;
    }
View Full Code Here

TOP

Related Classes of org.mybatis.generator.api.IntrospectedTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.