|
WebObjects 5.2.3 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.webservices.generation.WOServiceUtilities
Nested Class Summary | |
static interface |
WOServiceUtilities.RuleSystemConstants
Constants for keys used by the rule system to access values in a D2WContext |
Constructor Summary | |
WOServiceUtilities()
|
Method Summary | |
static void |
addDestinationObjectToEOWithKey(WOEnterpriseObjectSerializationStrategy strategy,
Object object,
EOEnterpriseObject eo,
String propertyName)
Performs addObjectToBothSidesOfRelationshipWithKey using eo
as the origin and object as the destination. |
static NSArray |
aggregateValuesResult(NSArray result,
NSArray translatedKeys,
NSArray outputPartNames)
Returns the result with all values associated with an aggregate key
from translatedKeys placed into a WOStringKeyMap. |
static EOQualifier |
buildQualifier(EOEntity entity,
NSArray attributeNames,
NSArray values,
NSArray comparisonKeys,
NSArray attributeClassNames,
String unspecifiedArgumentKey)
Returns an EOQualifier built to fetch objects where for each attribute name in attributeNames a qualifier, based on the corresponding value from
values and comparison key from comparisonKeys , is added
to an EOAndQualifier. |
static EOEditingContext |
editingContextForContext(WOContext context)
Returns an EOEditingContext based on information in context . |
static EOGlobalID |
globalIDFromValues(EOEntity entity,
NSArray attributeKeys,
NSArray inputPartValues)
Returns EOGlobalID of an object with primary key values created from inputPartValues . |
static boolean |
shouldCommitChangesImmediately(WOContext context)
Returns true if the operation should commit changes in its editing context
immediately after completing its work, false if the operation should
leave the changes in its editing context unsaved to the parent object store. |
static Object |
valueForAggregateKey(String key,
NSArray array)
Returns the aggregate value for key key of NSArray array . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WOServiceUtilities()
Method Detail |
public static void addDestinationObjectToEOWithKey(WOEnterpriseObjectSerializationStrategy strategy, Object object, EOEnterpriseObject eo, String propertyName)
eo
as the origin and object
as the destination.
strategy
- the serialization strategy to use while handling the eo
object
- destination object to add to eo using propertyName as a keyeo
- EOEnterpriseObjects to add object
topropertyName
- key to use when adding object
to eo
public static NSArray aggregateValuesResult(NSArray result, NSArray translatedKeys, NSArray outputPartNames)
Returns the result
with all values associated with an aggregate key
from translatedKeys
placed into a WOStringKeyMap. Values are placed into
the WOStringKeyMap with the corresponding key from outputPartNames
.
If there are no aggregate keys defined in the translatedKeys, then the result array
is returned unchanged. Otherwise the array of resultant WOStringKeyMap objects is added
to the result array. The value of arrays of values are computed by the
valueForAggregateKey
method.
result
- array of result valuestranslatedKeys
- array of EO key paths that will be returnedoutputPartNames
- array of SOAP element names for the result values
valueForAggregateKey(java.lang.String, com.webobjects.foundation.NSArray)
public static EOQualifier buildQualifier(EOEntity entity, NSArray attributeNames, NSArray values, NSArray comparisonKeys, NSArray attributeClassNames, String unspecifiedArgumentKey)
attributeNames
a qualifier, based on the corresponding value from
values
and comparison key from comparisonKeys
, is added
to an EOAndQualifier.
entity
- EOEntity the resulting qualifier will be built forattributeNames
- array of key paths to qualifyvalues
- array of values, each corresponding to a key path of attributeNames
comparisonKeys
- array of comparison keys, each corresponding to
a key path of attributeNames
attributeClassNames
- array of class name strings, each corresponding to a
key path of attributeNames
unspecifiedArgumentKey
- key that signifies that the client did not specify a value for an argumentpublic static EOEditingContext editingContextForContext(WOContext context)
context
.
If context
contains has a WOSession, that session's
editing context is returned. Otherwise a new editing context is returned.
context
- the WOContext associated with a WOOperation
public static EOGlobalID globalIDFromValues(EOEntity entity, NSArray attributeKeys, NSArray inputPartValues)
Returns EOGlobalID of an object with primary key values created from
inputPartValues
. The primary key attribute names of entity
are compared with keys of attributeKeys
if they match, the values in
inputPartValues
corresponding to the primary key attribute names of
attributeKeys
are used to generate an EOKeyGlobalID.
Note that attributeKeys
may contain more attribute names than the
primary key attributes for entity
, but should not contain less.
entity
- entity to create a global ID forattributeKeys
- array of EO attribute keys
(generally from WOOperation.inputPartKeyPaths()
)inputPartValues
- array of object values
(generally from WOOperation.inputPartValues()
)
attributeKeys
and inputPartValues
public static boolean shouldCommitChangesImmediately(WOContext context)
Returns true
if the operation should commit changes in its editing context
immediately after completing its work, false
if the operation should
leave the changes in its editing context unsaved to the parent object store.
If the
operation is being invoked as part of a transaction (invoked between a WOBeginTransactionOperation
and a WOCommitTransactionOperation or WORollbackTransactionOperation), then the operation
should not save changes in its editing context so this method returns false. If the operation
associated with context
is not invoked as part of a transaction,
then this method returns false
.
context
- the WOContext of a WOOperation
true
if the operation associated with false
otherwisepublic static Object valueForAggregateKey(String key, NSArray array)
key
of NSArray array
.
key
- aggregate key path to generate a value forarray
- array of objects or other NSArrays of objects to aggregate values of
key
of NSArray array
|
Last updated Thu Oct 21 15:04:16 PDT 2004. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |