Class PersistableDocumentIDRegistry
java.lang.Object
de.hybris.platform.impex.jalo.DocumentIDRegistry
de.hybris.platform.impex.distributed.PersistableDocumentIDRegistry
Extended implementation of DocumentIDRegistry. Unlike the standard implementation it allows to persist the
documentIDs and read them from database if necessary.
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.impex.jalo.DocumentIDRegistry
DocumentIDRegistry.MODE -
Constructor Summary
ConstructorsConstructorDescriptionPersistableDocumentIDRegistry(CSVReader documentIDReader, CSVWriter documentIDWriter, String processCode) PersistableDocumentIDRegistry(CSVReader documentIDReader, String processCode) PersistableDocumentIDRegistry(CSVWriter documentIDWriter, String processCode) PersistableDocumentIDRegistry(String processCode) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddID(String qualifier, String documentID, long pk, DocumentIDRegistry.MODE mode) Adds a new mapping ID<->PK to the registry.voidprotected List<ImpexDocumentIdModel>protected StringgetID(String qualifier, long pk, DocumentIDRegistry.MODE mode) Gets the ID to which the given PK is mapped.protected longgetPK(String qualifier, String documentID, DocumentIDRegistry.MODE mode) Gets the PK to which the given ID is mapped.Returns the storage related to the given mode.Methods inherited from class de.hybris.platform.impex.jalo.DocumentIDRegistry
calculateNextID, closeStreams, containsID, containsPK, exportID, hasUnresolvedIDs, importIDs, isResolved, isUnresolved, lookupID, lookupPK, printUnresolvedIDs, registerID, registerPK, resolveID
-
Constructor Details
-
PersistableDocumentIDRegistry
-
PersistableDocumentIDRegistry
-
PersistableDocumentIDRegistry
-
PersistableDocumentIDRegistry
-
-
Method Details
-
getID
Description copied from class:DocumentIDRegistryGets the ID to which the given PK is mapped.- Overrides:
getIDin classDocumentIDRegistry- Parameters:
qualifier- scope in which will be searchedpk- the PK for which the ID will be returnedmode- defines the ID storage in which will be searched- Returns:
- the ID to the given PK or null
-
getPK
Description copied from class:DocumentIDRegistryGets the PK to which the given ID is mapped. Used while import for resolving an ID to an PK.- Overrides:
getPKin classDocumentIDRegistry- Parameters:
qualifier- scope of the IDdocumentID- ID for which the PK will be returnedmode- defines the ID storage in which will be searched- Returns:
- the PK to the given ID or -1
-
addID
protected void addID(String qualifier, String documentID, long pk, DocumentIDRegistry.MODE mode) throws ImpExException Description copied from class:DocumentIDRegistryAdds a new mapping ID<->PK to the registry. If the pair is already existent, it will be replaced. T- Overrides:
addIDin classDocumentIDRegistry- Parameters:
qualifier- the qualifier to which the ID is relateddocumentID- the new IDpk- the PK to which the ID will be mappedmode- defines the ID storage where the ID will be added- Throws:
ImpExException- the ID already exists and maps to another OK
-
getAllImpexDocumentIDs
-
clearAllDocumentIds
public void clearAllDocumentIds() -
getQualifiersMap
protected Map<String,org.apache.commons.collections4.bidimap.DualHashBidiMap<String, getQualifiersMapLong>> (DocumentIDRegistry.MODE mode) Description copied from class:DocumentIDRegistryReturns the storage related to the given mode.- Overrides:
getQualifiersMapin classDocumentIDRegistry- Parameters:
mode- the mode to which the associated storage is needed- Returns:
- storage associated to given mode
-