Interface EntityImportMapping<K>
public interface EntityImportMapping<K>
Provides the ability to map generated export IDs to locally created IDs during an import and vice versa.
- Since:
- 5.13
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a mapping between theexportId
andlocalId
.void
clear()
Remove all entries from this mappinggetExportId
(K localId) Given alocalId
, return its correspondingexportId
.getLocalId
(String exportId) Given anexportId
, return its correspondinglocalId
.
-
Method Details
-
add
Adds a mapping between theexportId
andlocalId
.- Parameters:
exportId
- The ID that was generated during the exportlocalId
- The local ID for the entity on this instance- Throws:
IllegalArgumentException
- if either theexportId
or thelocalId
have already been mapped previously, either to the same value or a different value
-
clear
void clear()Remove all entries from this mapping -
getExportId
Given alocalId
, return its correspondingexportId
.- Parameters:
localId
- The local ID for the entity on this instance- Returns:
- The export ID that was generated during the import, or
Optional.empty()
.
-
getLocalId
Given anexportId
, return its correspondinglocalId
.- Parameters:
exportId
- The export ID that was generated during the import- Returns:
- The local ID for the entity on this instance, or
Optional.empty()
.
-