public class ERXUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ERXUtilities.BooleanCallback
Generic boolean callback interface with a
context object.
|
static interface |
ERXUtilities.BooleanOperation
Useful interface for binding objects to
WOComponent bindings where you want to
delay the evaluation of the boolean operation
until
valueForBinding is
actually called. |
static interface |
ERXUtilities.Callback
Generic callback interface with a context
object.
|
static interface |
ERXUtilities.Operation
Useful interface for binding objects to
WOComponent bindings where you want to
delay the evaluation of the operation
until
valueForBinding is
actually called. |
Constructor and Description |
---|
ERXUtilities() |
Modifier and Type | Method and Description |
---|---|
static NSArray |
allFrameworkNames()
Utility method to get all of the framework names that
have been loaded into the application.
|
static EOEntity |
caseInsensitiveEntityNamed(String entityName)
Finds an entity given a case insensitive search
of all the entity names.
|
static <T> T |
deepClone(T obj,
boolean onlyCollections)
Returns a deep clone of the given object.
|
static NSArray |
deletedObjectsPKeys(EOEditingContext ec)
Utility method for returning all of the primary keys for
all of the objects that are marked for deletion in
the editing context.
|
static void |
deleteObjects(EOEditingContext ec,
NSArray objects)
Simple utility method for deleting an array
of objects from an editing context.
|
static void |
deplicateRelationshipFromEO(EOEnterpriseObject r1,
String relationshipName)
Copies a relationship from one EO to another using the name of the relationship
|
static NSArray |
entitiesForModelGroup(EOModelGroup group)
Simple utility method for getting all of the
entities for all of the models of a given
model group.
|
static String |
escapeApostrophe(String aString)
Gets rid of all ' from a String.
|
static NSDictionary |
relationshipEntityWithEntityAndKeyPath(EOEntity srcentity,
String keyPath) |
static EOEnterpriseObject |
relationshipObjectWithObjectAndKeyPath(EOEnterpriseObject object,
String keyPath) |
static EORelationship |
relationshipWithObjectAndKeyPath(EOEnterpriseObject object,
String keyPath)
Traverses a key path to return the last
EORelationship
object. |
static void |
replicateDataFromEOToEO(EOEnterpriseObject r1,
EOEnterpriseObject r2,
NSArray attributeNames)
Copies values from one EO to another using an array of Attributes
|
static void |
replicateRelationshipFromEOToEO(EOEnterpriseObject r1,
EOEnterpriseObject r2,
String relationshipName)
Copies a relationship from one EO to another using the name of the relationship
|
static String |
stackTrace()
Generates a string representation of the current stacktrace.
|
static String |
stackTrace(Throwable t)
Converts a throwable's stacktrace into a
string representation.
|
public static NSArray deletedObjectsPKeys(EOEditingContext ec)
ec
- editing contextpublic static EORelationship relationshipWithObjectAndKeyPath(EOEnterpriseObject object, String keyPath)
EORelationship
object.
Note: that this method uses the object and not the model to traverse the key path, this has the added benefit of handling EOF inheritance
object
- enterprise object to find the relationship off ofkeyPath
- key path used to find the relationshippublic static NSDictionary relationshipEntityWithEntityAndKeyPath(EOEntity srcentity, String keyPath)
public static EOEnterpriseObject relationshipObjectWithObjectAndKeyPath(EOEnterpriseObject object, String keyPath)
public static void deleteObjects(EOEditingContext ec, NSArray objects)
ec
- editing context to have objects deleted fromobjects
- objects to be deleted.public static NSArray allFrameworkNames()
public static NSArray entitiesForModelGroup(EOModelGroup group)
group
- eo model grouppublic static EOEntity caseInsensitiveEntityNamed(String entityName)
Note: The current implementation caches the entity-entity name pair in an insensitive manner. This means that all of the models should be loaded before this method is called.
public static String stackTrace()
public static String stackTrace(Throwable t)
t
- throwable to print to a stringpublic static String escapeApostrophe(String aString)
aString
- string to checkpublic static void replicateDataFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, NSArray attributeNames)
public static void replicateRelationshipFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, String relationshipName)
public static void deplicateRelationshipFromEO(EOEnterpriseObject r1, String relationshipName)
public static <T> T deepClone(T obj, boolean onlyCollections)
obj
- the object to cloneonlyCollections
- if true, only collections will be cloned, not individual valuesCopyright © 2002 – 2024 Project Wonder.