Package apple.coredata
Class NSManagedObjectModel
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coredata.NSManagedObjectModel
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSFastEnumeration,NSObject
public class NSManagedObjectModel extends NSObject implements NSCoding, NSCopying, NSFastEnumeration
Models describe object graphs to be managed. Models (and their entities/properties/fetch request templates) are editable until they are used by a persistent store coordinator, allowing developers to create/modify them dynamically. However, once a model is being used, it MUST NOT be changed. When the persistent store coordinator first fetches data using a model, it will become uneditable. Any attempt to mutate a model or any of its subobjects after that point will cause an exception to be thrown. If you need to modify a model that is in use, create a copy, modify the copy, and then discard the objects with the old model. API-Since: 3.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSManagedObjectModel(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSManagedObjectModelalloc()static NSManagedObjectModelallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @Nullable NSDictionary<java.lang.String,java.lang.String>checksumsForVersionedModelAtURLError(@NotNull NSURL modelURL, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)This method will retrieve the version checksums for all the models in a versioned model bundle.static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull NSArray<java.lang.String>configurations()returns all available configuration names@NotNull java.lang.ObjectcopyWithZone(@Nullable org.moe.natj.general.ptr.VoidPtr zone)longcountByEnumeratingWithStateObjectsCount(@NotNull org.moe.natj.general.ptr.VoidPtr state, @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffer, long len)static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(@NotNull NSCoder coder)@NotNull NSArray<? extends NSEntityDescription>entities()@NotNull NSDictionary<java.lang.String,? extends NSEntityDescription>entitiesByName()@Nullable NSArray<? extends NSEntityDescription>entitiesForConfiguration(@Nullable java.lang.String configuration)@NotNull NSDictionary<java.lang.String,? extends NSData>entityVersionHashesByName()Returns a dictionary of the version hashes for the entities in the model, keyed by entity name.@Nullable NSFetchRequest<?>fetchRequestFromTemplateWithNameSubstitutionVariables(@NotNull java.lang.String name, @NotNull NSDictionary<java.lang.String,?> variables)returns a copy of the fetch request template with the variable bindings substituted - this is the usual way to bind an "abstractly" defined fetch request template to a concrete fetch@Nullable NSFetchRequest<?>fetchRequestTemplateForName(@NotNull java.lang.String name)@NotNull NSDictionary<java.lang.String,? extends NSFetchRequest<?>>fetchRequestTemplatesByName()Returns the dictionary of fetch request templates, keyed by name, for the model.static longhash_static()NSManagedObjectModelinit()NSManagedObjectModelinitWithCoder(@NotNull NSCoder coder)NS_DESIGNATED_INITIALIZERNSManagedObjectModelinitWithContentsOfURL(@NotNull NSURL url)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)booleanisConfigurationCompatibleWithStoreMetadata(@Nullable java.lang.String configuration, @NotNull NSDictionary<java.lang.String,?> metadata)Compares the version information in the store metadata with the entity version of a given configuration.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)@Nullable NSDictionary<java.lang.String,java.lang.String>localizationDictionary()NSDictionary containing localized string values for entities, properties, and error strings related to this model.static @Nullable NSManagedObjectModelmergedModelFromBundles(@Nullable NSArray<? extends NSBundle> bundles)looks up all models in the specified bundles and merges them; if nil is specified as argument, uses the main bundlestatic @Nullable NSManagedObjectModelmergedModelFromBundlesForStoreMetadata(@Nullable NSArray<? extends NSBundle> bundles, @NotNull NSDictionary<java.lang.String,?> metadata)Returns the managed object model used to create the store for the specified metadata.static @Nullable NSManagedObjectModelmodelByMergingModels(@Nullable NSArray<? extends NSManagedObjectModel> models)combines multiple models (typically from different frameworks) into onestatic @Nullable NSManagedObjectModelmodelByMergingModelsForStoreMetadata(@NotNull NSArray<? extends NSManagedObjectModel> models, @NotNull NSDictionary<java.lang.String,?> metadata)Returns a merged model from the specified array for the version information in the provided metadata.static NSManagedObjectModelnew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetEntities(@NotNull NSArray<? extends NSEntityDescription> value)voidsetEntitiesForConfiguration(@NotNull NSArray<? extends NSEntityDescription> entities, @NotNull java.lang.String configuration)voidsetFetchRequestTemplateForName(@Nullable NSFetchRequest<?> fetchRequestTemplate, @NotNull java.lang.String name)fetch request templates allow to pre-define queries and their parameters in the model (with the tool) - typically they contain variables that need to be substituted at runtime.voidsetLocalizationDictionary(@Nullable NSDictionary<java.lang.String,java.lang.String> value)NSDictionary containing localized string values for entities, properties, and error strings related to this model.static voidsetVersion_static(long aVersion)voidsetVersionIdentifiers(@NotNull NSSet<?> value)Returns the collection of developer-defined version identifiers for the model.static org.moe.natj.objc.Classsuperclass_static()static booleanuseStoredAccessor()Deprecated.static longversion_static()@NotNull java.lang.StringversionChecksum()Returns a Base-64 encoded string representation of the entity version hashes.@NotNull NSSet<?>versionIdentifiers()Returns the collection of developer-defined version identifiers for the model.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, 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, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSManagedObjectModel alloc()
-
allocWithZone
public static NSManagedObjectModel allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull 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
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
mergedModelFromBundles
@Nullable public static @Nullable NSManagedObjectModel mergedModelFromBundles(@Nullable @Nullable NSArray<? extends NSBundle> bundles)
looks up all models in the specified bundles and merges them; if nil is specified as argument, uses the main bundle
-
mergedModelFromBundlesForStoreMetadata
@Nullable public static @Nullable NSManagedObjectModel mergedModelFromBundlesForStoreMetadata(@Nullable @Nullable NSArray<? extends NSBundle> bundles, @NotNull @NotNull NSDictionary<java.lang.String,?> metadata)
Returns the managed object model used to create the store for the specified metadata. This method is a companion to the mergedModelFromBundles: method; in this case, the framework uses the version information stored in the metadata for a store to locate the models/entities used to create the store in the available bundles, and return the model. If the model for the store cannot be found, this method will return nil. API-Since: 3.0
-
modelByMergingModels
@Nullable public static @Nullable NSManagedObjectModel modelByMergingModels(@Nullable @Nullable NSArray<? extends NSManagedObjectModel> models)
combines multiple models (typically from different frameworks) into one
-
modelByMergingModelsForStoreMetadata
@Nullable public static @Nullable NSManagedObjectModel modelByMergingModelsForStoreMetadata(@NotNull @NotNull NSArray<? extends NSManagedObjectModel> models, @NotNull @NotNull NSDictionary<java.lang.String,?> metadata)
Returns a merged model from the specified array for the version information in the provided metadata. (This is the companion method to mergedModelFromBundles:forStoreMetadata:) If a model cannot be created to match the version information in the specified metadata, this method will return nil. API-Since: 3.0
-
new_objc
public static NSManagedObjectModel 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()
-
configurations
@NotNull public @NotNull NSArray<java.lang.String> configurations()
returns all available configuration names
-
copyWithZone
@NotNull public @NotNull java.lang.Object copyWithZone(@Nullable @Nullable org.moe.natj.general.ptr.VoidPtr zone)- Specified by:
copyWithZonein interfaceNSCopying
-
countByEnumeratingWithStateObjectsCount
public long countByEnumeratingWithStateObjectsCount(@NotNull @NotNull org.moe.natj.general.ptr.VoidPtr state, @NotNull @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffer, long len)- Specified by:
countByEnumeratingWithStateObjectsCountin interfaceNSFastEnumeration
-
encodeWithCoder
public void encodeWithCoder(@NotNull @NotNull NSCoder coder)- Specified by:
encodeWithCoderin interfaceNSCoding
-
entities
@NotNull public @NotNull NSArray<? extends NSEntityDescription> entities()
-
entitiesByName
@NotNull public @NotNull NSDictionary<java.lang.String,? extends NSEntityDescription> entitiesByName()
-
entitiesForConfiguration
@Nullable public @Nullable NSArray<? extends NSEntityDescription> entitiesForConfiguration(@Nullable @Nullable java.lang.String configuration)
-
entityVersionHashesByName
@NotNull public @NotNull NSDictionary<java.lang.String,? extends NSData> entityVersionHashesByName()
Returns a dictionary of the version hashes for the entities in the model, keyed by entity name. (The dictionary of version hash information is used by Core Data to determine schema compatibility.) API-Since: 3.0
-
fetchRequestFromTemplateWithNameSubstitutionVariables
@Nullable public @Nullable NSFetchRequest<?> fetchRequestFromTemplateWithNameSubstitutionVariables(@NotNull @NotNull java.lang.String name, @NotNull @NotNull NSDictionary<java.lang.String,?> variables)
returns a copy of the fetch request template with the variable bindings substituted - this is the usual way to bind an "abstractly" defined fetch request template to a concrete fetch
-
fetchRequestTemplateForName
@Nullable public @Nullable NSFetchRequest<?> fetchRequestTemplateForName(@NotNull @NotNull java.lang.String name)
-
fetchRequestTemplatesByName
@NotNull public @NotNull NSDictionary<java.lang.String,? extends NSFetchRequest<?>> fetchRequestTemplatesByName()
Returns the dictionary of fetch request templates, keyed by name, for the model. If the template contains a predicate with substitution variables, you should instead use fetchRequestFromTemplateWithName:substitutionVariables: to create a new fetch request. API-Since: 3.0
-
init
public NSManagedObjectModel init()
-
initWithCoder
public NSManagedObjectModel initWithCoder(@NotNull @NotNull NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
initWithContentsOfURL
public NSManagedObjectModel initWithContentsOfURL(@NotNull @NotNull NSURL url)
-
isConfigurationCompatibleWithStoreMetadata
public boolean isConfigurationCompatibleWithStoreMetadata(@Nullable @Nullable java.lang.String configuration, @NotNull @NotNull NSDictionary<java.lang.String,?> metadata)Compares the version information in the store metadata with the entity version of a given configuration. Returns NO if there are differences between the version information. (For information on specific differences, developers should utilize the entityVersionHashesByName method, and perform a comparison.) API-Since: 3.0
-
localizationDictionary
@Nullable public @Nullable NSDictionary<java.lang.String,java.lang.String> localizationDictionary()
NSDictionary containing localized string values for entities, properties, and error strings related to this model. The key and value pattern follows: key = "Entity/NonLocalizedEntityName" value = "LocalizedEntityName" // for properties of the same non-localized name in differenct entities, which should have different localized names key = "Property/NonLocalizedPropertyName/Entity/EntityName" value = "LocalizedPropertyName" key = "Property/NonLocalizedPropertyName" value = "LocalizedPropertyName" key = "ErrorString/NonLocalizedErrorString" value = "LocalizedErrorString"
-
setEntities
public void setEntities(@NotNull @NotNull NSArray<? extends NSEntityDescription> value)
-
setEntitiesForConfiguration
public void setEntitiesForConfiguration(@NotNull @NotNull NSArray<? extends NSEntityDescription> entities, @NotNull @NotNull java.lang.String configuration)
-
setFetchRequestTemplateForName
public void setFetchRequestTemplateForName(@Nullable @Nullable NSFetchRequest<?> fetchRequestTemplate, @NotNull @NotNull java.lang.String name)fetch request templates allow to pre-define queries and their parameters in the model (with the tool) - typically they contain variables that need to be substituted at runtime.
-
setLocalizationDictionary
public void setLocalizationDictionary(@Nullable @Nullable NSDictionary<java.lang.String,java.lang.String> value)NSDictionary containing localized string values for entities, properties, and error strings related to this model. The key and value pattern follows: key = "Entity/NonLocalizedEntityName" value = "LocalizedEntityName" // for properties of the same non-localized name in differenct entities, which should have different localized names key = "Property/NonLocalizedPropertyName/Entity/EntityName" value = "LocalizedPropertyName" key = "Property/NonLocalizedPropertyName" value = "LocalizedPropertyName" key = "ErrorString/NonLocalizedErrorString" value = "LocalizedErrorString"
-
setVersionIdentifiers
public void setVersionIdentifiers(@NotNull @NotNull NSSet<?> value)Returns the collection of developer-defined version identifiers for the model. For models created in Xcode, this value is set by the developer in the model inspector. Merged models return the combined collection of identifiers. This value is meant to be used as a debugging hint to help developers determine the models that were combined to create a merged model. The framework does not give models a default identifier, nor does it depend this value at runtime. API-Since: 3.0
-
versionIdentifiers
@NotNull public @NotNull NSSet<?> versionIdentifiers()
Returns the collection of developer-defined version identifiers for the model. For models created in Xcode, this value is set by the developer in the model inspector. Merged models return the combined collection of identifiers. This value is meant to be used as a debugging hint to help developers determine the models that were combined to create a merged model. The framework does not give models a default identifier, nor does it depend this value at runtime. API-Since: 3.0
-
checksumsForVersionedModelAtURLError
@Nullable public static @Nullable NSDictionary<java.lang.String,java.lang.String> checksumsForVersionedModelAtURLError(@NotNull @NotNull NSURL modelURL, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
This method will retrieve the version checksums for all the models in a versioned model bundle. This method will return nil if there is an error loading the bundle at the specified URL. Potential errors that might be returned include failures due to a lack of permissions from sandboxing or data protection, a missing file or general read errors. API-Since: 17.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
versionChecksum
@NotNull public @NotNull java.lang.String versionChecksum()
Returns a Base-64 encoded string representation of the entity version hashes. API-Since: 17.0
-
-