Class NoValueGeneration
- java.lang.Object
-
- org.hibernate.metamodel.mapping.internal.NoValueGeneration
-
- All Implemented Interfaces:
Serializable,ValueGeneration
public class NoValueGeneration extends Object implements ValueGeneration
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static NoValueGenerationINSTANCESingleton access
-
Constructor Summary
Constructors Constructor Description NoValueGeneration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDatabaseGeneratedReferencedColumnValue()For values which are generated in the database (ValueGeneration.getValueGenerator()==null), if the column will be referenced in the SQL (ValueGeneration.referenceColumnInSql()==true), what value should be used in the SQL as the column value.GenerationTiminggetGenerationTiming()When is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)ValueGenerator<?>getValueGenerator()Obtain the in-VM value generator.booleanreferenceColumnInSql()For values which are generated in the database (ValueGeneration.getValueGenerator()==null), should the column be referenced in the INSERT / UPDATE SQL?
-
-
-
Field Detail
-
INSTANCE
public static final NoValueGeneration INSTANCE
Singleton access
-
-
Method Detail
-
getGenerationTiming
public GenerationTiming getGenerationTiming()
Description copied from interface:ValueGenerationWhen is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)- Specified by:
getGenerationTimingin interfaceValueGeneration- Returns:
- When the value is generated.
-
getValueGenerator
public ValueGenerator<?> getValueGenerator()
Description copied from interface:ValueGenerationObtain the in-VM value generator. May returnnull. In fact for values that are generated "in the database" via execution of the INSERT/UPDATE statement, the expectation is thatnullbe returned here- Specified by:
getValueGeneratorin interfaceValueGeneration- Returns:
- The strategy for performing in-VM value generation
-
referenceColumnInSql
public boolean referenceColumnInSql()
Description copied from interface:ValueGenerationFor values which are generated in the database (ValueGeneration.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- Specified by:
referenceColumnInSqlin interfaceValueGeneration- Returns:
trueindicates the column should be included in the SQL.
-
getDatabaseGeneratedReferencedColumnValue
public String getDatabaseGeneratedReferencedColumnValue()
Description copied from interface:ValueGenerationFor values which are generated in the database (ValueGeneration.getValueGenerator()==null), if the column will be referenced in the SQL (ValueGeneration.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 ('?')- Specified by:
getDatabaseGeneratedReferencedColumnValuein interfaceValueGeneration- Returns:
- The column value to be used in the SQL.
-
-