|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object er.extensions.ERXUtilities
Diverse collection of utility methods for handling everything from EOF to foundation. In the future this class will most likely be split into more meaning full groups of utility methods.
Nested Class Summary | |
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. |
Field Summary | |
static NSTimestamp |
DISTANT_FUTURE
|
static NSTimestamp |
DISTANT_PAST
|
static ERXLogger |
log
logging support |
Constructor Summary | |
ERXUtilities()
|
Method Summary | |
static void |
addObjectToObjectOnBothSidesOfRelationshipWithKey(EOEnterpriseObject addedObject,
EOEnterpriseObject referenceObject,
String key)
Deprecated. use ERXEOControlUtilities.addObjectToObjectOnBothSidesOfRelationshipWithKey(EOEnterpriseObject,EOEnterpriseObject,String) |
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)
Utility method used to find all of the sub entities for a given entity. |
static NSArray |
arrayFromDataSource(EODataSource dataSource)
Deprecated. see ERXEOControlUtilities.arrayFromDataSource(EODataSource) |
static boolean |
booleanValue(Object obj)
Deprecated. use ERXValueUtilities.booleanValue(Object) |
static boolean |
booleanValueForBindingOnComponentWithDefault(String binding,
WOComponent component,
boolean def)
Deprecated. use ERXValueUtilities.booleanValueForBindingOnComponentWithDefault(String,WOComponent,boolean) instead |
static boolean |
booleanValueWithDefault(Object obj,
boolean def)
Deprecated. use ERXValueUtilities.booleanValueWithDefault(Object,boolean) |
static EOEntity |
caseInsensitiveEntityNamed(String entityName)
Finds an entity given a case insensitive search of all the entity names. |
static EOEnterpriseObject |
createEO(String entityName,
EOEditingContext editingContext)
Deprecated. use ERXEOControlUtilities.createAndInsertObject(EOEditingContext,String) |
static EOEnterpriseObject |
createEO(String entityName,
EOEditingContext editingContext,
NSDictionary objectInfo)
Deprecated. use createAndInsertObject(EOEditingContext,String, NSDictionary) |
static EOEnterpriseObject |
createEOLinkedToEO(String entityName,
EOEditingContext editingContext,
String relationshipName,
EOEnterpriseObject eo)
Deprecated. use ERXEOControlUtilities.createAndAddObjectToRelationship(EOEditingContext,EOEnterpriseObject,String,String,NSDictionary); |
static EOEnterpriseObject |
createEOLinkedToEO(String entityName,
EOEditingContext editingContext,
String relationshipName,
EOEnterpriseObject eo,
NSDictionary objectInfo)
Deprecated. use ERXEOControlUtilities.createAndAddObjectToRelationship(EOEditingContext,EOEnterpriseObject,String,String,NSDictionary); |
static EOArrayDataSource |
dataSourceForArray(NSArray array)
deprecated see ERXEOControlUtilities.dataSourceForArray(NSArray) |
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(ERXGenericRecord r1,
String relationshipName)
Copies a relationship from one EO to another using the name of the relationship |
static NSTimestamp |
distantFuture()
|
static NSTimestamp |
distantPast()
|
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 NSTimestampFormatter |
gregorianDateFormatterForJavaDate()
Utility method to return a standard timestamp formatter for the default string representation of java dates. |
static NSArray |
intersectingElements(NSArray array1,
NSArray array2)
Performs a basic intersection between two arrays. |
static EOEnterpriseObject |
localInstanceOfObject(EOEditingContext ec,
EOEnterpriseObject eo)
Deprecated. use ERXEOControlUtilities.localInstanceOfObject(EOEditingContext,EOEnterpriseObject); |
static NSArray |
localInstancesOfObjects(EOEditingContext ec,
NSArray eos)
Deprecated. use ERXEOControlUtilities.localInstancesOfObjects(EOEditingContext,NSArray); |
static void |
makeEditableSharedEntityNamed(String entityName)
Utility method to make a shared entity editable. |
static NSDictionary |
primaryKeyDictionaryForEntity(EOEditingContext ec,
String entityName)
Deprecated. use ERXEOAccessUtilities.primaryKeyDictionaryForEntity(EOEditingContext, 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(ERXGenericRecord r1,
ERXGenericRecord r2,
NSArray attributeNames)
Copies values from one EO to another using an array of Attributes |
static void |
replicateRelationshipFromEOToEO(ERXGenericRecord r1,
ERXGenericRecord r2,
String relationshipName)
Copies a relationship from one EO to another using the name of the relationship |
static EOEntity |
rootParentEntityForEntity(EOEntity entity)
Walks all of the parentEntity relationships to find the root entity. |
static NSSet |
setFromArray(NSArray array)
Deprecated. use ERXArrayUtilities.setFromArray(NSArray) |
static EOEnterpriseObject |
sharedObjectWithFetchSpec(String fetchSpec,
String entityName)
Deprecated. use ERXEOControlUtilities.sharedObjectWithFetchSpec(String, String) |
static EOEnterpriseObject |
sharedObjectWithPrimaryKey(Object pk,
String entityName)
Deprecated. use ERXEOControlUtilities.sharedObjectWithPrimaryKey(String, object) |
static void |
sortEOsUsingSingleKey(NSMutableArray eos,
String key)
Deprecated. use ERXArrayUtilities.sortArrayWithKey(NSMutableArray,String) instead |
static void |
sortEOsUsingSingleKey(NSMutableArray eos,
String key,
NSSelector selector)
Deprecated. use ERXArrayUtilities.sortArrayWithKey(NSMutableArray,String,NSSelector) instead |
static NSSelector |
sortSelectorWithKey(String key)
Deprecated. use ERXArrayUtilities.sortSelectorWithKey(String) |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static ERXLogger log
public static final NSTimestamp DISTANT_FUTURE
public static final NSTimestamp DISTANT_PAST
Constructor Detail |
public ERXUtilities()
Method Detail |
public static void addObjectToObjectOnBothSidesOfRelationshipWithKey(EOEnterpriseObject addedObject, EOEnterpriseObject referenceObject, String key)
public static EOEnterpriseObject createEO(String entityName, EOEditingContext editingContext)
public static EOEnterpriseObject createEO(String entityName, EOEditingContext editingContext, NSDictionary objectInfo)
public static EOEnterpriseObject createEOLinkedToEO(String entityName, EOEditingContext editingContext, String relationshipName, EOEnterpriseObject eo)
public static EOEnterpriseObject createEOLinkedToEO(String entityName, EOEditingContext editingContext, String relationshipName, EOEnterpriseObject eo, NSDictionary objectInfo)
public static EOEnterpriseObject localInstanceOfObject(EOEditingContext ec, EOEnterpriseObject eo)
public static NSArray localInstancesOfObjects(EOEditingContext ec, NSArray eos)
public static EOEnterpriseObject sharedObjectWithFetchSpec(String fetchSpec, String entityName)
public static EOEnterpriseObject sharedObjectWithPrimaryKey(Object pk, String entityName)
public static NSDictionary primaryKeyDictionaryForEntity(EOEditingContext ec, String entityName)
public static NSArray deletedObjectsPKeys(EOEditingContext ec)
ec
- editing context
public static void makeEditableSharedEntityNamed(String entityName)
entityName
- name of the shared entity to make
shareable.public static EOArrayDataSource dataSourceForArray(NSArray array)
ERXEOControlUtilities.dataSourceForArray(NSArray)
public static NSArray arrayFromDataSource(EODataSource dataSource)
ERXEOControlUtilities.arrayFromDataSource(EODataSource)
public static void sortEOsUsingSingleKey(NSMutableArray eos, String key)
public static void sortEOsUsingSingleKey(NSMutableArray eos, String key, NSSelector selector)
public static boolean booleanValueForBindingOnComponentWithDefault(String binding, WOComponent component, boolean def)
public static boolean booleanValue(Object obj)
public static boolean booleanValueWithDefault(Object obj, boolean def)
public static EORelationship relationshipWithObjectAndKeyPath(EOEnterpriseObject object, String keyPath)
EORelationship
object.
object
- enterprise object to find the relationship off ofkeyPath
- key path used to find the relationship
public 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 intersectingElements(NSArray array1, NSArray array2)
array1
- first arrayarray2
- second array
public static NSArray entitiesForModelGroup(EOModelGroup group)
group
- eo model group
public static EOEntity caseInsensitiveEntityNamed(String entityName)
public static NSArray allSubEntitiesForEntity(EOEntity entity, boolean includeAbstracts)
entity
- to walk all of the subEntities
relationshipsincludeAbstracts
- determines if abstract entities should
be included in the returned array
public static EOEntity rootParentEntityForEntity(EOEntity entity)
entity
- to find the root parent
public static NSTimestampFormatter gregorianDateFormatterForJavaDate()
public static String stackTrace()
public static String stackTrace(Throwable t)
t
- throwable to print to a string
public static NSTimestamp distantFuture()
public static NSTimestamp distantPast()
public static String escapeApostrophe(String aString)
aString
- string to check
public static NSSet setFromArray(NSArray array)
public static NSSelector sortSelectorWithKey(String key)
public static void replicateDataFromEOToEO(ERXGenericRecord r1, ERXGenericRecord r2, NSArray attributeNames)
public static void replicateRelationshipFromEOToEO(ERXGenericRecord r1, ERXGenericRecord r2, String relationshipName)
public static void deplicateRelationshipFromEO(ERXGenericRecord r1, String relationshipName)
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |