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 DdlBuffer
append(String content)
Append DDL content to the buffer.DdlBuffer
append(String content, int space)
Append DDL content to the buffer with space padding.DdlBuffer
appendStatement(String content)
Append a statement allowing for null or empty statements.DdlBuffer
appendWithSpace(String foreignKeyRestrict)
Append a value that is potentially null or empty and proceed it with a space if so.DdlBuffer
end()
Used to demarcate the end of a series of statements.DdlBuffer
endOfStatement()
Append the end of statement content.String
getBuffer()
Return the buffer content.MConfiguration
getConfiguration()
Return the configuration (default tablespaces etc).boolean
isEmpty()
Return true if the buffer is empty.DdlBuffer
newLine()
Append new line character to the buffer.
-
-
-
Constructor Detail
-
BaseDdlBuffer
public BaseDdlBuffer(MConfiguration configuration)
-
-
Method Detail
-
getConfiguration
public MConfiguration getConfiguration()
Description copied from interface:DdlBuffer
Return the configuration (default tablespaces etc).- Specified by:
getConfiguration
in interfaceDdlBuffer
-
isEmpty
public boolean isEmpty()
Description copied from interface:DdlBuffer
Return true if the buffer is empty.
-
appendWithSpace
public DdlBuffer appendWithSpace(String foreignKeyRestrict) throws IOException
Description copied from interface:DdlBuffer
Append a value that is potentially null or empty and proceed it with a space if so.- Specified by:
appendWithSpace
in interfaceDdlBuffer
- Throws:
IOException
-
appendStatement
public DdlBuffer appendStatement(String content) throws IOException
Description copied from interface:DdlBuffer
Append a statement allowing for null or empty statements.- Specified by:
appendStatement
in interfaceDdlBuffer
- Throws:
IOException
-
append
public DdlBuffer append(String content) throws IOException
Description copied from interface:DdlBuffer
Append DDL content to the buffer.- Specified by:
append
in interfaceDdlBuffer
- Throws:
IOException
-
append
public DdlBuffer append(String content, int space) throws IOException
Description copied from interface:DdlBuffer
Append DDL content to the buffer with space padding.- Specified by:
append
in interfaceDdlBuffer
- Throws:
IOException
-
endOfStatement
public DdlBuffer endOfStatement() throws IOException
Description copied from interface:DdlBuffer
Append the end of statement content.- Specified by:
endOfStatement
in 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:
end
in interfaceDdlBuffer
- Throws:
IOException
-
newLine
public DdlBuffer newLine() throws IOException
Description copied from interface:DdlBuffer
Append new line character to the buffer.- Specified by:
newLine
in interfaceDdlBuffer
- Throws:
IOException
-
-