public class Context extends PropertyHolder
getProperties, getProperty
public Context(ModelType defaultModelType)
public void addTableConfiguration(TableConfiguration tc)
public JavaClientGeneratorConfiguration getJavaClientGeneratorConfiguration()
public JavaModelGeneratorConfiguration getJavaModelGeneratorConfiguration()
public JavaTypeResolverConfiguration getJavaTypeResolverConfiguration()
public SqlMapGeneratorConfiguration getSqlMapGeneratorConfiguration()
public void addPluginConfiguration(PluginConfiguration pluginConfiguration)
public void validate(List<String> errors)
errors
- the errorspublic String getId()
public void setId(String id)
public void setJavaClientGeneratorConfiguration(JavaClientGeneratorConfiguration javaClientGeneratorConfiguration)
public void setJavaModelGeneratorConfiguration(JavaModelGeneratorConfiguration javaModelGeneratorConfiguration)
public void setJavaTypeResolverConfiguration(JavaTypeResolverConfiguration javaTypeResolverConfiguration)
public void setJdbcConnectionConfiguration(JDBCConnectionConfiguration jdbcConnectionConfiguration)
public void setSqlMapGeneratorConfiguration(SqlMapGeneratorConfiguration sqlMapGeneratorConfiguration)
public ModelType getDefaultModelType()
public String getBeginningDelimiter()
public String getEndingDelimiter()
public void addProperty(String name, String value)
addProperty
in class PropertyHolder
public CommentGenerator getCommentGenerator()
public JavaFormatter getJavaFormatter()
public KotlinFormatter getKotlinFormatter()
public XmlFormatter getXmlFormatter()
public CommentGeneratorConfiguration getCommentGeneratorConfiguration()
public void setCommentGeneratorConfiguration(CommentGeneratorConfiguration commentGeneratorConfiguration)
public Plugin getPlugins()
public String getTargetRuntime()
public void setTargetRuntime(String targetRuntime)
public String getIntrospectedColumnImpl()
public void setIntrospectedColumnImpl(String introspectedColumnImpl)
public List<IntrospectedTable> getIntrospectedTables()
public int getIntrospectionSteps()
public void introspectTables(ProgressCallback callback, List<String> warnings, Set<String> fullyQualifiedTableNames) throws SQLException, InterruptedException
callback
- a progress callback if progress information is desired, or
null
warnings
- any warning generated from this method will be added to the
List. Warnings are always Strings.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.SQLException
- if some error arises while introspecting the specified
database tables.InterruptedException
- if the progress callback reports a cancelpublic int getGenerationSteps()
public void generateFiles(ProgressCallback callback, List<GeneratedJavaFile> generatedJavaFiles, List<GeneratedXmlFile> generatedXmlFiles, List<GeneratedKotlinFile> generatedKotlinFiles, List<GeneratedFile> otherGeneratedFiles, List<String> warnings) throws InterruptedException
InterruptedException
public Connection getConnection() throws SQLException
closeConnection(Connection)
). If you do not
close the connection, then there could be connection leaks.SQLException
- if any error occurs while creating the connectionpublic void closeConnection(Connection connection)
connection
- a JDBC connection to close, may be nullpublic boolean autoDelimitKeywords()
public ConnectionFactoryConfiguration getConnectionFactoryConfiguration()
public void setConnectionFactoryConfiguration(ConnectionFactoryConfiguration connectionFactoryConfiguration)
Copyright © 2006–2023 MyBatis.org. All rights reserved.