Interface IMappedModelFactory

All Known Implementing Classes:
MappedModelFactory

public interface IMappedModelFactory
Author:
hengsin
  • Method Details

    • addMapping

      default void addMapping(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer,String,? extends PO> recordIdFunction, BiFunction<ResultSet,String,? extends PO> resultSetFunction)
      add table name to class mapping
      Parameters:
      tableName -
      classSupplier -
      recordIdFunction -
      resultSetFunction -
    • addMapping

      void addMapping(String tableName, Supplier<Class<?>> classSupplier, BiFunction<Integer,String,? extends PO> recordIdFunction, BiFunction<String,String,? extends PO> recordUUIDFunction, BiFunction<ResultSet,String,? extends PO> resultSetFunction)
      add table name to class mapping
      Parameters:
      tableName -
      classSupplier -
      recordIdFunction -
      recordUUIDFunction -
      resultSetFunction -
    • removeMapping

      void removeMapping(String tableName)
      remove table name to class mapping
      Parameters:
      tableName -
    • scan

      void scan(org.osgi.framework.BundleContext context, String... packages)
      Scan packages for class with Model annotation and add mapping for it
      Parameters:
      context -
      packages -