Package apple.coredata
Class NSEntityDescription
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coredata.NSEntityDescription
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSFastEnumeration,NSObject
public class NSEntityDescription extends NSObject implements NSCoding, NSCopying, NSFastEnumeration
Entities describe the "types" of objects available.
-
-
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 protectedNSEntityDescription(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSEntityDescriptionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)NSDictionary<java.lang.String,? extends NSAttributeDescription>attributesByName()convenience methods to get the most common (and most relevant) types of properties for an entitystatic booleanautomaticallyNotifiesObserversForKey(java.lang.String key)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()NSArray<? extends NSArray<?>>compoundIndexes()Getter returns an array of arrays of NSPropertyDescription objects describing the components of the indexes.java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)NSExpressioncoreSpotlightDisplayNameExpression()Expression used to compute the CoreSpotlight display name for instance of this entity.longcountByEnumeratingWithStateObjectsCount(org.moe.natj.general.ptr.VoidPtr state, 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(NSCoder coder)static NSEntityDescriptionentityForNameInManagedObjectContext(java.lang.String entityName, NSManagedObjectContext context)static longhash_static()NSArray<? extends NSFetchIndexDescription>indexes()Returns/sets the set of indexes for the entity.NSEntityDescriptioninit()NSEntityDescriptioninitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERstatic NSManagedObjectinsertNewObjectForEntityForNameInManagedObjectContext(java.lang.String entityName, NSManagedObjectContext context)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)booleanisAbstract()booleanisKindOfEntity(NSEntityDescription entity)Returns a boolean indicating if the receiver is a subentity of the specified entity.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)java.lang.StringmanagedObjectClassName()NSManagedObjectModelmanagedObjectModel()java.lang.Stringname()static java.lang.Objectnew_objc()NSArray<? extends NSPropertyDescription>properties()NSDictionary<java.lang.String,? extends NSPropertyDescription>propertiesByName()NSDictionary<java.lang.String,? extends NSRelationshipDescription>relationshipsByName()NSArray<? extends NSRelationshipDescription>relationshipsWithDestinationEntity(NSEntityDescription entity)java.lang.StringrenamingIdentifier()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetAbstract(boolean value)voidsetCompoundIndexes(NSArray<? extends NSArray<?>> value)Getter returns an array of arrays of NSPropertyDescription objects describing the components of the indexes.voidsetCoreSpotlightDisplayNameExpression(NSExpression value)Expression used to compute the CoreSpotlight display name for instance of this entity.voidsetIndexes(NSArray<? extends NSFetchIndexDescription> value)Returns/sets the set of indexes for the entity.voidsetManagedObjectClassName(java.lang.String value)voidsetName(java.lang.String value)voidsetProperties(NSArray<? extends NSPropertyDescription> value)voidsetRenamingIdentifier(java.lang.String value)voidsetSubentities(NSArray<? extends NSEntityDescription> value)voidsetUniquenessConstraints(NSArray<? extends NSArray<?>> value)Returns/sets uniqueness constraints for the entity.voidsetUserInfo(NSDictionary<?,?> value)static voidsetVersion_static(long aVersion)voidsetVersionHashModifier(java.lang.String value)Returns/sets the version hash modifier for the entity.NSArray<? extends NSEntityDescription>subentities()NSDictionary<java.lang.String,? extends NSEntityDescription>subentitiesByName()static org.moe.natj.objc.Classsuperclass_static()NSEntityDescriptionsuperentity()NSArray<? extends NSArray<?>>uniquenessConstraints()Returns/sets uniqueness constraints for the entity.NSDictionary<?,?>userInfo()static longversion_static()NSDataversionHash()Returns the version hash for the entity.java.lang.StringversionHashModifier()Returns/sets the version hash modifier for the entity.-
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 NSEntityDescription 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()
-
entityForNameInManagedObjectContext
public static NSEntityDescription entityForNameInManagedObjectContext(java.lang.String entityName, NSManagedObjectContext context)
-
hash_static
public static long hash_static()
-
insertNewObjectForEntityForNameInManagedObjectContext
public static NSManagedObject insertNewObjectForEntityForNameInManagedObjectContext(java.lang.String entityName, NSManagedObjectContext context)
-
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()
-
attributesByName
public NSDictionary<java.lang.String,? extends NSAttributeDescription> attributesByName()
convenience methods to get the most common (and most relevant) types of properties for an entity
-
compoundIndexes
public NSArray<? extends NSArray<?>> compoundIndexes()
Getter returns an array of arrays of NSPropertyDescription objects describing the components of the indexes. Setter takes an array of arrays of NSPropertyDescription objects and/or strings that are the names of properties of the entity on which the index is created. The special strings @"self" and @"entity" can be used to indicate that an index should contain a reference to the object's primary or entity key. This value does not form part of the entity's version hash, and may be ignored by stores which do not natively support compound indexes.
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
countByEnumeratingWithStateObjectsCount
public long countByEnumeratingWithStateObjectsCount(org.moe.natj.general.ptr.VoidPtr state, org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffer, long len)- Specified by:
countByEnumeratingWithStateObjectsCountin interfaceNSFastEnumeration
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
init
public NSEntityDescription init()
-
initWithCoder
public NSEntityDescription initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
isAbstract
public boolean isAbstract()
-
setAbstract
public void setAbstract(boolean value)
-
isKindOfEntity
public boolean isKindOfEntity(NSEntityDescription entity)
Returns a boolean indicating if the receiver is a subentity of the specified entity. (This method is the Core Data entity inheritance equivalent of -isKindOfClass:)
-
managedObjectClassName
public java.lang.String managedObjectClassName()
-
managedObjectModel
public NSManagedObjectModel managedObjectModel()
-
name
public java.lang.String name()
-
properties
public NSArray<? extends NSPropertyDescription> properties()
-
propertiesByName
public NSDictionary<java.lang.String,? extends NSPropertyDescription> propertiesByName()
-
relationshipsByName
public NSDictionary<java.lang.String,? extends NSRelationshipDescription> relationshipsByName()
-
relationshipsWithDestinationEntity
public NSArray<? extends NSRelationshipDescription> relationshipsWithDestinationEntity(NSEntityDescription entity)
-
renamingIdentifier
public java.lang.String renamingIdentifier()
-
setCompoundIndexes
public void setCompoundIndexes(NSArray<? extends NSArray<?>> value)
Getter returns an array of arrays of NSPropertyDescription objects describing the components of the indexes. Setter takes an array of arrays of NSPropertyDescription objects and/or strings that are the names of properties of the entity on which the index is created. The special strings @"self" and @"entity" can be used to indicate that an index should contain a reference to the object's primary or entity key. This value does not form part of the entity's version hash, and may be ignored by stores which do not natively support compound indexes.
-
setManagedObjectClassName
public void setManagedObjectClassName(java.lang.String value)
-
setName
public void setName(java.lang.String value)
-
setProperties
public void setProperties(NSArray<? extends NSPropertyDescription> value)
-
setRenamingIdentifier
public void setRenamingIdentifier(java.lang.String value)
-
setSubentities
public void setSubentities(NSArray<? extends NSEntityDescription> value)
-
setUniquenessConstraints
public void setUniquenessConstraints(NSArray<? extends NSArray<?>> value)
Returns/sets uniqueness constraints for the entity. A uniqueness constraint is a set of one or more attributes whose value must be unique over the set of instances of that entity. Sets an array of arrays, each of which contains one or more NSAttributeDescription or NSString instances (strings must be the names of attributes on the entity) on which the constraint is registered. Returns an array of arrays, each of which contains instances of NSString which identify the attributes on the entity that comprise the constraint. This value forms part of the entity's version hash. Stores which do not support uniqueness constraints should refuse to initialize when given a model containing such constraints. Discussion: uniqueness constraint violations can be computationally expensive to handle. It is highly suggested that there be only one uniqueness constraint per entity hierarchy, although subentites may extend a sueprentity's constraint.
-
setUserInfo
public void setUserInfo(NSDictionary<?,?> value)
-
setVersionHashModifier
public void setVersionHashModifier(java.lang.String value)
Returns/sets the version hash modifier for the entity. This value is included in the version hash for the entity, allowing developers to mark/denote an entity as being a different "version" than another, even if all of the values which affect persistence are equal. (Such a difference is important in cases where the structure of an entity is unchanged, but the format or content of data has changed.)
-
subentities
public NSArray<? extends NSEntityDescription> subentities()
-
subentitiesByName
public NSDictionary<java.lang.String,? extends NSEntityDescription> subentitiesByName()
-
superentity
public NSEntityDescription superentity()
-
uniquenessConstraints
public NSArray<? extends NSArray<?>> uniquenessConstraints()
Returns/sets uniqueness constraints for the entity. A uniqueness constraint is a set of one or more attributes whose value must be unique over the set of instances of that entity. Sets an array of arrays, each of which contains one or more NSAttributeDescription or NSString instances (strings must be the names of attributes on the entity) on which the constraint is registered. Returns an array of arrays, each of which contains instances of NSString which identify the attributes on the entity that comprise the constraint. This value forms part of the entity's version hash. Stores which do not support uniqueness constraints should refuse to initialize when given a model containing such constraints. Discussion: uniqueness constraint violations can be computationally expensive to handle. It is highly suggested that there be only one uniqueness constraint per entity hierarchy, although subentites may extend a sueprentity's constraint.
-
userInfo
public NSDictionary<?,?> userInfo()
-
versionHash
public NSData versionHash()
Returns the version hash for the entity. The version hash is used to uniquely identify an entity based on the collection and configuration of properties for the entity. The version hash uses only values which affect the persistence of data and the user-defined versionHashModifier value. (The values which affect persistence are the name of the entity, the version hash of the superentity (if present), if the entity is abstract, and all of the version hashes for the properties.) This value is stored as part of the version information in the metadata for stores which use this entity, as well as a definition of an entity involved in an NSEntityMapping.
-
versionHashModifier
public java.lang.String versionHashModifier()
Returns/sets the version hash modifier for the entity. This value is included in the version hash for the entity, allowing developers to mark/denote an entity as being a different "version" than another, even if all of the values which affect persistence are equal. (Such a difference is important in cases where the structure of an entity is unchanged, but the format or content of data has changed.)
-
coreSpotlightDisplayNameExpression
public NSExpression coreSpotlightDisplayNameExpression()
Expression used to compute the CoreSpotlight display name for instance of this entity.
-
indexes
public NSArray<? extends NSFetchIndexDescription> indexes()
Returns/sets the set of indexes for the entity. Returns/takes an array of NSFetchIndexDescription instances. This value does not form part of the entity's version hash, and may be ignored by stores which do not natively support indexing. IMPORTANT: Indexes should be the last things set in a model. Changing an entity hierarchy in any way that could affect the validity of indexes (adding or removing super/subentities, adding or removing properties anywhere in the hierarchy) will cause all exisiting indexes for entities in that hierarchy to be dropped.
-
setCoreSpotlightDisplayNameExpression
public void setCoreSpotlightDisplayNameExpression(NSExpression value)
Expression used to compute the CoreSpotlight display name for instance of this entity.
-
setIndexes
public void setIndexes(NSArray<? extends NSFetchIndexDescription> value)
Returns/sets the set of indexes for the entity. Returns/takes an array of NSFetchIndexDescription instances. This value does not form part of the entity's version hash, and may be ignored by stores which do not natively support indexing. IMPORTANT: Indexes should be the last things set in a model. Changing an entity hierarchy in any way that could affect the validity of indexes (adding or removing super/subentities, adding or removing properties anywhere in the hierarchy) will cause all exisiting indexes for entities in that hierarchy to be dropped.
-
-