public class Context extends PropertyHolder
Constructor and Description |
---|
Context(ModelType defaultModelType)
Constructs a Context object.
|
addPropertyXmlElements, getProperties, getProperty
public Context(ModelType defaultModelType)
defaultModelType
- - may be nullpublic void addTableConfiguration(TableConfiguration tc)
public JDBCConnectionConfiguration getJdbcConnectionConfiguration()
public JavaClientGeneratorConfiguration getJavaClientGeneratorConfiguration()
public JavaModelGeneratorConfiguration getJavaModelGeneratorConfiguration()
public JavaTypeResolverConfiguration getJavaTypeResolverConfiguration()
public SqlMapGeneratorConfiguration getSqlMapGeneratorConfiguration()
public void addPluginConfiguration(PluginConfiguration pluginConfiguration)
public void validate(List<String> errors)
public 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 XmlElement toXmlElement()
validate
method to check validity of this context.public List<TableConfiguration> getTableConfigurations()
public String getBeginningDelimiter()
public String getEndingDelimiter()
public void addProperty(String name, String value)
addProperty
in class PropertyHolder
public CommentGenerator getCommentGenerator()
public JavaFormatter getJavaFormatter()
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 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<String> warnings) throws InterruptedException
InterruptedException
public boolean autoDelimitKeywords()
Copyright © 2010–2018 MyBatis.org. All rights reserved.