本文整理汇总了Java中org.mybatis.generator.internal.ObjectFactory.createJavaTypeResolver方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectFactory.createJavaTypeResolver方法的具体用法?Java ObjectFactory.createJavaTypeResolver怎么用?Java ObjectFactory.createJavaTypeResolver使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.mybatis.generator.internal.ObjectFactory
的用法示例。
在下文中一共展示了ObjectFactory.createJavaTypeResolver方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIntrospectedTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
private IntrospectedTable getIntrospectedTables(Context context) {
IntrospectedTable table = null;
JavaTypeResolver javaTypeResolver = ObjectFactory.createJavaTypeResolver(context);
Connection connection = null;
try {
connection = getConnection(context.getJdbcConnectionConfiguration());
DatabaseIntrospector databaseIntrospector =
new DatabaseIntrospector(context, connection.getMetaData(), javaTypeResolver);
table = databaseIntrospector.introspectTables(context.getTabconfig());
} catch (SQLException e) {
e.printStackTrace();
} finally {
closeConnection(connection);
}
return table;
}
示例2: introspectTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* Introspect tables based on the configuration specified in the
* constructor. This method is long running.
*
* @param callback
* a progress callback if progress information is desired, or
* <code>null</code>
* @param warnings
* any warning generated from this method will be added to the
* List. Warnings are always Strings.
* @param fullyQualifiedTableNames
* a set of table names to generate. The elements of the set must
* be Strings that exactly match what's specified in the
* configuration. For example, if table name = "foo" and schema =
* "bar", then the fully qualified table name is "foo.bar". If
* the Set is null or empty, then all tables in the configuration
* will be used for code generation.
*
* @throws SQLException
* if some error arises while introspecting the specified
* database tables.
* @throws InterruptedException
* if the progress callback reports a cancel
*/
public void introspectTables(ProgressCallback callback,
List<String> warnings, Set<String> fullyQualifiedTableNames)
throws SQLException, InterruptedException {
introspectedTables = new ArrayList<IntrospectedTable>();
JavaTypeResolver javaTypeResolver = ObjectFactory
.createJavaTypeResolver(this, warnings);
Connection connection = null;
try {
callback.startTask(getString("Progress.0")); //$NON-NLS-1$
connection = getConnection();
DatabaseIntrospector databaseIntrospector = new DatabaseIntrospector(
this, connection.getMetaData(), javaTypeResolver, warnings);
for (TableConfiguration tc : tableConfigurations) {
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc
.getSchema(), tc.getTableName(), '.');
if (fullyQualifiedTableNames != null
&& fullyQualifiedTableNames.size() > 0
&& !fullyQualifiedTableNames.contains(tableName)) {
continue;
}
if (!tc.areAnyStatementsEnabled()) {
warnings.add(getString("Warning.0", tableName)); //$NON-NLS-1$
continue;
}
callback.startTask(getString("Progress.1", tableName)); //$NON-NLS-1$
List<IntrospectedTable> tables = databaseIntrospector
.introspectTables(tc);
if (tables != null) {
introspectedTables.addAll(tables);
}
callback.checkCancel();
}
} finally {
closeConnection(connection);
}
}
示例3: introspectTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* Introspect tables based on the configuration specified in the
* constructor. This method is long running.
*
* @param callback
* a progress callback if progress information is desired, or
* <code>null</code>
* @param warnings
* any warning generated from this method will be added to the
* List. Warnings are always Strings.
* @param fullyQualifiedTableNames
* a set of table names to generate. The elements of the set must
* be Strings that exactly match what's specified in the
* configuration. For example, if table name = "foo" and schema =
* "bar", then the fully qualified table name is "foo.bar". If
* the Set is null or empty, then all tables in the configuration
* will be used for code generation.
*
* @throws SQLException
* if some error arises while introspecting the specified
* database tables.
* @throws InterruptedException
* if the progress callback reports a cancel
*/
public void introspectTables(ProgressCallback callback,
List<String> warnings, Set<String> fullyQualifiedTableNames)
throws SQLException, InterruptedException {
introspectedTables = new ArrayList<IntrospectedTable>();
JavaTypeResolver javaTypeResolver = ObjectFactory
.createJavaTypeResolver(this, warnings);
Connection connection = null;
try {
callback.startTask(getString("Progress.0")); //$NON-NLS-1$
connection = getConnection();
DatabaseIntrospector databaseIntrospector = new DatabaseIntrospector(
this, connection.getMetaData(), javaTypeResolver, warnings);
for (TableConfiguration tc : tableConfigurations) {
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc
.getSchema(), tc.getTableName(), '.');
if (fullyQualifiedTableNames != null
&& fullyQualifiedTableNames.size() > 0) {
if (!fullyQualifiedTableNames.contains(tableName)) {
continue;
}
}
if (!tc.areAnyStatementsEnabled()) {
warnings.add(getString("Warning.0", tableName)); //$NON-NLS-1$
continue;
}
callback.startTask(getString("Progress.1", tableName)); //$NON-NLS-1$
List<IntrospectedTable> tables = databaseIntrospector
.introspectTables(tc);
if (tables != null) {
introspectedTables.addAll(tables);
}
callback.checkCancel();
}
} finally {
closeConnection(connection);
}
}
示例4: introspectTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* Introspect tables based on the configuration specified in the constructor. This method is long running.
*
* @param callback a progress callback if progress information is desired, or <code>null</code>
* @param warnings any warning generated from this method will be added to the List. Warnings are always Strings.
* @param fullyQualifiedTableNames a set of table names to generate. The elements of the set must be Strings that
* exactly match what's specified in the configuration. For example, if table name = "foo" and schema =
* "bar", then the fully qualified table name is "foo.bar". If the Set is null or empty, then all tables
* in the configuration will be used for code generation.
*
* @throws SQLException if some error arises while introspecting the specified database tables.
* @throws InterruptedException if the progress callback reports a cancel
*/
public void introspectTables(ProgressCallback callback, List<String> warnings, Set<String> fullyQualifiedTableNames)
throws SQLException, InterruptedException {
introspectedTables = new ArrayList<IntrospectedTable>();
JavaTypeResolver javaTypeResolver = ObjectFactory.createJavaTypeResolver(this);
Connection connection = null;
try {
callback.startTask(getString("Progress.0")); //$NON-NLS-1$
connection = getConnection();
DatabaseIntrospector databaseIntrospector =
new DatabaseIntrospector(this, connection.getMetaData(), javaTypeResolver);
for (TableConfiguration tc : tableConfigurations) {
String tableName =
composeFullyQualifiedTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName(), '.');
if (fullyQualifiedTableNames != null && fullyQualifiedTableNames.size() > 0) {
if (!fullyQualifiedTableNames.contains(tableName)) {
continue;
}
}
if (!tc.areAnyStatementsEnabled()) {
warnings.add(getString("Warning.0", tableName)); //$NON-NLS-1$
continue;
}
callback.startTask(getString("Progress.1", tableName)); //$NON-NLS-1$
IntrospectedTable tables = databaseIntrospector.introspectTables(tc);
if (tables != null) {
introspectedTables.add(tables);
}
callback.checkCancel();
}
} finally {
closeConnection(connection);
}
}
示例5: introspectTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* Introspect tables based on the configuration specified in the
* constructor. This method is long running.
*
* @param callback
* a progress callback if progress information is desired, or
* <code>null</code>
* @param warnings
* any warning generated from this method will be added to the
* List. Warnings are always Strings.
* @param fullyQualifiedTableNames
* a set of table names to generate. The elements of the set must
* be Strings that exactly match what's specified in the
* configuration. For example, if table name = "foo" and schema =
* "bar", then the fully qualified table name is "foo.bar". If
* the Set is null or empty, then all tables in the configuration
* will be used for code generation.
*
* @throws SQLException
* if some error arises while introspecting the specified
* database tables.
* @throws InterruptedException
* if the progress callback reports a cancel
*/
public void introspectTables(ProgressCallback callback, List<String> warnings, Set<String> fullyQualifiedTableNames) throws SQLException, InterruptedException {
introspectedTables = new ArrayList<IntrospectedTable>();
JavaTypeResolver javaTypeResolver = ObjectFactory.createJavaTypeResolver(this, warnings);
Connection connection = null;
try {
callback.startTask(getString("Progress.0")); //$NON-NLS-1$
connection = getConnection();
DatabaseIntrospector databaseIntrospector = new DatabaseIntrospector(this, connection.getMetaData(), javaTypeResolver, warnings);
for (TableConfiguration tc : tableConfigurations) {
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName(), '.');
if (fullyQualifiedTableNames != null && fullyQualifiedTableNames.size() > 0) {
if (!fullyQualifiedTableNames.contains(tableName)) {
continue;
}
}
if (!tc.areAnyStatementsEnabled()) {
warnings.add(getString("Warning.0", tableName)); //$NON-NLS-1$
continue;
}
callback.startTask(getString("Progress.1", tableName)); //$NON-NLS-1$
List<IntrospectedTable> tables = databaseIntrospector.introspectTables(tc);
if (tables != null) {
introspectedTables.addAll(tables);
}
callback.checkCancel();
}
}
finally {
closeConnection(connection);
}
}
示例6: introspectTables
import org.mybatis.generator.internal.ObjectFactory; //导入方法依赖的package包/类
/**
* Introspect tables based on the configuration specified in the
* constructor. This method is long running.
*
* @param callback
* a progress callback if progress information is desired, or
* <code>null</code>
* @param warnings
* any warning generated from this method will be added to the
* List. Warnings are always Strings.
* @param fullyQualifiedTableNames
* a set of table names to generate. The elements of the set must
* be Strings that exactly match what's specified in the
* configuration. For example, if table name = "foo" and schema =
* "bar", then the fully qualified table name is "foo.bar". If
* the Set is null or empty, then all tables in the configuration
* will be used for code generation.
*
* @throws SQLException
* if some error arises while introspecting the specified
* database tables.
* @throws InterruptedException
* if the progress callback reports a cancel
*/
public void introspectTables(ProgressCallback callback, List<String> warnings, Set<String> fullyQualifiedTableNames)
throws SQLException, InterruptedException {
introspectedTables = new ArrayList<IntrospectedTable>();
JavaTypeResolver javaTypeResolver = ObjectFactory.createJavaTypeResolver(this, warnings);
Connection connection = null;
try {
callback.startTask(getString("Progress.0")); //$NON-NLS-1$
connection = getConnection();
DatabaseIntrospector databaseIntrospector = new DatabaseIntrospector(this, connection.getMetaData(),
javaTypeResolver, warnings);
for (TableConfiguration tc : tableConfigurations) {
String tableName = composeFullyQualifiedTableName(tc.getCatalog(), tc.getSchema(), tc.getTableName(),
'.');
if (fullyQualifiedTableNames != null && fullyQualifiedTableNames.size() > 0) {
if (!fullyQualifiedTableNames.contains(tableName)) {
continue;
}
}
if (!tc.areAnyStatementsEnabled()) {
warnings.add(getString("Warning.0", tableName)); //$NON-NLS-1$
continue;
}
callback.startTask(getString("Progress.1", tableName)); //$NON-NLS-1$
List<IntrospectedTable> tables = databaseIntrospector.introspectTables(tc);
if (tables != null) {
introspectedTables.addAll(tables);
}
callback.checkCancel();
}
} finally {
closeConnection(connection);
}
}