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

org.molgenis.semanticmapper.repository.MappingTargetRepository Maven / Gradle / Ivy

package org.molgenis.semanticmapper.repository;

import java.util.Collection;
import java.util.List;
import org.molgenis.data.Entity;
import org.molgenis.semanticmapper.mapping.model.AttributeMapping;
import org.molgenis.semanticmapper.mapping.model.EntityMapping;
import org.molgenis.semanticmapper.mapping.model.MappingTarget;
import org.molgenis.semanticmapper.meta.MappingTargetMetadata;

public interface MappingTargetRepository {
  /**
   * Inserts or updates a list of {@link MappingTarget}s and their {@link EntityMapping}s and {@link
   * AttributeMapping} s. Will generate IDs if they are not yet specified.
   *
   * @return a {@link List} of {@link Entity}s that have been added or updated
   */
  List upsert(Collection collection);

  /**
   * Creates a list of fully reconstructed {@link MappingTarget}s.
   *
   * @param mappingTargetEntities List of {@link Entity}s with {@link MappingTargetMetadata}
   *     metadata
   * @return a {@link List} of {@link MappingTarget}s.
   */
  List toMappingTargets(List mappingTargetEntities);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy