Package | Description |
---|---|
org.fastnate.generator | |
org.fastnate.generator.context | |
org.fastnate.generator.dialect | |
org.fastnate.generator.statements |
Modifier and Type | Field and Description |
---|---|
private StatementsWriter |
EntitySqlGenerator.writer
The target of any generated SQL statement, e.g. a file or database.
|
Modifier and Type | Method and Description |
---|---|
StatementsWriter |
EntitySqlGenerator.getWriter()
The target of any generated SQL statement, e.g. a file or database.
|
Constructor and Description |
---|
EntitySqlGenerator(GeneratorContext context,
StatementsWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
IdentityValue.alignNextValue(StatementsWriter writer) |
abstract void |
IdGenerator.alignNextValue(StatementsWriter writer)
Creates all statements that are necessary to set the next value created from the database is
currentValue + 1 . |
void |
SequenceIdGenerator.alignNextValue(StatementsWriter writer) |
void |
TableIdGenerator.alignNextValue(StatementsWriter writer) |
protected void |
PluralProperty.createDirectValueStatement(StatementsWriter writer,
E entity,
ColumnExpression sourceId,
ColumnExpression key,
T value)
Creates the statements for a (not embeddable) value from the collection.
|
private void |
PluralProperty.createEmbeddedValueStatement(StatementsWriter writer,
E entity,
ColumnExpression sourceId,
ColumnExpression key,
T value)
Writes all embedded properties of a value of a collection table.
|
void |
EntityClass.createPostInsertStatements(E entity,
StatementsWriter writer)
Marks an entity as written and creates any pending update / insert statements.
|
void |
CollectionProperty.createPostInsertStatements(StatementsWriter writer,
E entity) |
void |
EmbeddedProperty.createPostInsertStatements(StatementsWriter writer,
E entity) |
void |
MapProperty.createPostInsertStatements(StatementsWriter writer,
E entity) |
void |
Property.createPostInsertStatements(StatementsWriter writer,
E entity)
Creates additional SQL statements that are necessary after this property is written (e.g. for mapping tables).
|
void |
IdGenerator.createPreInsertStatements(StatementsWriter writer)
Creates the statements that are needed in the output before
IdGenerator.addNextValue(TableStatement, GeneratorColumn, Number) . |
void |
SequenceIdGenerator.createPreInsertStatements(StatementsWriter writer) |
void |
TableIdGenerator.createPreInsertStatements(StatementsWriter writer) |
void |
EmbeddedProperty.createPreInsertStatements(StatementsWriter writer,
E entity) |
void |
GeneratedIdProperty.createPreInsertStatements(StatementsWriter writer,
E entity) |
void |
Property.createPreInsertStatements(StatementsWriter writer,
E entity)
Creates SQL statements that are necessary before this property is written (e.g. for updating the table
generator).
|
protected void |
PluralProperty.createValueStatement(StatementsWriter writer,
E entity,
ColumnExpression sourceId,
ColumnExpression key,
T value)
Adds a value statement to the list of collection statements.
|
void |
EntityProperty.generatePendingStatements(StatementsWriter writer,
E entity,
Object writtenEntity,
Object... arguments) |
void |
PluralProperty.generatePendingStatements(StatementsWriter writer,
E entity,
Object writtenEntity,
Object... arguments) |
void |
Property.generatePendingStatements(StatementsWriter writer,
E entity,
Object writtenEntity,
Object... arguments)
Generates the update statements for an entity that are required after another entity was generated.
|
void |
GeneratorContext.writeAlignmentStatements(StatementsWriter writer)
Builds all statements that are necessary to align ID generators in the database with the current IDs.
|
<E> void |
GenerationState.PendingState.writePendingStatements(StatementsWriter writer,
Object entity)
Generates the update statements for all entities that are required after the given entity was generated.
|
Modifier and Type | Method and Description |
---|---|
void |
GeneratorDialect.adjustNextIdentityValue(StatementsWriter writer,
GeneratorTable table,
GeneratorColumn column,
long nextValue)
Adjusts the next value of the given identity column to ensure that it is bigger than the last generated value.
|
void |
PostgresDialect.adjustNextIdentityValue(StatementsWriter writer,
GeneratorTable table,
GeneratorColumn columnName,
long nextValue) |
void |
GeneratorDialect.adjustNextSequenceValue(StatementsWriter writer,
String sequenceName,
long currentSequenceValue,
long nextSequenceValue,
int incrementSize)
Adjusts the given sequence to ensure that the next value is exactly the given value.
|
void |
OracleDialect.adjustNextSequenceValue(StatementsWriter writer,
String sequenceName,
long currentSequenceValue,
long nextSequenceValue,
int incrementSize) |
void |
GeneratorDialect.truncateTable(StatementsWriter writer,
GeneratorTable table)
Adds a "truncate table" statement to the given writer.
|
void |
PostgresDialect.truncateTable(StatementsWriter writer,
GeneratorTable table) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractStatementsWriter
Base class for implementations of
StatementsWriter . |
class |
ConnectedStatementsWriter
An implementation of a
StatementsWriter which writes the SQL statements directly to a database connection. |
class |
FileStatementsWriter
Implementation of
StatementsWriter which writes the statements into a Writer resp. |
class |
LiquibaseStatementsWriter
Generates statements for the Liquibase changelog file.
|
class |
ListStatementsWriter
A simple
StatementsWriter , which just stores all generated statements into a list. |
class |
PostgreSqlBulkWriter
Implementation of a
StatementsWriter that writes bulk text files for each table, and references them in "COPY
INTO". |
Copyright © 2022 fastnate.org. All rights reserved.