Package apple.coredata
Class NSMigrationManager
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coredata.NSMigrationManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSMigrationManager(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSMigrationManageralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)voidassociateSourceInstanceWithDestinationInstanceForEntityMapping(NSManagedObject sourceInstance, NSManagedObject destinationInstance, NSEntityMapping entityMapping)Associates the source instance with the specified destination instance for the given entity mapping.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)voidcancelMigrationWithError(NSError error)Cancels the migration with the specified error.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()NSEntityMappingcurrentEntityMapping()Observable property that can be used to determine progress of the migration process.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()NSManagedObjectContextdestinationContext()NSEntityDescriptiondestinationEntityForEntityMapping(NSEntityMapping mEntity)NSArray<? extends NSManagedObject>destinationInstancesForEntityMappingNamedSourceInstances(java.lang.String mappingName, NSArray<? extends NSManagedObject> sourceInstances)Returns the managed object instances created in the destination store for the given entity mapping for the specified source instances.NSManagedObjectModeldestinationModel()static longhash_static()NSMigrationManagerinit()NSMigrationManagerinitWithSourceModelDestinationModel(NSManagedObjectModel sourceModel, NSManagedObjectModel destinationModel)Creates a migration manager instance with the corresponding source and destination models.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)NSMappingModelmappingModel()Accessors for the mapping model, source model, and destination modelbooleanmigrateStoreFromURLTypeOptionsWithMappingModelToDestinationURLDestinationTypeDestinationOptionsError(NSURL sourceURL, java.lang.String sStoreType, NSDictionary<?,?> sOptions, NSMappingModel mappings, NSURL dURL, java.lang.String dStoreType, NSDictionary<?,?> dOptions, org.moe.natj.general.ptr.Ptr<NSError> error)Migrates of the store at the specified source URL to the store at the destination URL, performing all of the mappings in the mapping model.floatmigrationProgress()Observable property that can be used to determine progress of the migration process.static java.lang.Objectnew_objc()voidreset()Resets the association tables for the migration.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetUserInfo(NSDictionary<?,?> value)Returns/sets the user info for the migration managervoidsetUsesStoreSpecificMigrationManager(boolean value)Tries to use a store specific migration manager to perform the store migration, note that a store specific migration manager class is not guaranteed to perform any of the migration manager delegate callbacks or update values for the observable properties.static voidsetVersion_static(long aVersion)NSManagedObjectContextsourceContext()Accessors for the managed object contexts used for reading the source and destination stores.NSEntityDescriptionsourceEntityForEntityMapping(NSEntityMapping mEntity)Returns the NSEntityDescription for the source and destination entities, respectively, of the entity mapping.NSArray<? extends NSManagedObject>sourceInstancesForEntityMappingNamedDestinationInstances(java.lang.String mappingName, NSArray<? extends NSManagedObject> destinationInstances)Returns the managed object instances in the source store used to create the specified destination instances for the given entity mapping.NSManagedObjectModelsourceModel()static org.moe.natj.objc.Classsuperclass_static()NSDictionary<?,?>userInfo()Returns/sets the user info for the migration managerbooleanusesStoreSpecificMigrationManager()Tries to use a store specific migration manager to perform the store migration, note that a store specific migration manager class is not guaranteed to perform any of the migration manager delegate callbacks or update values for the observable properties.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSMigrationManager alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
associateSourceInstanceWithDestinationInstanceForEntityMapping
public void associateSourceInstanceWithDestinationInstanceForEntityMapping(NSManagedObject sourceInstance, NSManagedObject destinationInstance, NSEntityMapping entityMapping)
Associates the source instance with the specified destination instance for the given entity mapping. Since the migration is performed as a three-step process (first create the data, then relate the data, then validate the data) it is necessary to be able to associate data between the source and destination stores, in order to allow for relationship creation/fixup after the creation pass. This method is called in the default implementation of NSEntityMigrationPolicy's createDestinationInstancesForSourceInstance:entityMapping:manager:error: method.
-
cancelMigrationWithError
public void cancelMigrationWithError(NSError error)
Cancels the migration with the specified error. Calling this method causes migrateStoreFromURL:type:options:withMappingModel:toDestinationURL:destinationType:destinationOptions:error: to abort the migration and return the specified error.
-
currentEntityMapping
public NSEntityMapping currentEntityMapping()
Observable property that can be used to determine progress of the migration process. Returns the current entity mapping being processed. Each entity is processed a total of three times (instance creation, relationship creation, validation)
-
destinationContext
public NSManagedObjectContext destinationContext()
-
destinationEntityForEntityMapping
public NSEntityDescription destinationEntityForEntityMapping(NSEntityMapping mEntity)
-
destinationInstancesForEntityMappingNamedSourceInstances
public NSArray<? extends NSManagedObject> destinationInstancesForEntityMappingNamedSourceInstances(java.lang.String mappingName, NSArray<? extends NSManagedObject> sourceInstances)
Returns the managed object instances created in the destination store for the given entity mapping for the specified source instances.
-
destinationModel
public NSManagedObjectModel destinationModel()
-
init
public NSMigrationManager init()
-
initWithSourceModelDestinationModel
public NSMigrationManager initWithSourceModelDestinationModel(NSManagedObjectModel sourceModel, NSManagedObjectModel destinationModel)
Creates a migration manager instance with the corresponding source and destination models. (All validation of the arguments is performed during migrateStoreFromURL:toURL:) As with the NSPersistentStoreCoordinator, once models are added to the migration manager they are immutable and cannot be altered.
-
mappingModel
public NSMappingModel mappingModel()
Accessors for the mapping model, source model, and destination model
-
migrateStoreFromURLTypeOptionsWithMappingModelToDestinationURLDestinationTypeDestinationOptionsError
public boolean migrateStoreFromURLTypeOptionsWithMappingModelToDestinationURLDestinationTypeDestinationOptionsError(NSURL sourceURL, java.lang.String sStoreType, NSDictionary<?,?> sOptions, NSMappingModel mappings, NSURL dURL, java.lang.String dStoreType, NSDictionary<?,?> dOptions, org.moe.natj.general.ptr.Ptr<NSError> error)
Migrates of the store at the specified source URL to the store at the destination URL, performing all of the mappings in the mapping model. A store must exist at the source URL; if a store does not exist at the destination URL, one will be created (otherwise the migration will append to the existing store.) Invoking this method will perform compatibility checks on the source and destination models (and the mapping model.) If an error occurs during the validation or migration, this method will return NO.
-
migrationProgress
public float migrationProgress()
Observable property that can be used to determine progress of the migration process. Returns the percentage complete of the migration process. The progress value is a number from 0 to 1 indicating percent complete.
-
reset
public void reset()
Resets the association tables for the migration. (Note this does NOT reset the source or destination contexts).
-
setUserInfo
public void setUserInfo(NSDictionary<?,?> value)
Returns/sets the user info for the migration manager
-
setUsesStoreSpecificMigrationManager
public void setUsesStoreSpecificMigrationManager(boolean value)
Tries to use a store specific migration manager to perform the store migration, note that a store specific migration manager class is not guaranteed to perform any of the migration manager delegate callbacks or update values for the observable properties. Defaults to YES
-
sourceContext
public NSManagedObjectContext sourceContext()
Accessors for the managed object contexts used for reading the source and destination stores. These contexts are created lazily, as part of the initialization of two Core Data stacks (one for reading, the other for writing data.)
-
sourceEntityForEntityMapping
public NSEntityDescription sourceEntityForEntityMapping(NSEntityMapping mEntity)
Returns the NSEntityDescription for the source and destination entities, respectively, of the entity mapping. (Entity mappings do not store the actual description objects, but rather the name and version information of the entity.)
-
sourceInstancesForEntityMappingNamedDestinationInstances
public NSArray<? extends NSManagedObject> sourceInstancesForEntityMappingNamedDestinationInstances(java.lang.String mappingName, NSArray<? extends NSManagedObject> destinationInstances)
Returns the managed object instances in the source store used to create the specified destination instances for the given entity mapping.
-
sourceModel
public NSManagedObjectModel sourceModel()
-
userInfo
public NSDictionary<?,?> userInfo()
Returns/sets the user info for the migration manager
-
usesStoreSpecificMigrationManager
public boolean usesStoreSpecificMigrationManager()
Tries to use a store specific migration manager to perform the store migration, note that a store specific migration manager class is not guaranteed to perform any of the migration manager delegate callbacks or update values for the observable properties. Defaults to YES
-
-