Package de.xima.fc.serialize.gson.type
Class DefaultEntityWriter
- java.lang.Object
-
- com.google.gson.TypeAdapter<T>
-
- de.xima.fc.serialize.gson.type.DefaultEntityWriter
-
public class DefaultEntityWriter extends com.google.gson.TypeAdapter<T>
Default writer for entities that serializes the entity based onExportDetails
- Since:
- 7.0.0
- 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
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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)
void
write(com.google.gson.stream.JsonWriter out, de.xima.cmn.dao.interfaces.IEntity<Long> value)
-
-
-
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
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter out, de.xima.cmn.dao.interfaces.IEntity<Long> value) throws IOException
- Specified by:
write
in classcom.google.gson.TypeAdapter<de.xima.cmn.dao.interfaces.IEntity<Long>>
- Throws:
IOException
-
read
public de.xima.cmn.dao.interfaces.IEntity<Long> read(com.google.gson.stream.JsonReader in) throws IOException
- Specified by:
read
in classcom.google.gson.TypeAdapter<de.xima.cmn.dao.interfaces.IEntity<Long>>
- 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)
-
-