Interface IRecordFactoryProvider

All Known Implementing Classes:
StandardRecordFactoryProvider

public interface IRecordFactoryProvider
Interface for record factory providers which allow to implement a particular strategy for selecting the appropriate record factory for a given record type.
Since:
2.0
Author:
Holger Knoche
  • Method Summary

    Modifier and Type Method Description
    IRecordFactory<?> createFactoryFor​(java.lang.Class<?> recordClass)
    Creates a factory for the given record class.
    boolean isApplicableTo​(java.lang.Class<?> recordClass)
    Denotes whether this factory provider is applicable to the given record class.
  • Method Details

    • isApplicableTo

      boolean isApplicableTo​(java.lang.Class<?> recordClass)
      Denotes whether this factory provider is applicable to the given record class.
      Parameters:
      recordClass - The record class in question
      Returns:
      True when this provider is applicable for the given class, false otherwise
    • createFactoryFor

      IRecordFactory<?> createFactoryFor​(java.lang.Class<?> recordClass)
      Creates a factory for the given record class. This method may only be called if isApplicableTo(Class) returns true for the respective record class.
      Parameters:
      recordClass - The record class to create a factory for
      Returns:
      The created factory instance