Class EntityTypeAdapter


  • @Deprecated
    public class EntityTypeAdapter
    extends com.google.gson.TypeAdapter<T>
    Deprecated.
    Use DefaultEntityReader or DefaultEntityWriter instead. Type adapter for general FC entities. Turns references to other IUUIDEntitys into entity descriptions containing their uuid and class (with a few exceptions, see implementation details).
    Author:
    XIMA MEDIA GmbH
    • Field Detail

      • 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
      • 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 class com.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 class com.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)