Project Wonder 5.0

com.webobjects.eoaccess
Class ERXEntity

java.lang.Object
  extended by com.webobjects.eoaccess.EOEntity
      extended by com.webobjects.eoaccess.ERXEntity
All Implemented Interfaces:
EOPropertyListEncoding, EOSQLExpression.SQLValue

public class ERXEntity
extends EOEntity

ERXEntity provides a basic subclass of EOEntity providing a simple fix for vertical inheritance.

Note: If you plan on subclassing EOEntity or ERXEntity you MUST put your subclass in the same package if you want it to work. There are numerous default and protected instance methods within EOEntity itself that will fail to resolve at runtime if your subclass is in another package!

See Also:
EOEntity
Author:
ldeck

Field Summary
 
Fields inherited from class com.webobjects.eoaccess.EOEntity
_attributesToFetch, _attributesToSave, _batchCount, _classDescription, _classForEntity, _classForInstances, _className, _classPropertyAttributeNames, _classPropertyNames, _classPropertyToManyRelationshipNames, _classPropertyToOneRelationshipNames, _clientClassPropertyNames, _dbSnapshotKeys, _externalName, _externalQuery, _fetchInfo, _flags_cachesObjects, _flags_isAbstractEntity, _flags_isReadOnly, _flags_isSingleTableEntity, _flags_nonUpdateableAttributes, _flags_updating, _internalInfo, _model, _name, _parent, _primaryKeyAttributeNames, _restrictingQualifier, _singleTableRestrictingQualifier, _singleTableSubEntityKey, _subEntityNameForInstances, _userInfo, DeleteProcedureOperation, FetchAllProcedureOperation, FetchWithPrimaryKeyProcedureOperation, InsertProcedureOperation, NextPrimaryKeyProcedureOperation
 
Constructor Summary
ERXEntity()
          Creates and returns a new ERXEntity.
ERXEntity(NSDictionary plist, Object owner)
          Creates and returns a new EOEntity initialized from the property list plist belonging to the EOModel owner.
 
Method Summary
protected  EOKeyGlobalID _globalIDWithoutTypeCoercion(Object[] values)
          Overridden through our bottleneck.
 EOAttribute anyAttributeNamed(String name)
          ldeck radar bug#6302622.
 boolean hasExternalName()
           
 void setClassDescription(EOClassDescription classDescription)
          Sets the class description for the instance.
 
