public class EOEnterpriseObjectSerializer
extends org.jabsorb.serializer.AbstractSerializer
EOEnterpriseObject entre le monde Javascript et le monde Java.| Name | Description |
|---|---|
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<String,NSArray<String>> |
includedRelationshipNames |
protected static NSMutableDictionary<String,NSArray<String>> |
readableAttributeNames |
protected static NSMutableDictionary<String,NSArray<String>> |
writableAttributeNames |
| Constructor and Description |
|---|
EOEnterpriseObjectSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_addCustomAttributes(org.jabsorb.serializer.SerializerState state,
com.webobjects.eocontrol.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(com.webobjects.eocontrol.EOEnterpriseObject eo)
Override to return the appropriate relationship names.
|
protected NSArray<String> |
_readableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject eo)
Override to return the appropriate attribute names.
|
protected NSArray<String> |
_writableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject eo)
Override to return the appropriate attribute names.
|
void |
addAttributes(org.jabsorb.serializer.SerializerState state,
com.webobjects.eocontrol.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<com.webobjects.eocontrol.EOEditingContext,String> |
contexts() |
static com.webobjects.eocontrol.EOEditingContext |
editingContextForKey(String key) |
Class[] |
getJSONClasses() |
Class[] |
getSerializableClasses() |
static NSArray<String> |
includedRelationshipNames(com.webobjects.eocontrol.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(com.webobjects.eocontrol.EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled to the client.
|
static String |
registerEditingContext(com.webobjects.eocontrol.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(com.webobjects.eocontrol.EOEnterpriseObject source)
Returns an array of attribute names from the EOEntity of source that should be marshalled from the client.
|
protected static final NSMutableDictionary<String,NSArray<String>> readableAttributeNames
protected static final NSMutableDictionary<String,NSArray<String>> writableAttributeNames
protected static final NSMutableDictionary<String,NSArray<String>> includedRelationshipNames
public Class[] getSerializableClasses()
public Class[] getJSONClasses()
public boolean canSerialize(Class clazz, 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,
Class clazz,
Object jso)
public Object unmarshall(org.jabsorb.serializer.SerializerState state, Class clazz, Object o) throws org.jabsorb.serializer.UnmarshallException
org.jabsorb.serializer.UnmarshallExceptionpublic Object marshall(org.jabsorb.serializer.SerializerState state, Object p, Object o) throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallExceptionpublic void addAttributes(org.jabsorb.serializer.SerializerState state,
com.webobjects.eocontrol.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,
com.webobjects.eocontrol.EOEnterpriseObject source,
org.json.JSONObject destination)
throws org.jabsorb.serializer.MarshallException
org.jabsorb.serializer.MarshallExceptionprotected boolean _canInsert(String entityName)
entityName - name of an entitytrue if entity is insertableprotected NSArray<String> _readableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject eo)
eo - enterprise objectprotected NSArray<String> _writableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject eo)
eo - enterprise objectprotected NSArray<String> _includedRelationshipNames(com.webobjects.eocontrol.EOEnterpriseObject eo)
eo - enterprise objectpublic static NSArray<String> readableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject source)
source - the EOEnterpriseObject to copy attribute values frompublic static NSArray<String> writableAttributeNames(com.webobjects.eocontrol.EOEnterpriseObject source)
source - the EOEnterpriseObjectpublic static NSArray<String> includedRelationshipNames(com.webobjects.eocontrol.EOEnterpriseObject source)
source - the EOEnterpriseObject being marhsalledpublic static String registerEditingContext(com.webobjects.eocontrol.EOEditingContext ec)
public static com.webobjects.eocontrol.EOEditingContext editingContextForKey(String key)
Copyright © 2002 – 2020 Project Wonder.