ShipmentInfoCoreDataStore
public class ShipmentInfoCoreDataStore : ShipmentInfoDataStore, CoreDataCrudable
Store for fetching, creating, updating or deleting ShipmentInfoEntity
s on the provided CoreDataController
[REQ:BSI-eRp-ePA:O.Source_2#5] CoreDataStore adapter for ShipmentInfoEntity
s
-
Initialize a ShipmentInfo Core Data Store
Declaration
Swift
public init( userDefaults: UserDefaults = UserDefaults.standard, coreDataControllerFactory: CoreDataControllerFactory, foregroundQueue: AnySchedulerOf<DispatchQueue> = AnyScheduler.main, backgroundQueue: AnySchedulerOf<DispatchQueue> = DispatchQueue(label: "shipmentInfo-queue", qos: .userInitiated) .eraseToAnyScheduler() )
Parameters
coreDataControllerFactory
Factory that is capable of providing a CoreDataController
foregroundQueue
read queue, remember never to access the read NSManagedObjects properties/relations on any other queue (Default: DispatchQueue.main)
backgroundQueue
write queue (Default: DispatchQueue(label: “profile-queue”, qos: .userInitiated))
-
Declaration
Swift
public func fetchShipmentInfo(by identifier: UUID) -> AnyPublisher<ShipmentInfo?, LocalStoreError>
-
Declaration
Swift
public func set(selectedShipmentInfoId: UUID)
-
Declaration
Swift
public var selectedShipmentInfo: AnyPublisher<ShipmentInfo?, LocalStoreError> { get }
-
Declaration
Swift
public func listAllShipmentInfos() -> AnyPublisher<[ShipmentInfo], LocalStoreError>
-
Declaration
Swift
public func save(shipmentInfos: [ShipmentInfo]) -> AnyPublisher<[ShipmentInfo], LocalStoreError>
-
Declaration
Swift
public func delete(shipmentInfos: [ShipmentInfo]) -> AnyPublisher<[ShipmentInfo], LocalStoreError>
-
Declaration
Swift
public func update( identifier: UUID, mutating: @escaping (inout ShipmentInfo) -> Void ) -> AnyPublisher<ShipmentInfo, LocalStoreError>
-
Declaration
Swift
public enum Error : Swift.Error