Interface Generator
- 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 TypeMethodDescription<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()
Gets the generation type associated with the generator.
-
Method Details
-
type
GenerationType type()Gets the generation type associated with the generator.- Returns:
- the generation type
-
handle
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 generatedentities
- the collection of entities to be generateddataSource
- the data source for obtaining a database connection
-