public interface ValueGeneration extends Serializable
Modifier and Type | Method and Description |
---|---|
String |
getDatabaseGeneratedReferencedColumnValue()
For values which are generated in the database (
getValueGenerator() == null ), if the
column will be referenced in the SQL (referenceColumnInSql() == true ), what value should be
used in the SQL as the column value. |
GenerationTiming |
getGenerationTiming()
When is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)
|
ValueGenerator<?> |
getValueGenerator()
Obtain the in-VM value generator.
|
boolean |
referenceColumnInSql()
For values which are generated in the database (
getValueGenerator() == null ), should the
column be referenced in the INSERT / UPDATE SQL?
This will be false most often to have a DDL-defined DEFAULT value be applied on INSERT |
GenerationTiming getGenerationTiming()
ValueGenerator<?> getValueGenerator()
null
. In fact for values that are generated "in the database" via execution of the
INSERT/UPDATE statement, the expectation is that null
be returned hereboolean referenceColumnInSql()
getValueGenerator()
== null
), should the
column be referenced in the INSERT / UPDATE SQL?
This will be false most often to have a DDL-defined DEFAULT value be applied on INSERTtrue
indicates the column should be included in the SQL.String getDatabaseGeneratedReferencedColumnValue()
getValueGenerator()
== null
), if the
column will be referenced in the SQL (referenceColumnInSql()
== true
), what value should be
used in the SQL as the column value.
Generally this will be a function call or a marker (DEFAULTS).
NOTE : for in-VM generation, this will not be called and the column value will implicitly be a JDBC parameter ('?')Copyright © 2019 JBoss by Red Hat. All rights reserved.