Package com.apitrary.orm.core.codec

Examples of com.apitrary.orm.core.codec.Codec


       */
      List<java.lang.reflect.Field> customEncodedProperties = ClassUtil.getAnnotatedFields(entity, com.apitrary.orm.core.annotations.Codec.class);
      for (java.lang.reflect.Field field : customEncodedProperties) {

        Class<? extends Codec> codecClazz = ClassUtil.getFieldAnnotationValue("value", field, com.apitrary.orm.core.annotations.Codec.class, Class.class);
        Codec codec = (Codec) ClassUtil.newInstance(codecClazz);

        Object value = ClassUtil.getValueOfField(field, entity);
        String stringValue = codec.encode(value);
        json = addNode(json, field.getName(), stringValue);
      }

      /*
       * Perform entity refs
View Full Code Here

TOP

Related Classes of com.apitrary.orm.core.codec.Codec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.