Interface ValueGeneration

    • Method Detail

      • getGenerationTiming

        GenerationTiming getGenerationTiming()
        When is this value generated : NEVER, INSERT, ALWAYS (INSERT+UPDATE)
        Returns:
        When the value is generated.
      • getValueGenerator

        ValueGenerator<?> getValueGenerator()
        Obtain the in-VM value generator.

        May return 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 here

        Returns:
        The strategy for performing in-VM value generation
      • referenceColumnInSql

        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

        Returns:
        true indicates the column should be included in the SQL.
      • getDatabaseGeneratedReferencedColumnValue

        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.

        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 ('?')

        Returns:
        The column value to be used in the SQL.
      • timingMatches

        default boolean timingMatches​(GenerationTiming timing)
        Does this value generation occur with the given timing?