All Known Implementing Classes:
IdentityIdGenerator, NoneIdGenerator, SequenceIdGenerator

public interface Generator
An interface for database generators in Bibernate application. Implementations are expected to specify the generation type and provide a method to handle the generation process for a given entity class and collection of entities using a data source.
Since:
1.0
Author:
Blyzhnytsia Team
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    handle(Class<T> entityClass, Collection<T> entities, DataSource dataSource)
    Handles the generation process for a given entity class and collection of entities using a data source.
    Gets the generation type associated with the generator.
  • Method Details

    • type

      Gets the generation type associated with the generator.
      Returns:
      the generation type
    • handle

      <T> void handle(Class<T> entityClass, Collection<T> entities, DataSource dataSource)
      Handles the generation process for a given entity class and collection of entities using a data source.
      Type Parameters:
      T - the type of entities in the collection
      Parameters:
      entityClass - the class of the entity to be generated
      entities - the collection of entities to be generated
      dataSource - the data source for obtaining a database connection