Package de.xima.fc.serialize.gson.type
Class EntityTypeAdapter
- java.lang.Object
-
- com.google.gson.TypeAdapter<T>
-
- de.xima.fc.serialize.gson.type.EntityTypeAdapter
-
@Deprecated public class EntityTypeAdapter extends com.google.gson.TypeAdapter<T>
Deprecated.UseDefaultEntityReader
orDefaultEntityWriter
instead. Type adapter for general FC entities. Turns references to otherIUUIDEntity
s into entity descriptions containing their uuid and class (with a few exceptions, see implementation details).- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.gson.TypeAdapter<com.google.gson.JsonElement>
elementAdapter
protected org.jasypt.encryption.StringEncryptor
encryptor
protected EExportContext
exportContext
protected com.google.gson.Gson
gson
protected static org.slf4j.Logger
LOG
static String
SERIALIZATION_KEY_DESC_CLASS_NAME
static String
SERIALIZATION_KEY_DESC_NAME
static String
SERIALIZATION_KEY_DESC_UUID
static String
SERIALIZATION_KEY_UUID_ENTITY
-
Constructor Summary
Constructors Constructor Description EntityTypeAdapter(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<Object> type, EExportContext exportContext, org.jasypt.encryption.StringEncryptor encryptor)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.apache.commons.lang3.tuple.Pair<List<Field>,List<Field>>
getClassFieldsPair(Class<?> clazz)
protected static boolean
isEncryptionField(Field field)
de.xima.cmn.dao.interfaces.IEntity<Long>
read(com.google.gson.stream.JsonReader in)
Deprecated.void
write(com.google.gson.stream.JsonWriter out, Object entity)
Deprecated.
-
-
-
Field Detail
-
SERIALIZATION_KEY_UUID_ENTITY
public static final String SERIALIZATION_KEY_UUID_ENTITY
- See Also:
- Constant Field Values
-
SERIALIZATION_KEY_DESC_UUID
public static final String SERIALIZATION_KEY_DESC_UUID
- See Also:
- Constant Field Values
-
SERIALIZATION_KEY_DESC_NAME
public static final String SERIALIZATION_KEY_DESC_NAME
- See Also:
- Constant Field Values
-
SERIALIZATION_KEY_DESC_CLASS_NAME
public static final String SERIALIZATION_KEY_DESC_CLASS_NAME
- See Also:
- Constant Field Values
-
LOG
protected static final org.slf4j.Logger LOG
-
gson
protected final com.google.gson.Gson gson
-
elementAdapter
protected final com.google.gson.TypeAdapter<com.google.gson.JsonElement> elementAdapter
-
exportContext
protected final EExportContext exportContext
-
encryptor
protected final org.jasypt.encryption.StringEncryptor encryptor
-
-
Constructor Detail
-
EntityTypeAdapter
public EntityTypeAdapter(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<Object> type, EExportContext exportContext, org.jasypt.encryption.StringEncryptor encryptor)
Deprecated.
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter out, Object entity) throws IOException
Deprecated.- Specified by:
write
in classcom.google.gson.TypeAdapter<Object>
- Throws:
IOException
-
read
public de.xima.cmn.dao.interfaces.IEntity<Long> read(com.google.gson.stream.JsonReader in) throws IOException
Deprecated.- Specified by:
read
in classcom.google.gson.TypeAdapter<Object>
- Throws:
IOException
-
getClassFieldsPair
protected org.apache.commons.lang3.tuple.Pair<List<Field>,List<Field>> getClassFieldsPair(Class<?> clazz)
-
isEncryptionField
protected static final boolean isEncryptionField(Field field)
-
-