public class EOEnterpriseObjectSerializer
extends org.jabsorb.serializer.AbstractSerializer
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 |
| Modifier and Type | Class and Description |
|---|---|
static interface |
EOEnterpriseObjectSerializer.EOEditingContextFactory |
static class |
EOEnterpriseObjectSerializer.ERXECEditingContextFactory |
static class |
EOEnterpriseObjectSerializer.SadEditingContextFactory |
| Modifier and Type | Field and Description |
|---|---|
protected static NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> |
includedRelationshipNames |
protected static NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> |
readableAttributeNames |
protected static NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> |
writableAttributeNames |
| Constructor and Description |
|---|
EOEnterpriseObjectSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_addCustomAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination) |
protected boolean |
_canInsert(java.lang.String entityName)
Override to return whether or not a new entity can be inserted.
|
protected boolean |
_canSerialize(java.lang.Class clazz,
java.lang.Class jsonClazz) |
protected NSArray<java.lang.String> |
_includedRelationshipNames(EOEnterpriseObject eo)
Override to return the appropriate relationship names.
|
protected NSArray<java.lang.String> |
_readableAttributeNames(EOEnterpriseObject eo)
Override to return the appropriate attribute names.
|
protected NSArray<java.lang.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(java.lang.Class clazz,
java.lang.Class jsonClazz) |
static java.util.Map<EOEditingContext,java.lang.String> |
contexts() |
static EOEditingContext |
editingContextForKey(java.lang.String key) |
java.lang.Class[] |
getJSONClasses() |
java.lang.Class[] |
getSerializableClasses() |
static NSArray<java.lang.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.
|
java.lang.Object |
marshall(org.jabsorb.serializer.SerializerState state,
java.lang.Object p,
java.lang.Object o) |
static NSArray<java.lang.String> |
readableAttributeNames(EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled to the client.
|
static java.lang.String |
registerEditingContext(EOEditingContext ec) |
org.jabsorb.serializer.ObjectMatch |
tryUnmarshall(org.jabsorb.serializer.SerializerState state,
java.lang.Class clazz,
java.lang.Object jso) |
java.lang.Object |
unmarshall(org.jabsorb.serializer.SerializerState state,
java.lang.Class clazz,
java.lang.Object o) |
static NSArray<java.lang.String> |
writableAttributeNames(EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled from the client.
|
protected static final NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> readableAttributeNames
protected static final NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> writableAttributeNames
protected static final NSMutableDictionary<java.lang.String,NSArray<java.lang.String>> includedRelationshipNames
public java.lang.Class[] getSerializableClasses()
public java.lang.Class[] getJSONClasses()
protected boolean _canSerialize(java.lang.Class clazz,
java.lang.Class jsonClazz)
public boolean canSerialize(java.lang.Class clazz,
java.lang.Class jsonClazz)
canSerialize in interface org.jabsorb.serializer.SerializercanSerialize in class org.jabsorb.serializer.AbstractSerializerpublic org.jabsorb.serializer.ObjectMatch tryUnmarshall(org.jabsorb.serializer.SerializerState state,
java.lang.Class clazz,
java.lang.Object jso)
public java.lang.Object unmarshall(org.jabsorb.serializer.SerializerState state,
java.lang.Class clazz,
java.lang.Object o)
throws org.jabsorb.serializer.UnmarshallException
org.jabsorb.serializer.UnmarshallExceptionpublic java.lang.Object marshall(org.jabsorb.serializer.SerializerState state,
java.lang.Object p,
java.lang.Object o)
throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallExceptionpublic void addAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
throws org.jabsorb.serializer.MarshallException
state - object that holds the sate of the serializationsource - the EOEnterpriseObject to copy attribute values fromdestination - the EOEnterpriseObject to copy attribute values toorg.jabsorb.serializer.MarshallException - if conversion failedprotected void _addCustomAttributes(org.jabsorb.serializer.SerializerState state,
EOEnterpriseObject source,
org.json.JSONObject destination)
throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallExceptionprotected boolean _canInsert(java.lang.String entityName)
entityName - name of an entitytrue if entity is insertableprotected NSArray<java.lang.String> _readableAttributeNames(EOEnterpriseObject eo)
eo - enterprise objectprotected NSArray<java.lang.String> _writableAttributeNames(EOEnterpriseObject eo)
eo - enterprise objectprotected NSArray<java.lang.String> _includedRelationshipNames(EOEnterpriseObject eo)
eo - enterprise objectpublic static NSArray<java.lang.String> readableAttributeNames(EOEnterpriseObject source)
source - the EOEnterpriseObject to copy attribute values frompublic static NSArray<java.lang.String> writableAttributeNames(EOEnterpriseObject source)
source - the EOEnterpriseObjectpublic static NSArray<java.lang.String> includedRelationshipNames(EOEnterpriseObject source)
source - the EOEnterpriseObject being marhsalledpublic static java.util.Map<EOEditingContext,java.lang.String> contexts()
public static java.lang.String registerEditingContext(EOEditingContext ec)
public static EOEditingContext editingContextForKey(java.lang.String key)
Copyright © 2002 – 2022 Project Wonder.