Interface IdResolver
- All Known Implementing Classes:
DefaultUlidIdGenerator
public interface IdResolver
- Author:
- Phillip Verheyden (phillipuniverse)
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
nextId()
Simply a method to return the next available ID if it can be determined.resolveId
(String recordType, OperationType suppliedOperation, String suppliedId, Map<String, String> row) Determine the id that should be used forBatchRecord.getResourceTierIdentifier()
for the parsed record from a file.
-
Method Details
-
resolveId
@Nullable String resolveId(String recordType, @Nullable OperationType suppliedOperation, @Nullable String suppliedId, Map<String, String> row) Determine the id that should be used forBatchRecord.getResourceTierIdentifier()
for the parsed record from a file. While this could be used to generate a default id, the result of this can return null which would move the responsibility of id generation to the resource tier- Parameters:
recordType
- the type of record being resolvedsuppliedOperation
- the operation that was given by the user in the file, can benull
suppliedId
- the primary key resolved from the file, can benull
row
- the record parsed from the file- Returns:
- operation that should be used for the record
-
nextId
Simply a method to return the next available ID if it can be determined.- Returns:
- the next ID
-