Methods inherited from class com.webobjects.eoaccess.EOEntity
_adaptorDictionaryInitializer, _addAttributesToFetchForRelationshipPathAtts, _allFetchSpecifications, _assertNoPropagateKeyCycleWithEntitiesRelationships, _attributeForPath, _attributesToFetch, _attributesToSave, _checkOptimizableSingleTableSubEntity, _checkSingleTableSubEntityKey, _classDescriptionForInstances, _classPropertyAttributes, _clearAttributesCaches, _concreteClassForDeferredFault, _concreteSubEntityNameForDeferredFault, _extraSingleTableAttributesToFetch, _fetchInfo, _fetchSpecificationDictionary, _flattenAttributeRelationshipPathCurrentAttributes, _flattenedAttNameToSnapshotKeyMapping, _generateSingleTableSubEntityDictionary, _globalIDWithValues, _hasNonUpdateableAttributes, _hiddenRelationships, _initWithPropertyListOwner, _internalInfo, _invalidateSingleTableCache, _invalidateSingleTableEntity, _invalidateSingleTableEntityCacheOnly, _inverseRelationshipPathForPath, _isIdentifierChar, _isIdentifierStartingChar, _isSingleTableEntity, _keyMapForIdenticalKeyRelationshipPath, _keyMapForRelationshipPath, _loadEntity, _mapAttributeToDestinationAttributeInLastComponentOfRelationshipPath, _nameForFetchSpecification, _newDictionaryForProperties, _newPropertyNameWithRoot, _numberOfRelationships, _parseDescriptionIsFormatArguments, _parsePropertyName, _parseRelationshipPath, _primaryKeyDictionaryInitializer, _propertyDictionaryInitializer, _propertyForPath, _propertyNames, _relationshipForPath, _relationshipPathHasIdenticalKeys, _relationshipPathIsToMany, _setFetchInfo, _setInternalInfo, _setIsEdited, _setModel, _setParent, _singleTableRestrictingQualifier, _singleTableSubEntityDictionary, _singleTableSubEntityForRow, _singleTableSubEntityKey, _subEntityKeyValue, _toString, addAttribute, addFetchSpecification, addIndex, addRelationship, addSharedObjectFetchSpecificationByName, addSubEntity, anyRelationshipNamed, attributeNamed, attributes, attributesToFetch, attributesUsedForLocking, awakeWithPropertyList, beautifyName, cachesObjects, classDescriptionForInstances, className, classNameWithoutPackage, classPackageName, classProperties, classPropertyNames, clientClassName, clientClassProperties, clientClassPropertyNames, encodeIntoPropertyList, externalModelsReferenced, externalName, externalNameForInternalName, externalQuery, fetchSpecificationNamed, fetchSpecificationNames, globalIDForRow, hasRealAttributes, hasSimplePrimaryKey, indexes, indexNamed, isAbstractEntity, isPrimaryKeyValidInObject, isQualifierForPrimaryKey, isReadOnly, isSubEntityOf, isValidAttributeUsedForLocking, isValidClassProperty, isValidPrimaryKeyAttribute, maxNumberOfInstancesToBatchFetch, model, name, nameForExternalName, parentEntity, primaryKeyAttributeNames, primaryKeyAttributes, primaryKeyForGlobalID, primaryKeyForRow, primaryKeyRootName, propertyNamed, qualifierForPrimaryKey, referencesProperty, relationshipNamed, relationships, removeAttribute, removeFetchSpecificationNamed, removeIndex, removeRelationship, removeSharedObjectFetchSpecificationByName, removeSubEntity, restrictingQualifier, schemaBasedQualifier, setAttributesUsedForLocking, setCachesObjects, setClassName, setClassProperties, setExternalName, setExternalQuery, setIsAbstractEntity, setMaxNumberOfInstancesToBatchFetch, setName, setPrimaryKeyAttributes, setReadOnly, setRestrictingQualifier, setSharedObjectFetchSpecificationsByName, setStoredProcedure, setUserInfo, sharedObjectFetchSpecificationNames, storedProcedureForOperation, subEntities, toString, userInfo, valueForSQLExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERXEntity

public ERXEntity()
Creates and returns a new ERXEntity.


ERXEntity

public ERXEntity(NSDictionary plist,
                 Object owner)
Creates and returns a new EOEntity initialized from the property list plist belonging to the EOModel owner. plist is dictionary containing only property list data types (that is, NSDictionary, NSArray, NSData, and String). This constructor is used by EOModeler when it reads in an EOModel from a file.

Parameters:
plist - - A dictionary of property list values from which to initialize the new EOEntity object.
owner - - The EOModel to which the newly created entity belongs.
See Also:
EOPropertyListEncoding.encodeIntoPropertyList(NSMutableDictionary propertyList), EOPropertyListEncoding.awakeWithPropertyList(NSDictionary propertyList)
Method Detail

anyAttributeNamed

public EOAttribute anyAttributeNamed(String name)
ldeck radar bug#6302622.

Relating two sub-entities in vertical inheritance can fail to resolve the foreign key for inserts. i.e., NeededByEOF was not dealt with. The simple fix is to return the primary key attribute at the given index.

Overrides:
anyAttributeNamed in class EOEntity
See Also:
EOEntity.anyAttributeNamed(java.lang.String)

hasExternalName

public boolean hasExternalName()
Overrides:
hasExternalName in class EOEntity
Since:
5.4.1
See Also:
EOEntity.hasExternalName()

setClassDescription

public void setClassDescription(EOClassDescription classDescription)
Sets the class description for the instance.

Parameters:
classDescription - - the EOClassDescription to associate with the receiver.

_globalIDWithoutTypeCoercion

protected EOKeyGlobalID _globalIDWithoutTypeCoercion(Object[] values)
Overridden through our bottleneck.

Overrides:
_globalIDWithoutTypeCoercion in class EOEntity

Last updated: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.