Class BaseDdlBuffer
- java.lang.Object
-
- io.ebeaninternal.dbmigration.ddlgeneration.platform.BaseDdlBuffer
-
- All Implemented Interfaces:
DdlBuffer
public class BaseDdlBuffer extends Object implements DdlBuffer
Base implementation of DdlBuffer using an underlying writer.
-
-
Constructor Summary
Constructors Constructor Description BaseDdlBuffer(MConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DdlBufferappend(String content)Append DDL content to the buffer.DdlBufferappend(String content, int space)Append DDL content to the buffer with space padding.DdlBufferappendStatement(String content)Append a statement allowing for null or empty statements.DdlBufferappendWithSpace(String foreignKeyRestrict)Append a value that is potentially null or empty and proceed it with a space if so.DdlBufferend()Used to demarcate the end of a series of statements.DdlBufferendOfStatement()Append the end of statement content.StringgetBuffer()Return the buffer content.MConfigurationgetConfiguration()Return the configuration (default tablespaces etc).booleanisEmpty()Return true if the buffer is empty.DdlBuffernewLine()Append new line character to the buffer.
-
-
-
Constructor Detail
-
BaseDdlBuffer
public BaseDdlBuffer(MConfiguration configuration)
-
-
Method Detail
-
getConfiguration
public MConfiguration getConfiguration()
Description copied from interface:DdlBufferReturn the configuration (default tablespaces etc).- Specified by:
getConfigurationin interfaceDdlBuffer
-
isEmpty
public boolean isEmpty()
Description copied from interface:DdlBufferReturn true if the buffer is empty.
-
appendWithSpace
public DdlBuffer appendWithSpace(String foreignKeyRestrict) throws IOException
Description copied from interface:DdlBufferAppend a value that is potentially null or empty and proceed it with a space if so.- Specified by:
appendWithSpacein interfaceDdlBuffer- Throws:
IOException
-
appendStatement
public DdlBuffer appendStatement(String content) throws IOException
Description copied from interface:DdlBufferAppend a statement allowing for null or empty statements.- Specified by:
appendStatementin interfaceDdlBuffer- Throws:
IOException
-
append
public DdlBuffer append(String content) throws IOException
Description copied from interface:DdlBufferAppend DDL content to the buffer.- Specified by:
appendin interfaceDdlBuffer- Throws:
IOException
-
append
public DdlBuffer append(String content, int space) throws IOException
Description copied from interface:DdlBufferAppend DDL content to the buffer with space padding.- Specified by:
appendin interfaceDdlBuffer- Throws:
IOException
-
endOfStatement
public DdlBuffer endOfStatement() throws IOException
Description copied from interface:DdlBufferAppend the end of statement content.- Specified by:
endOfStatementin interfaceDdlBuffer- Throws:
IOException
-
end
public DdlBuffer end() throws IOException
Used to demarcate the end of a series of statements. This should be just whitespace or a sql comment.- Specified by:
endin interfaceDdlBuffer- Throws:
IOException
-
newLine
public DdlBuffer newLine() throws IOException
Description copied from interface:DdlBufferAppend new line character to the buffer.- Specified by:
newLinein interfaceDdlBuffer- Throws:
IOException
-
-