|
Project Wonder 5.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.jabsorb.serializer.AbstractSerializer
er.ajax.json.serializer.EOEnterpriseObjectSerializer
public class EOEnterpriseObjectSerializer
La classe EOEnterpriseObjectSerializer s'occupe de la conversion des objets paramĂȘtres de type
EOEnterpriseObject entre le monde Javascript et le monde Java.
| Properties | |
er.ajax.json.EOEditingContextFactory | er.ajax.json.EOEditingContextFactory |
er.ajax.json.[entityName].canInsert | er.ajax.json.[entityName].canInsert |
er.ajax.json.[currentEntity.name].attributes | er.ajax.json.[currentEntity.name].attributes |
er.ajax.json.[currentEntity.name].writableAttributes | er.ajax.json.[currentEntity.name].writableAttributes |
er.ajax.json.[currentEntity.name]relationships | er.ajax.json.[currentEntity.name]relationships |
| Nested Class Summary | |
|---|---|
static interface |
EOEnterpriseObjectSerializer.EOEditingContextFactory
|
static class |
EOEnterpriseObjectSerializer.ERXECEditingContextFactory
|
static class |
EOEnterpriseObjectSerializer.SadEditingContextFactory
|
| Field Summary | |
|---|---|
protected static NSMutableDictionary<String,NSArray<String>> |
includedRelationshipNames
|
protected static NSMutableDictionary<String,NSArray<String>> |
readableAttributeNames
|
protected static NSMutableDictionary<String,NSArray<String>> |
writableAttributeNames
|
| Fields inherited from class org.jabsorb.serializer.AbstractSerializer |
|---|
ser |
| Constructor Summary | |
|---|---|
EOEnterpriseObjectSerializer()
|
|
| Method Summary | |
|---|---|
protected void |
_addCustomAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
|
protected boolean |
_canInsert(String entityName)
Override to return whether or not a new entity can be inserted. |
protected boolean |
_canSerialize(Class clazz,
Class jsonClazz)
|
protected NSArray<String> |
_includedRelationshipNames(EOEnterpriseObject eo)
Override to return the appropriate relationship names. |
protected NSArray<String> |
_readableAttributeNames(EOEnterpriseObject eo)
Override to return the appropriate attribute names. |
protected NSArray<String> |
_writableAttributeNames(EOEnterpriseObject eo)
Override to return the appropriate attribute names. |
void |
addAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
This copies the attributes from the source EOEnterpriseObject to the destination. |
boolean |
canSerialize(Class clazz,
Class jsonClazz)
|
static Map<EOEditingContext,String> |
contexts()
|
static EOEditingContext |
editingContextForKey(String key)
|
Class[] |
getJSONClasses()
|
Class[] |
getSerializableClasses()
|
static NSArray<String> |
includedRelationshipNames(EOEnterpriseObject source)
Returns an array of relationships on this EO that should be included in its marshalled output as the actual destination objects rather than just faults. |
Object |
marshall(org.jabsorb.serializer.SerializerState state,
Object p,
Object o)
|
static NSArray<String> |
readableAttributeNames(EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled to the client. |
static String |
registerEditingContext(EOEditingContext ec)
|
org.jabsorb.serializer.ObjectMatch |
tryUnmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object jso)
|
Object |
unmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object o)
|
static NSArray<String> |
writableAttributeNames(EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled from the client. |
| Methods inherited from class org.jabsorb.serializer.AbstractSerializer |
|---|
setOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final NSMutableDictionary<String,NSArray<String>> readableAttributeNames
protected static final NSMutableDictionary<String,NSArray<String>> writableAttributeNames
protected static final NSMutableDictionary<String,NSArray<String>> includedRelationshipNames
| Constructor Detail |
|---|
public EOEnterpriseObjectSerializer()
| Method Detail |
|---|
public Class[] getSerializableClasses()
public Class[] getJSONClasses()
protected boolean _canSerialize(Class clazz,
Class jsonClazz)
public boolean canSerialize(Class clazz,
Class jsonClazz)
canSerialize in interface org.jabsorb.serializer.SerializercanSerialize in class org.jabsorb.serializer.AbstractSerializer
public org.jabsorb.serializer.ObjectMatch tryUnmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object jso)
public Object unmarshall(org.jabsorb.serializer.SerializerState state,
Class clazz,
Object o)
throws org.jabsorb.serializer.UnmarshallException
org.jabsorb.serializer.UnmarshallException
public Object marshall(org.jabsorb.serializer.SerializerState state,
Object p,
Object o)
throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallException
public void addAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
throws org.jabsorb.serializer.MarshallException
source - the EOEnterpriseObject to copy attribute values fromdestination - the EOEnterpriseObject to copy attribute values to
org.jabsorb.serializer.MarshallException
protected void _addCustomAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallExceptionprotected boolean _canInsert(String entityName)
entityName - protected NSArray<String> _readableAttributeNames(EOEnterpriseObject eo)
eo - protected NSArray<String> _writableAttributeNames(EOEnterpriseObject eo)
eo - protected NSArray<String> _includedRelationshipNames(EOEnterpriseObject eo)
eo - public static NSArray<String> readableAttributeNames(EOEnterpriseObject source)
source - the EOEnterpriseObject to copy attribute values from
public static NSArray<String> writableAttributeNames(EOEnterpriseObject source)
source - the EOEnterpriseObject
public static NSArray<String> includedRelationshipNames(EOEnterpriseObject source)
source - the EOEnterpriseObject being marhsalled
public static Map<EOEditingContext,String> contexts()
public static String registerEditingContext(EOEditingContext ec)
public static EOEditingContext editingContextForKey(String key)
|
Last updated: Wed, Feb 22, 2012 07:00 AM EST | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||