public class WriterEntitySqlGenerator extends EntitySqlGenerator
| Constructor and Description |
|---|
WriterEntitySqlGenerator(Writer writer)
Creates a new generator for a given writer.
|
WriterEntitySqlGenerator(Writer writer,
GeneratorContext context)
Creates a new instance of
WriterEntitySqlGenerator. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Writes any missing SQL and closes any open resources.
|
Writer |
getWriter()
Used to write the SQL statements.
|
void |
writeComment(String comment)
Writes a SQL comment to the target.
|
void |
writeSectionSeparator()
Writes a new line to the target to separate different sections in the SQL file.
|
void |
writeStatement(EntityStatement stmt)
Writes the given statement to the target.
|
findEntity, getContext, markExistingEntities, markExistingEntity, write, write, writeAlignmentStatementspublic WriterEntitySqlGenerator(Writer writer)
writer - the writer of the file to generatepublic WriterEntitySqlGenerator(Writer writer, GeneratorContext context)
WriterEntitySqlGenerator.writer - the writer of the file to generatecontext - Used to keep the state of indices and to store any configurationpublic void close()
throws IOException
EntitySqlGeneratorclose in interface Closeableclose in interface AutoCloseableclose in class EntitySqlGeneratorIOException - if the target writer throws onepublic void writeComment(String comment) throws IOException
EntitySqlGeneratorwriteComment in class EntitySqlGeneratorcomment - the comment to writeIOException - if the target throws onepublic void writeSectionSeparator()
throws IOException
EntitySqlGeneratorwriteSectionSeparator in class EntitySqlGeneratorIOException - if the target throws such an exceptionpublic void writeStatement(EntityStatement stmt) throws IOException
EntitySqlGeneratorwriteStatement in class EntitySqlGeneratorstmt - the SQL statement to writeIOException - if the target throws one@Generated(value="lombok") public Writer getWriter()
Copyright © 2017 fastnate.org. All rights reserved.