public class OObjectSerializerHelper extends Object
Modifier and Type | Field and Description |
---|---|
static Class<?>[] |
callbackAnnotationClasses |
static Class |
jpaAccessClass |
static Class |
jpaEmbeddedClass |
static Class |
jpaIdClass |
static Class |
jpaManyToManyClass |
static Class |
jpaOneToManyClass |
static Class |
jpaOneToOneClass |
static Class |
jpaTransientClass |
static Class |
jpaVersionClass |
static HashMap<Class<?>,OObjectSerializerContext> |
serializerContexts |
Constructor and Description |
---|
OObjectSerializerHelper() |
Modifier and Type | Method and Description |
---|---|
protected static List<Field> |
analyzeClass(Class<?> iClass) |
static void |
bindSerializerContext(Class<?> iClassContext,
OObjectSerializerContext iSerializerContext) |
static Object |
convertDocumentInType(ODocument oDocument,
Class<?> type) |
static Object |
convertInObject(Object iPojo,
String iField,
Object iValue,
Class<?> parameterType) |
static List<Field> |
getClassFields(Class<?> iClass) |
static String |
getDocumentBoundField(Class<?> iClass) |
static Class<?> |
getFieldType(Object iPojo,
String iProperty) |
static Class<?> |
getFieldType(ODocument iDocument,
OEntityManager iEntityManager) |
static Object |
getFieldValue(Object iPojo,
String iProperty) |
static Type[] |
getGenericTypes(Object iObject)
Returns the declared generic types of a class.
|
static ORecordId |
getObjectID(ODatabaseObject iDb,
Object iPojo) |
static String |
getObjectIDFieldName(Object iPojo) |
static int |
getObjectVersion(Object iPojo) |
static String |
getObjectVersionFieldName(Object iPojo) |
static boolean |
hasField(Object iPojo,
String iProperty) |
static boolean |
hasObjectID(Object iPojo) |
static boolean |
hasObjectVersion(Object iPojo) |
static void |
invokeCallback(Object iPojo,
ODocument iDocument,
Class<?> iAnnotation) |
static Object |
serializeFieldValue(Class<?> type,
Object iFieldValue) |
static void |
setFieldValue(Object iPojo,
String iProperty,
Object iValue) |
static String |
setObjectID(ORID iIdentity,
Object iPojo) |
static String |
setObjectVersion(int iVersion,
Object iPojo) |
static ODocument |
toStream(Object iPojo,
ODocument iRecord,
OEntityManager iEntityManager,
OClass schemaClass,
OUserObject2RecordHandler iObj2RecHandler,
ODatabaseObject db,
boolean iSaveOnlyDirty)
Serialize the user POJO to a ORecordDocument instance.
|
static void |
unbindSerializerContext(Class<?> iClassContext) |
static Object |
unserializeFieldValue(Class<?> type,
Object iFieldValue) |
public static final Class<?>[] callbackAnnotationClasses
public static HashMap<Class<?>,OObjectSerializerContext> serializerContexts
public static Class jpaIdClass
public static Class jpaVersionClass
public static Class jpaAccessClass
public static Class jpaEmbeddedClass
public static Class jpaTransientClass
public static Class jpaOneToOneClass
public static Class jpaOneToManyClass
public static Class jpaManyToManyClass
public static Class<?> getFieldType(ODocument iDocument, OEntityManager iEntityManager)
public static ORecordId getObjectID(ODatabaseObject iDb, Object iPojo)
public static boolean hasObjectID(Object iPojo)
public static int getObjectVersion(Object iPojo)
public static boolean hasObjectVersion(Object iPojo)
public static ODocument toStream(Object iPojo, ODocument iRecord, OEntityManager iEntityManager, OClass schemaClass, OUserObject2RecordHandler iObj2RecHandler, ODatabaseObject db, boolean iSaveOnlyDirty)
iPojo
- User pojo to serializeiRecord
- Record where to updateiObj2RecHandler
- public static Type[] getGenericTypes(Object iObject)
iObject
- Class to examinepublic static void invokeCallback(Object iPojo, ODocument iDocument, Class<?> iAnnotation)
public static void bindSerializerContext(Class<?> iClassContext, OObjectSerializerContext iSerializerContext)
public static void unbindSerializerContext(Class<?> iClassContext)
public static Object convertDocumentInType(ODocument oDocument, Class<?> type)
Copyright © 2009–2020 OrientDB. All rights reserved.