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,
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.
|
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.Serializer
canSerialize
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
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.MarshallException
protected boolean _canInsert(String entityName)
entityName
- name of an entitytrue
if entity is insertableprotected NSArray<String> _readableAttributeNames(EOEnterpriseObject eo)
eo
- enterprise objectprotected NSArray<String> _writableAttributeNames(EOEnterpriseObject eo)
eo
- enterprise objectprotected NSArray<String> _includedRelationshipNames(EOEnterpriseObject eo)
eo
- enterprise objectpublic static NSArray<String> readableAttributeNames(EOEnterpriseObject source)
source
- the EOEnterpriseObject to copy attribute values frompublic static NSArray<String> writableAttributeNames(EOEnterpriseObject source)
source
- the EOEnterpriseObjectpublic static NSArray<String> includedRelationshipNames(EOEnterpriseObject source)
source
- the EOEnterpriseObject being marhsalledpublic static Map<EOEditingContext,String> contexts()
public static String registerEditingContext(EOEditingContext ec)
public static EOEditingContext editingContextForKey(String key)
Copyright © 2002 – 2024 Project Wonder.