All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.gc.aafc.dina.mapper.DinaFieldAdapter Maven / Gradle / Ivy

There is a newer version: 0.132
Show newest version
package ca.gc.aafc.dina.mapper;

import io.crnk.core.queryspec.FilterSpec;

import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

public interface DinaFieldAdapter {

  DTO_FIELD toDTO(ENTITY_FIELD entityField);

  ENTITY_FIELD toEntity(DTO_FIELD dtoField);

  Consumer entityApplyMethod(ENTITY entityRef);

  Consumer dtoApplyMethod(DTO dtoRef);

  Supplier entitySupplyMethod(ENTITY entityRef);

  Supplier dtoSupplyMethod(DTO dtoRef);

  /**
   * Returns a map of supported field names to their supporting filter spec mapping function.
   *
   * @return a map of supported field names to their supporting filter spec mapping function.
   */
  default Map> toFilterSpec() {
    return Map.of();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy