Class ORecordSerializerStringAbstract

java.lang.Object
com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract
All Implemented Interfaces:
ORecordSerializer, Serializable
Direct Known Subclasses:
ORecordSerializerCSVAbstract, ORecordSerializerJSON

public abstract class ORecordSerializerStringAbstract extends Object implements ORecordSerializer, Serializable
See Also:
  • Field Details

    • PROFILER

      protected static final OProfiler PROFILER
  • Constructor Details

    • ORecordSerializerStringAbstract

      public ORecordSerializerStringAbstract()
  • Method Details

    • fieldTypeFromStream

      public static Object fieldTypeFromStream(ODocument iDocument, OType iType, Object iValue)
    • convertValue

      public static Object convertValue(String iValue, OType iExpectedType)
    • fieldTypeToString

      public static void fieldTypeToString(StringBuilder iBuffer, OType iType, Object iValue)
    • getType

      public static OType getType(String iValue)
      Parses a string returning the closer type. Numbers by default are INTEGER if haven't decimal separator, otherwise FLOAT. To treat all the number types numbers are postponed with a character that tells the type: b=byte, s=short, l=long, f=float, d=double, t=date.
      Parameters:
      iValue - Value to parse
      Returns:
      The closest type recognized
    • getTypeValue

      public static Object getTypeValue(String iValue)
      Parses a string returning the value with the closer type. Numbers by default are INTEGER if haven't decimal separator, otherwise FLOAT. To treat all the number types numbers are postponed with a character that tells the type: b=byte, s=short, l=long, f=float, d=double, t=date. If starts with # it's a RecordID. Most of the code is equals to getType() but has been copied to speed-up it.
      Parameters:
      iValue - Value to parse
      Returns:
      The closest type recognized
    • simpleValueFromStream

      public static Object simpleValueFromStream(Object iValue, OType iType)
    • simpleValueToStream

      public static void simpleValueToStream(StringBuilder iBuffer, OType iType, Object iValue)
    • fromString

      public abstract ORecord fromString(String iContent, ORecord iRecord, String[] iFields)
    • toString

      public StringBuilder toString(ORecord iRecord, StringBuilder iOutput, String iFormat)
    • fromString

      public ORecord fromString(String iSource)
    • getFieldNames

      public String[] getFieldNames(ODocument reference, byte[] iSource)
      Specified by:
      getFieldNames in interface ORecordSerializer
    • fromStream

      public ORecord fromStream(byte[] iSource, ORecord iRecord, String[] iFields, OSerializationContext ctx)
      Specified by:
      fromStream in interface ORecordSerializer
    • toStream

      public byte[] toStream(ORecord iRecord, OSerializationContext ctx)
      Specified by:
      toStream in interface ORecordSerializer
    • toString

      protected abstract StringBuilder toString(ORecord iRecord, StringBuilder iOutput, String iFormat, boolean autoDetectCollectionType)
    • getSupportBinaryEvaluate

      public boolean getSupportBinaryEvaluate()
      Specified by:
      getSupportBinaryEvaluate in interface ORecordSerializer