Inherited by _Company, _Employee, _ERAttachment, _ERAttachmentData, _Bug, _Comment, _Component, _Difficulty, _Framework, _People, _Priority, _Release, _RequirementSubType, _RequirementType, _TestItem, _TestItemState, _ERCHelpText, _ERCLogEntry, _ERCMailMessage, _ERCMessageAttachment, _ERCPreference, _ERCStatic, _ERCAuditBlob, _ERCAuditTrail, _ERCAuditTrailEntry, ERCStampedEnterpriseObject, _Company, _Employee, _Paycheck, _Role, ERXPartialGenericRecord, _ERIAttribute, _ERIAttributeGroup, _ERIAttributeType, _ERIValidationRule, _Asset, _AssetGroup, _Tag, _ERIDirectory, _ERIFile, _ERIFileContent, _Animal, _Company, _Person, _ServerForum, _ServerPost, _ServerTopic, _ServerUser, _ERTag, _Company, _Employee, Record, _Forum, _Post, _Topic, _User, _Movie, _MovieRole, _PlotSummary, _Review, _Talent, _TalentPhoto, _Voting, Studio, and _Studio.

Classes | |
| class | ERXGenericRecordClazz< T extends EOEnterpriseObject > |
| class | InverseRelationshipUpdater |
| class | LocalizedBinding |
| class | TouchingBinding |
Public Member Functions | |
| NSKeyValueCoding._KeyBinding | _otherStorageBinding (String key) |
| void | _setPrimaryKeyDictionary (NSDictionary< String, Object > pkDict) |
| boolean | _setUpdateInverseRelationships (boolean newValue) |
| void | _setValueForPrimaryKey (Object value, String pkAttributeName) |
| void | addObjectsToBothSidesOfRelationshipWithKey (NSArray objects, String key) |
| void | addObjectToBothSidesOfRelationshipWithKey (EORelationshipManipulation eo, String key) |
| void | awakeFromClientUpdate (EOEditingContext editingContext) |
| void | awakeFromFetch (EOEditingContext editingContext) |
| void | awakeFromInsertion (EOEditingContext editingContext) |
| void | batchCheckConsistency () throws NSValidation.ValidationException |
| String | batchFaultingRelationshipName () |
| EOGlobalID | batchFaultingSourceGlobalID () |
| long | batchFaultingTimeStamp () |
| boolean | canDelete () |
| boolean | canUpdate () |
| NSDictionary | changesFromCommittedSnapshot () |
| void | checkConsistency () throws NSValidation.ValidationException |
| void | clearProperties () |
| NSDictionary | committedSnapshot () |
| Object | committedSnapshotValueForKey (String key) |
| void | delete () |
| String | description () |
| void | didCopyFromChildInEditingContext (ERXGenericRecord originalEO, EOEditingContext childEditingContext) |
| void | didDelete (EOEditingContext ec) |
| void | didInsert () |
| void | didRevert (EOEditingContext ec) |
| void | didUpdate () |
| String | encryptedPrimaryKey () |
| EOEntity | entity () |
| ERXGenericRecord () | |
| ERXGenericRecord (EOClassDescription classDescription) | |
| void | excludeObjectFromPropertyWithKey (Object o, String key) |
| void | flushCaches () |
| Object | foreignKeyForRelationshipWithKey (String rel) |
| Logger | getClassLog () |
| boolean | hasKeyChangedFromCommittedSnapshot (String key) |
| boolean | hasKeyChangedFromCommittedSnapshotFromValue (String key, Object oldValue) |
| boolean | hasKeyChangedFromCommittedSnapshotFromValueToNewValue (String key, Object oldValue, Object newValue) |
| boolean | hasKeyChangedFromCommittedSnapshotToValue (String key, Object newValue) |
| void | includeObjectIntoPropertyWithKey (Object o, String key) |
| boolean | isDeletedEO () |
| boolean | isNewEO () |
| boolean | isNewObject () |
| final Boolean | isNonNull () |
| boolean | isUpdatedObject () |
| boolean | isValidatedWhenNested () |
| NSArray< String > | localesForKey (String key) |
| EOEnterpriseObject | localInstanceIn (EOEditingContext ec) |
| EOEnterpriseObject | localInstanceOf (EOEnterpriseObject eo) |
| NSArray | localInstancesOf (NSArray eos) |
| void | mightDelete () |
| boolean | parentObjectStoreIsObjectStoreCoordinator () |
| EOKeyGlobalID | permanentGlobalID () |
| EOKeyGlobalID | permanentGlobalID (boolean generateIfMissing) |
| String | primaryKey () |
| NSArray< String > | primaryKeyAttributeNames () |
| NSDictionary< String, Object > | primaryKeyDictionary (boolean inTransaction) |
| String | primaryKeyInTransaction () |
| Object | rawPrimaryKey () |
| Object | rawPrimaryKeyInTransaction () |
| ERXEnterpriseObject | refetchObjectFromDB () |
| ERXEnterpriseObject | refetchObjectFromDBinEditingContext (EOEditingContext ec) |
| void | removeObjectsFromBothSidesOfRelationshipWithKey (NSArray objects, String key) |
| void | removeObjectsFromPropertyWithKey (NSArray objects, String key) |
| ERXEnterpriseObject | self () |
| void | setBatchFaultingTimestamp (long timestamp) |
| void | setValidatedWhenNested (boolean validatedWhenNested) |
| void | takeStoredValueForKey (Object value, String key) |
| void | takeValueForKey (Object value, String key) |
| final< T > void | takeValueForKey (Object value, ERXKey< T > key) |
| String | toLongString () |
| String | toString () |
| void | touchFromBatchFaultingSource (AutoBatchFaultingEnterpriseObject toucher, String key) |
| void | trimSpaces () |
| void | updateFromSnapshot (NSDictionary snapshot) |
| void | validateForInsert () throws NSValidation.ValidationException |
| void | validateForSave () throws NSValidation.ValidationException |
| void | validateForUpdate () throws NSValidation.ValidationException |
| Object | validateValueForKey (Object value, String key) throws NSValidation.ValidationException |
| final< T > T | valueForKey (ERXKey< T > key) |
| void | willDelete () throws NSValidation.ValidationException |
| void | willInsert () |
| Object | willReadRelationship (Object aObject) |
| void | willRevert () |
| void | willUpdate () |
Static Public Member Functions | |
| static void | checkMatchingEditingContexts (EOEnterpriseObject source, String relationshipName, EOEnterpriseObject destination) |
| static boolean | localizationShouldFallbackToDefaultLanguage () |
| static boolean | shouldTrimSpaces () |
Public Attributes | |
| EOGlobalID | _touchSource |
Protected Member Functions | |
| boolean | _updateInverseRelationships () |
| Object | _validateValueForKey (Object value, String key) throws NSValidation.ValidationException |
| boolean | applyRestrictingQualifierOnInsert () |
| void | init (EOEditingContext ec) |
Protected Attributes | |
| String | _primaryKey = null |
| String | insertionStackTrace = null |
Private Member Functions | |
| boolean | _checkEditingContextDelegate (EOEditingContext editingContext) |
| String | localizedKey (String key) |
Private Attributes | |
| long | _fetchTime |
| EOKeyGlobalID | _permanentGlobalID |
| NSDictionary | _primaryKeyDictionary |
| String | _touchKey |
| boolean | _updateInverseRelationships = ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships |
| boolean | _validatedWhenNested = true |
Static Private Attributes | |
| static final NSMutableDictionary< Class, Logger > | classLogs = new NSMutableDictionary<Class, Logger>() |
willUpdate and didDelete and a bunch of handy utility methods like committedSnapshotValueForKey . eo.setFoo(other), eo.takeValueForKey(other), eo.addObjectToBothSidesOfRelationshipWithKey(other, "foo") or eo.addToFoos(other) and the inverse relationship will get updated for you automagically, so that you don't need to call other.addToBars(eo) or other.setBar(eo). Doing so doesn't hurt, though. Giving a null value of removing the object from a to-many will result in the inverse relationship getting cleared. er.extensions.ERXEnterpriseObject.updateInverseRelationships=true. | ERXGenericRecord | ( | EOClassDescription | classDescription | ) |
| ERXGenericRecord | ( | ) |
| boolean _checkEditingContextDelegate | ( | EOEditingContext | editingContext | ) | [private] |
By default, and this should change in the future, all editing contexts that are created and use ERXEnterpriseObjects or subclasses need to have a delegate set of instance ERXEditingContextDelegate. These delegates provide the augmentation to the regular transaction mechanism, all of the will* methods plus the flushCaching method. To change the default behaviour set the property: er.extensions.ERXRaiseOnMissingEditingContextDelegate to false in your WebObjects.properties file. This method is called when an object is fetched, updated or inserted.
| editingContext | to check for the correct delegate. |
| NSKeyValueCoding._KeyBinding _otherStorageBinding | ( | String | key | ) |
| void _setPrimaryKeyDictionary | ( | NSDictionary< String, Object > | pkDict | ) |
Sets the primary key dictionary for this EO (key = attribute name, value = pk value). This should only be called on uncommitted objects.
| pkDict | the new primary key dictionary |
| boolean _setUpdateInverseRelationships | ( | boolean | newValue | ) | [virtual] |
Toggles whether or not inverse relationships should be updates. This is called by ERXGenericRecord.InverseRelationshipUpdater to prevent infinite loops and should not be called by anything else unless you know exactly what you are doing.
| newValue | whether or not inverse relationships should be updated |
Implements ERXEnterpriseObject.
| void _setValueForPrimaryKey | ( | Object | value, | |
| String | pkAttributeName | |||
| ) |
Sets the value for the primary key attribute with the given name. This should only be called on uncommitted objects.
| value | the pk value | |
| pkAttributeName | the pk attribute name |
| boolean _updateInverseRelationships | ( | ) | [protected] |
| Object _validateValueForKey | ( | Object | value, | |
| String | key | |||
| ) | throws NSValidation.ValidationException [protected] |
Reimplemented in ERXPartialGenericRecord.
| void addObjectsToBothSidesOfRelationshipWithKey | ( | NSArray | objects, | |
| String | key | |||
| ) | [virtual] |
Adds a collection of objects to a given relationship by calling addObjectToBothSidesOfRelationshipWithKey for all objects in the collection.
| objects | objects to add to both sides of the given relationship | |
| key | relationship key |
Implements ERXEnterpriseObject.
| void addObjectToBothSidesOfRelationshipWithKey | ( | EORelationshipManipulation | eo, | |
| String | key | |||
| ) |
Adds a check to make sure that both the object being added and this object are in the same editing context. If not then a runtime exception is thrown instead of getting the somewhat cryptic NSInternalInconsistency excpetion that is thrown when you attempt to save changes to the database.
| eo | enterprise object to be added to the relationship | |
| key | relationship to add the object to. |
| boolean applyRestrictingQualifierOnInsert | ( | ) | [protected] |
| void awakeFromClientUpdate | ( | EOEditingContext | editingContext | ) |
Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.
| editingContext | to be checked to make sure it has the correct type of delegate set. |
| void awakeFromFetch | ( | EOEditingContext | editingContext | ) |
Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.
| editingContext | to be checked to make sure it has the correct type of delegate set. |
Reimplemented in ERXPartialGenericRecord.
| void awakeFromInsertion | ( | EOEditingContext | editingContext | ) |
Checks the editing context delegate before calling super's implementation. See the method _checkEditingContextDelegate for an explanation as to what this check does.
| editingContext | to be checked to make sure it has the correct type of delegate set. |
Reimplemented in ERDatabaseAttachment, ERFileAttachment, ERS3Attachment, MovieRole, Studio, and ERXPartialGenericRecord.
| void batchCheckConsistency | ( | ) | throws NSValidation.ValidationException [virtual] |
This method is very similar to the checkConsistency method except that this method is only called from an outside process, usually a batch process, to verify that the data this object holds is consistent. JUnit tests are great for testing that all of the methods of a single object function correctly, batch checking of consistency is a good way of checking that all of the data in a given database is consistent. Hopefully in the future we will add a batch check consistency application to demonstrate the use of this method.
| NSValidation.ValidationException | if the object fails consistency |
Implements ERXEnterpriseObject.
| String batchFaultingRelationshipName | ( | ) |
The key that touched us
Implements ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject.
| EOGlobalID batchFaultingSourceGlobalID | ( | ) |
The source EO that touched us
Implements ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject.
| long batchFaultingTimeStamp | ( | ) |
The fetch time for this object
Implements ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject.
| boolean canDelete | ( | ) |
Implementation of ERXGuardedObjectInterface. This is checked before the object is deleted in the willDelete method which is in turn called by ERXEditingContextDelegate. The default implementation returns true.
Implements ERXGuardedObjectInterface.
| boolean canUpdate | ( | ) |
Implementation of ERXGuardedObjectInterface. This is checked before the object is deleted in the willUpdate method which is in turn called by ERXEditingContextDelegate. The default implementation returns true.
Implements ERXGuardedObjectInterface.
| NSDictionary changesFromCommittedSnapshot | ( | ) | [virtual] |
Computes the current set of changes that this object has from the currently committed snapshot.
Implements ERXEnterpriseObject.
| void checkConsistency | ( | ) | throws NSValidation.ValidationException [virtual] |
Debugging method that will be called on an object before it is saved to the database if the property key: ERDebuggingEnabled is enabled. This allows for adding in a bunch of expensive validation checks that should only be enabled in development and testing environments.
| NSValidation.ValidationException | if the object is not consistent |
Implements ERXEnterpriseObject.
| static void checkMatchingEditingContexts | ( | EOEnterpriseObject | source, | |
| String | relationshipName, | |||
| EOEnterpriseObject | destination | |||
| ) | [static] |
Checks that the editing contexts in source and destination matches and throws an exception if they do not.
| source | the source object | |
| relationshipName | the name of the relationship that is being updated | |
| destination | the destination object |
| RuntimeException | if the editing contexts do not match |
| void clearProperties | ( | ) |
| NSDictionary committedSnapshot | ( | ) |
This method exists because EOEditingContext.committedSnapshotForObject() gives unexpected results for newly inserted objects if EOEditingContext.processRecentChanges() has been called. This method always returns a dictionary whose values are all NSKeyValueCoding.NullValue in the case of a newly inserted object.
| Object committedSnapshotValueForKey | ( | String | key | ) | [virtual] |
Determines what the value of the given key is in the committed snapshot
| key | to be checked in committed snapshot |
Implements ERXEnterpriseObject.
| void delete | ( | ) |
Implementation of ERXGuardedObjectInterface. This is used to work around a bug in EOF that doesn't refresh the relationship in the parent editingContext for the object.
Implements ERXGuardedObjectInterface.
Reimplemented in ERXPartialGenericRecord.
| String description | ( | ) | [virtual] |
Cover method to return toString.
Implements ERXEnterpriseObject.
Reimplemented in _Forum.
| void didCopyFromChildInEditingContext | ( | ERXGenericRecord | originalEO, | |
| EOEditingContext | childEditingContext | |||
| ) |
Called when this EO is saved from a child editing context into a parent editing context.
| originalEO | the original EO in the child editing context | |
| childEditingContext | the child editing context |
| void didDelete | ( | EOEditingContext | ec | ) | [virtual] |
Called on the object after is has been deleted. The editing context is passed to the object since by this point the editingContext of the object is null. You should check if the ec is a child context when doing something here that can't be undone.
| ec | editing context that used to be associated with the object. |
Implements ERXEnterpriseObject.
Reimplemented in ERAttachment, ERXPartialGenericRecord, and ERIFile.
| void didInsert | ( | ) | [virtual] |
Called on the object after is has successfully been inserted into the database.
Implements ERXEnterpriseObject.
Reimplemented in ERAttachment, ERS3Attachment, ERXPartialGenericRecord, and ERIFile.
| void didRevert | ( | EOEditingContext | ec | ) | [virtual] |
Called on the object after it has been reverted. The editing context is passed to the object because if the object was in the insertedObjects list before the revert, the object has had its editingContext nulled.
Default implementation calls flushCaches.
| ec | editing context that is either currently associated with the object if the object was marked as changed or deleted before the revert, otherwise the editing context that was associated with the object before the revert. |
Implements ERXEnterpriseObject.
Reimplemented in ERXPartialGenericRecord.
| void didUpdate | ( | ) | [virtual] |
Called on the object after is has successfully been updated in the database.
Implements ERXEnterpriseObject.
Reimplemented in Bug, ERXPartialGenericRecord, and ERIFile.
| String encryptedPrimaryKey | ( | ) | [virtual] |
Takes the primary key of the object and encrypts it with the blowfish cipher using ERXCrypto.
Implements ERXEnterpriseObject.
| EOEntity entity | ( | ) |
Returns the entity for the current object. Defers to ERXEOAccessUtilities.entityNamed() for the actual work.
| void excludeObjectFromPropertyWithKey | ( | Object | o, | |
| String | key | |||
| ) |
Overridden to support two-way relationship setting.
| void flushCaches | ( | ) | [virtual] |
This is called when an object has had changes merged into it by the editing context. This is called by ERXDefaultEditingContextDelegate after it merges changes. Any caches that an object keeps based on any of it's values it should flush. The default implementation of this method does nothing.
Implements ERXEnterpriseObject.
| Object foreignKeyForRelationshipWithKey | ( | String | rel | ) | [virtual] |
Returns the foreign key for a given relationship.
| rel | relationship key |
Implements ERXEnterpriseObject.
| Logger getClassLog | ( | ) | [virtual] |
This methods checks if we already have created an Logger for this class If not, one will be created, stored and returned on next request. This method eliminates individual static variables for Logger's in all subclasses. We use an NSDictionary here because static fields are class specific and thus something like lazy initialization would not work in this case.
Implements ERXEnterpriseObject.
| boolean hasKeyChangedFromCommittedSnapshot | ( | String | key | ) |
Returns whether or not the given key has changed when compared to the committed snapshot.
| key | The key that you wish to check has changed from the committed snapshot |
| boolean hasKeyChangedFromCommittedSnapshotFromValue | ( | String | key, | |
| Object | oldValue | |||
| ) |
Returns whether or not the given key has changed from the given committed value.
| key | The key that you wish to check has changed from the committed snapshot | |
| oldValue | The value you wish to see if the key has changed from EG. Has 'status' changed from STATUS.PENDING_STATUS |
| boolean hasKeyChangedFromCommittedSnapshotFromValueToNewValue | ( | String | key, | |
| Object | oldValue, | |||
| Object | newValue | |||
| ) |
Returns whether or not the given key has changed from the given previous value to the new value since the committed value.
| key | The key that you wish to check has changed from the committed snapshot | |
| oldValue | The value you wish to see if the key has changed from | |
| newValue | The value you wish to see if the key has changed to EG. Has 'status' changed from STATUS.PENDING_STATUS to STATUS.CONFIRMED_STATUS |
| boolean hasKeyChangedFromCommittedSnapshotToValue | ( | String | key, | |
| Object | newValue | |||
| ) |
Returns whether or not the given key has changed to the new value since the committed value.
| key | The key that you wish to check has changed from the committed snapshot | |
| newValue | The value you wish to see if the key has changed to EG. Has 'status' changed to STATUS.CANCELLED_STATUS |
| void includeObjectIntoPropertyWithKey | ( | Object | o, | |
| String | key | |||
| ) |
Overridden to support two-way relationship setting.
| void init | ( | EOEditingContext | ec | ) | [protected] |
used for initialization stuff instead of awakeFromInsertion. awakeFromInsertions is buggy because if an EO is deleted and then its EOEditingContext is reverted using 'revert' for example then EOF will -insert- this EO again in its EOEditingContext which in turn calls awakeFromInsertion again.
| ec | the EOEditingContext in which this new EO is inserted |
Reimplemented in Asset, AssetGroup, Tag, Bug, Comment, Difficulty, Framework, People, Priority, Release, Requirement, RequirementSubType, RequirementType, TestItem, TestItemState, ERCAuditBlob, ERCAuditTrail, ERCAuditTrailEntry, ERCHelpText, ERCLogEntry, ERCMailMessage, ERCMailMessageArchive, ERCMessageAttachment, ERCPreference, ERCStampedEnterpriseObject, ERIAttribute, ERIAttributeGroup, ERIAttributeType, ERIValidationRule, ERIDirectory, ERIFile, and ERIFileContent.
| boolean isDeletedEO | ( | ) | [virtual] |
Determines if this object is a deleted object by checking to see if it is included in the deletedObjects array of the editing context or - if it's editing context is null - it already has a global id.
Implements ERXEnterpriseObject.
| boolean isNewEO | ( | ) |
| boolean isNewObject | ( | ) | [virtual] |
Determines if this object is a new object and hasn't been saved to the database yet. This method just calls the method ERExtensions.isNewObject passing in this object as the current parameter. Note that an object that has been successfully deleted will also look as if it is a new object because it will have a null editing context.
Implements ERXEnterpriseObject.
| final Boolean isNonNull | ( | ) |
Implements ERXNonNullObjectInterface.
| boolean isUpdatedObject | ( | ) |
Returns true if this EO has been modified in this editing context. In EOF terms, this means that the EO's snapshot in this EC is not .equals the original database snapshot for the EO.
| boolean isValidatedWhenNested | ( | ) |
Returns whether or not this object is validated when it is committed in a nested editing context.
Returns all available ERXLanguages for the given key
| key |
| EOEnterpriseObject localInstanceIn | ( | EOEditingContext | ec | ) | [virtual] |
Returns this EO in the supplied editing context.
Implements ERXEnterpriseObject.
Reimplemented in _Company, _Employee, _Company, _Employee, _Animal, _Company, _Person, _Forum, _Post, _Topic, _User, _ServerForum, _ServerPost, _ServerTopic, _ServerUser, _ERAttachment, _ERAttachmentData, _ERDatabaseAttachment, _ERFileAttachment, _ERS3Attachment, _Movie, _MovieRole, _PlotSummary, _Review, _Talent, _TalentPhoto, _Voting, _Studio, _ERTag, _Company, _Employee, _Paycheck, and _Role.
| EOEnterpriseObject localInstanceOf | ( | EOEnterpriseObject | eo | ) | [virtual] |
Returns an EO in the same editing context as the caller.
Implements ERXEnterpriseObject.
| NSArray localInstancesOf | ( | NSArray | eos | ) | [virtual] |
Returns an array of EOs in the same editing context as the caller.
Implements ERXEnterpriseObject.
| static boolean localizationShouldFallbackToDefaultLanguage | ( | ) | [static] |
| void mightDelete | ( | ) | [virtual] |
Called as part of the augmented transaction process. This method is called when deleteObject() is called on the editing context. The benefit over willDelete() is that in this method, the relationships are still intact. Mostly, at least, as it's also called when the deletes cascade.
Implements ERXEnterpriseObject.
Reimplemented in ERXPartialGenericRecord.
| boolean parentObjectStoreIsObjectStoreCoordinator | ( | ) | [virtual] |
Simple method that will return if the parent object store of this object's editing context is an instance of EOObjectStoreCoordinator. The reason this is important is because if this condition evaluates to true then when changes are saved in this editing context they will be propagated to the database.
Implements ERXEnterpriseObject.
| EOKeyGlobalID permanentGlobalID | ( | ) |
Calls permanentGlobalID(boolean) passing true for generateIfMissing.
| EOKeyGlobalID permanentGlobalID | ( | boolean | generateIfMissing | ) |
This method allows you to compute what the permanent EOGlobalID will be for an object before it has been saved to the database. It functions by calling into primaryKeyDictionary() to allocate the primary key if necessary. Then we build an EOKeyGlobalID from it. If the object already has a permanent global ID, we use that.
If you pass false for generateIfMissing and this object has a temporary global ID, null will be returned.
| String primaryKey | ( | ) | [virtual] |
Primary key of the object as a String.
Implements ERXEnterpriseObject.
| NSArray<String> primaryKeyAttributeNames | ( | ) | [virtual] |
Returns the names of all primary key attributes.
Implements ERXEnterpriseObject.
| NSDictionary<String, Object> primaryKeyDictionary | ( | boolean | inTransaction | ) |
Implementation of the interface ERXGeneratesPrimaryKeyInterface. This implementation operates in the following fashion. If it is called passing in 'false' and it has not yet been saved to the database, meaning this object does not yet have a primary key assigned, then it will have the adaptor channel generate a primary key for it. Then when the object is saved to the database it will use the previously generated primary key instead of having the adaptor channel generate another primary key. If 'true' is passed in then this method will either return the previously generated primaryKey dictionary or null if it does not have one. Typically you should only call this method with the 'false' parameter seeing as unless you are doing something really funky you won't be dealing with this object when it is in the middle of a transaction. The delegate ERXDatabaseContextDelegate is the only class that should be calling this method and passing in 'true'.
| inTransaction | boolean flag to tell the object if it is currently in the middle of a transaction. |
Implements ERXGeneratesPrimaryKeyInterface.
| String primaryKeyInTransaction | ( | ) | [virtual] |
Calling this method will return the primary key of the given enterprise object or if one has not been assigned to it yet, then it will have the adaptor channel generate one for it, cache it and then use that primary key when it is saved to the database. This method returns the string representation of the primary key. If you just want the primary key of the object or null if it doesn't have one yet, use the method primaryKey.
Implements ERXEnterpriseObject.
| Object rawPrimaryKey | ( | ) | [virtual] |
Gives the raw primary key of the object. This could be anything from an NSData to a BigDecimal.
Implements ERXEnterpriseObject.
| Object rawPrimaryKeyInTransaction | ( | ) | [virtual] |
Calling this method will return the primary key of the given enterprise object or if one has not been assigned to it yet, then it will have the adaptor channel generate one for it, cache it and then use that primary key when it is saved to the database. If you just want the primary key of the object or null if it doesn't have one yet, use the method rawPrimaryKey.
Implements ERXEnterpriseObject.
| ERXEnterpriseObject refetchObjectFromDB | ( | ) |
Calls the method refetchObjectFromDBinEditingContext(EOEditingContext ec) and passes the object's Editing Context as Editing Context parameter.
| ERXEnterpriseObject refetchObjectFromDBinEditingContext | ( | EOEditingContext | ec | ) | [virtual] |
Method that will make sure to fetch an eo from the Database and place it in the editingContext provided as an argument
| ec | the editing context in which the result will be placed |
Implements ERXEnterpriseObject.
| void removeObjectsFromBothSidesOfRelationshipWithKey | ( | NSArray | objects, | |
| String | key | |||
| ) | [virtual] |
Removes a collection of objects to a given relationship by calling removeObjectFromBothSidesOfRelationshipWithKey for all objects in the collection.
| objects | objects to be removed from both sides of the given relationship | |
| key | relationship key |
Implements ERXEnterpriseObject.
| void removeObjectsFromPropertyWithKey | ( | NSArray | objects, | |
| String | key | |||
| ) | [virtual] |
Removes a collection of objects to a given relationship by calling removeObjectFromPropertyWithKey for all objects in the collection.
| objects | objects to be removed from both sides of the given relationship | |
| key | relationship key |
Implements ERXEnterpriseObject.
| ERXEnterpriseObject self | ( | ) | [virtual] |
self is usefull for directtoweb purposes
Implements ERXEnterpriseObject.
| void setBatchFaultingTimestamp | ( | long | timestamp | ) |
Touches this EO from a fetch. Note that this is the last fetch, not when the object has been initialized.
| timestamp |
Implements ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject.
| void setValidatedWhenNested | ( | boolean | validatedWhenNested | ) |
If false, when this object is committed into a nested editingContext and it exists in the parent editing context, validation will be skipped. This supports nested UI workflows where you want to create a new to-one relationship for an object that isn't fully configured by localInstancing it into a nested editing context. In that scenario, the localInstance'd EO would attempt to validate when the nested editing context is committed, throwing a validation exception that should be deferred to the parent editing context. This defaults to true, which maintains the current behavior.
| validatedWhenNested |
| static boolean shouldTrimSpaces | ( | ) | [static] |
| void takeStoredValueForKey | ( | Object | value, | |
| String | key | |||
| ) |
| void takeValueForKey | ( | Object | value, | |
| String | key | |||
| ) |
Overridden to support two-way relationship setting.
| final<T> void takeValueForKey | ( | Object | value, | |
| ERXKey< T > | key | |||
| ) |
Type-safe KVC setter (final for now)
| <T> | ||
| value | ||
| key |
| String toLongString | ( | ) | [virtual] |
Returns the super classes implementation of toString which prints out the current key-value pairs for all of the attributes and relationships for the current object. Very verbose.
toString. Implements ERXEnterpriseObject.
Reimplemented in ERCMailMessage.
| String toString | ( | ) |
Overrides the EOGenericRecord's implementation to provide a slightly less verbose output. A typical output for an object mapped to the class com.foo.User with a primary key of 50 would look like: <com.foo.User pk:"50"> EOGenericRecord's implementation is preserved in the method toLongString. To restore the original verbose logging in your subclasses override this method and return toLongString.
Reimplemented in Record, ERCMailMessage, and ERCStatic.
| void touchFromBatchFaultingSource | ( | AutoBatchFaultingEnterpriseObject | toucher, | |
| String | key | |||
| ) |
Touches this EO with the given source and the given key. Stores GID and timestamp.
| toucher | ||
| key |
Implements ERXDatabaseContextDelegate.AutoBatchFaultingEnterpriseObject.
| void trimSpaces | ( | ) | [virtual] |
This method will trim the leading and trailing white space from any attributes that are mapped to a String object. This method is called before the object is saved to the database. Override this method to do nothing if you wish to preserve your leading and trailing white space.
Implements ERXEnterpriseObject.
| void updateFromSnapshot | ( | NSDictionary | snapshot | ) |
This method explicitly turns off inverse relationship updating, because it's only called during undo and revert inside of EOF. If you are calling this method, it's presumed that you understand the consequences of your actions :)
| void validateForInsert | ( | ) | throws NSValidation.ValidationException |
Calls up validateForInsert() on the class description if it supports it.
| NSValidation.ValidationException | if the object does not pass validation for saving to the database. |
Reimplemented in Bug, and ERXPartialGenericRecord.
| void validateForSave | ( | ) | throws NSValidation.ValidationException |
This method performs a few checks before invoking super's implementation. If the property key: ERDebuggingEnabled is set to true then the method checkConsistency will be called on this object.
| NSValidation.ValidationException | if the object does not pass validation for saving to the database. |
Reimplemented in ERCMailMessage, and ERXPartialGenericRecord.
| void validateForUpdate | ( | ) | throws NSValidation.ValidationException |
Calls up validateForUpdate() on the class description if it supports it.
| NSValidation.ValidationException | if the object does not pass validation for saving to the database. |
Reimplemented in Bug, and ERXPartialGenericRecord.
| Object validateValueForKey | ( | Object | value, | |
| String | key | |||
| ) | throws NSValidation.ValidationException |
Overrides the default validation mechanisms to provide a few checks before invoking super's implementation, which incidently just invokes validateValueForKey on the object's class description. The class description for this object should be an ERXEntityClassDescription or subclass. It is that class that provides the hooks to convert model throw validation exceptions into ERXValidationException objects.
| value | to be validated for a given attribute or relationship | |
| key | corresponding to an attribute or relationship |
| NSValidation.ValidationException | if the value fails validation |
| final<T> T valueForKey | ( | ERXKey< T > | key | ) |
Type-safe KVC getter (final for now)
| <T> | ||
| key |
| void willDelete | ( | ) | throws NSValidation.ValidationException [virtual] |
Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually deleted from the database. This method is also called before validateForDelete is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.
| NSValidation.ValidationException | to stop the object from being deleted. |
Implements ERXEnterpriseObject.
Reimplemented in ERCStampedEnterpriseObject, ERTag, and ERXPartialGenericRecord.
| void willInsert | ( | ) | [virtual] |
Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually inserted into the database. This method is also called before validateForInsert is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.
Implements ERXEnterpriseObject.
Reimplemented in ERCStampedEnterpriseObject, and ERXPartialGenericRecord.
| Object willReadRelationship | ( | Object | aObject | ) |
| void willRevert | ( | ) | [virtual] |
Called on the object before it will be reverted.
Default implementation does nothing other than log.
Implements ERXEnterpriseObject.
Reimplemented in ERXPartialGenericRecord.
| void willUpdate | ( | ) | [virtual] |
Called as part of the augmented transaction process. This method is called after saveChanges is called on the editing context, but before the object is actually updated in the database. This method is also called before validateForSave is called on this object. This method is called by the editing context delegate ERXDefaultEditingContextDelegate.
Implements ERXEnterpriseObject.
Reimplemented in ERCStampedEnterpriseObject, and ERXPartialGenericRecord.
long _fetchTime [private] |
Last fetch time
EOKeyGlobalID _permanentGlobalID [private] |
String _primaryKey = null [protected] |
NSDictionary _primaryKeyDictionary [private] |
caches the primary key dictionary for the given object
| EOGlobalID _touchSource |
Which GID touched us
boolean _updateInverseRelationships = ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships [private] |
boolean _validatedWhenNested = true [private] |
final NSMutableDictionary<Class, Logger> classLogs = new NSMutableDictionary<Class, Logger>() [static, private] |
holds all subclass related Logger's
String insertionStackTrace = null [protected] |
1.5.8