public class ERXUtilities
extends java.lang.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. |
| Modifier and Type | Field and Description |
|---|---|
static NSTimestamp |
DISTANT_FUTURE
Deprecated.
|
static NSTimestamp |
DISTANT_PAST
Deprecated.
|
static org.apache.log4j.Logger |
log
logging support
|
| Constructor and Description |
|---|
ERXUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addObjectToObjectOnBothSidesOfRelationshipWithKey(EOEnterpriseObject addedObject,
EOEnterpriseObject referenceObject,
java.lang.String key)
|
static NSArray |
allFrameworkNames()
Utility method to get all of the framework names that
have been loaded into the application.
|
static NSArray |
allSubEntitiesForEntity(EOEntity entity,
boolean includeAbstracts)
Deprecated.
|
static EOEntity |
caseInsensitiveEntityNamed(java.lang.String entityName)
Finds an entity given a case insensitive search
of all the entity names.
|
static EOEnterpriseObject |
createEO(java.lang.String entityName,
EOEditingContext editingContext)
|
static EOEnterpriseObject |
createEO(java.lang.String entityName,
EOEditingContext editingContext,
NSDictionary objectInfo)
|
static EOEnterpriseObject |
createEOLinkedToEO(java.lang.String entityName,
EOEditingContext editingContext,
java.lang.String relationshipName,
EOEnterpriseObject eo)
|
static EOEnterpriseObject |
createEOLinkedToEO(java.lang.String entityName,
EOEditingContext editingContext,
java.lang.String relationshipName,
EOEnterpriseObject eo,
NSDictionary objectInfo)
|
static EOArrayDataSource |
dataSourceForArray(NSArray array)
Deprecated.
|
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,
java.lang.String relationshipName)
Copies a relationship from one EO to another using the name of the relationship
|
static NSTimestamp |
distantFuture()
Deprecated.
|
static NSTimestamp |
distantPast()
Deprecated.
|
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 java.lang.String |
escapeApostrophe(java.lang.String aString)
Gets rid of all ' from a String.
|
static NSTimestampFormatter |
gregorianDateFormatterForJavaDate()
Deprecated.
use
ERXTimestampUtilities#gregorianDateFormatterForJavaDate() instead |
static NSArray |
intersectingElements(NSArray array1,
NSArray array2)
Deprecated.
Replaced by
ERXArrayUtilities#intersectingElements(NSArray, NSArray)
Performs a basic intersection between two arrays. |
static EOEnterpriseObject |
localInstanceOfObject(EOEditingContext ec,
EOEnterpriseObject eo)
|
static NSArray |
localInstancesOfObjects(EOEditingContext ec,
NSArray eos)
|
static void |
makeEditableSharedEntityNamed(java.lang.String entityName)
Deprecated.
|
static NSDictionary |
primaryKeyDictionaryForEntity(EOEditingContext ec,
java.lang.String entityName)
|
static NSDictionary |
relationshipEntityWithEntityAndKeyPath(EOEntity srcentity,
java.lang.String keyPath) |
static EOEnterpriseObject |
relationshipObjectWithObjectAndKeyPath(EOEnterpriseObject object,
java.lang.String keyPath) |
static EORelationship |
relationshipWithObjectAndKeyPath(EOEnterpriseObject object,
java.lang.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,
java.lang.String relationshipName)
Copies a relationship from one EO to another using the name of the relationship
|
static EOEntity |
rootParentEntityForEntity(EOEntity entity)
Deprecated.
|
static NSSet |
setFromArray(NSArray array)
Deprecated.
use
ERXArrayUtilities#setFromArray(NSArray) |
static EOEnterpriseObject |
sharedObjectWithFetchSpec(java.lang.String fetchSpec,
java.lang.String entityName)
Deprecated.
|
static EOEnterpriseObject |
sharedObjectWithPrimaryKey(java.lang.Object pk,
java.lang.String entityName)
Deprecated.
|
static NSSelector |
sortSelectorWithKey(java.lang.String key)
Deprecated.
use
ERXArrayUtilities#sortSelectorWithKey(String) |
static java.lang.String |
stackTrace()
Generates a string representation of the current stacktrace.
|
static java.lang.String |
stackTrace(java.lang.Throwable t)
Converts a throwable's stacktrace into a
string representation.
|
public static final org.apache.log4j.Logger log
@Deprecated public static final NSTimestamp DISTANT_FUTURE
NSTimestamp.DistantFuture@Deprecated public static final NSTimestamp DISTANT_PAST
NSTimestamp.DistantPast@Deprecated public static void addObjectToObjectOnBothSidesOfRelationshipWithKey(EOEnterpriseObject addedObject, EOEnterpriseObject referenceObject, java.lang.String key)
@Deprecated public static EOEnterpriseObject createEO(java.lang.String entityName, EOEditingContext editingContext)
@Deprecated public static EOEnterpriseObject createEO(java.lang.String entityName, EOEditingContext editingContext, NSDictionary objectInfo)
@Deprecated public static EOEnterpriseObject createEOLinkedToEO(java.lang.String entityName, EOEditingContext editingContext, java.lang.String relationshipName, EOEnterpriseObject eo)
@Deprecated public static EOEnterpriseObject createEOLinkedToEO(java.lang.String entityName, EOEditingContext editingContext, java.lang.String relationshipName, EOEnterpriseObject eo, NSDictionary objectInfo)
@Deprecated public static EOEnterpriseObject localInstanceOfObject(EOEditingContext ec, EOEnterpriseObject eo)
@Deprecated public static NSArray localInstancesOfObjects(EOEditingContext ec, NSArray eos)
@Deprecated public static EOEnterpriseObject sharedObjectWithFetchSpec(java.lang.String fetchSpec, java.lang.String entityName)
ERXEOControlUtilities.sharedObjectWithFetchSpec(String, String)@Deprecated public static EOEnterpriseObject sharedObjectWithPrimaryKey(java.lang.Object pk, java.lang.String entityName)
ERXEOControlUtilities.sharedObjectWithPrimaryKey(String, Object)@Deprecated public static NSDictionary primaryKeyDictionaryForEntity(EOEditingContext ec, java.lang.String entityName)
public static NSArray deletedObjectsPKeys(EOEditingContext ec)
ec - editing context@Deprecated public static void makeEditableSharedEntityNamed(java.lang.String entityName)
ERXEOAccessUtilities.makeEditableSharedEntityNamed(String)@Deprecated public static EOArrayDataSource dataSourceForArray(NSArray array)
ERXEOControlUtilities.dataSourceForArray(NSArray)public static EORelationship relationshipWithObjectAndKeyPath(EOEnterpriseObject object, java.lang.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, java.lang.String keyPath)
public static EOEnterpriseObject relationshipObjectWithObjectAndKeyPath(EOEnterpriseObject object, java.lang.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()
@Deprecated public static NSArray intersectingElements(NSArray array1, NSArray array2)
ERXArrayUtilities#intersectingElements(NSArray, NSArray)
Performs a basic intersection between two arrays.array1 - first arrayarray2 - second arraypublic static NSArray entitiesForModelGroup(EOModelGroup group)
group - eo model grouppublic static EOEntity caseInsensitiveEntityNamed(java.lang.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.
@Deprecated public static NSArray allSubEntitiesForEntity(EOEntity entity, boolean includeAbstracts)
ERXEOAccessUtilities.allSubEntitiesForEntity(EOEntity, boolean) insteadentity - to walk all of the subEntities
relationshipsincludeAbstracts - determines if abstract entities should
be included in the returned array@Deprecated public static EOEntity rootParentEntityForEntity(EOEntity entity)
ERXEOAccessUtilities.rootEntityForEntity(EOEntity) insteadentity - to find the root parent@Deprecated public static NSTimestampFormatter gregorianDateFormatterForJavaDate()
ERXTimestampUtilities#gregorianDateFormatterForJavaDate() insteadpublic static java.lang.String stackTrace()
public static java.lang.String stackTrace(java.lang.Throwable t)
t - throwable to print to a string@Deprecated public static NSTimestamp distantFuture()
NSTimestamp.DistantFuture@Deprecated public static NSTimestamp distantPast()
NSTimestamp.DistantPastpublic static java.lang.String escapeApostrophe(java.lang.String aString)
aString - string to check@Deprecated public static NSSet setFromArray(NSArray array)
ERXArrayUtilities#setFromArray(NSArray)@Deprecated public static NSSelector sortSelectorWithKey(java.lang.String key)
ERXArrayUtilities#sortSelectorWithKey(String)public static void replicateDataFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, NSArray attributeNames)
public static void replicateRelationshipFromEOToEO(EOEnterpriseObject r1, EOEnterpriseObject r2, java.lang.String relationshipName)
public static void deplicateRelationshipFromEO(EOEnterpriseObject r1, java.lang.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 – 2022 Project Wonder.