core/src/main/java/com/orientechnologies/orient/core/serialization/serializer/record/string/ORecordSerializerStringAbstract.java
public static OType getType(final String iValue, final char iCharType) {
    if (iCharType == 'f')
      return OType.FLOAT;
    else if (iCharType == 'c')
      return OType.DECIMAL;
    else if (iCharType == 'l')
      return OType.LONG;
    else if (iCharType == 'd')
      return OType.DOUBLE;
    else if (iCharType == 'b') {
      if (iValue.length() >= 1 && iValue.length() <= 3)
        return OType.BYTE;
      else
        return OType.BINARY;
    } else if (iCharType == 'a')
      return OType.DATE;
    else if (iCharType == 't')
      return OType.DATETIME;
    else if (iCharType == 's')
      return OType.SHORT;
    else if (iCharType == 'e')
      return OType.EMBEDDEDSET;
    else if (iCharType == 'g')
      return OType.LINKBAG;
    else if (iCharType == 'z')
      return OType.LINKLIST;
    else if (iCharType == 'm')
      return OType.LINKMAP;
    else if (iCharType == 'x')
      return OType.LINK;
    else if (iCharType == 'n')
      return OType.LINKSET;
    else if (iCharType == 'x')
      return OType.LINK;
    else if (iCharType == 'u')
      return OType.CUSTOM;

    return OType.STRING;
  }
public static OType getType(final String iValue, final char iCharType) {
    if (iCharType == 'f')
      return OType.FLOAT;
    else if (iCharType == 'c')
      return OType.DECIMAL;
    else if (iCharType == 'l')
      return OType.LONG;
    else if (iCharType == 'd')
      return OType.DOUBLE;
    else if (iCharType == 'b') {
      if (iValue.length() >= 1 && iValue.length() <= 3)
        return OType.BYTE;
      else
        return OType.BINARY;
    } else if (iCharType == 'a')
      return OType.DATE;
    else if (iCharType == 't')
      return OType.DATETIME;
    else if (iCharType == 's')
      return OType.SHORT;
    else if (iCharType == 'e')
      return OType.EMBEDDEDSET;
    else if (iCharType == 'g')
      return OType.LINKBAG;
    else if (iCharType == 'z')
      return OType.LINKLIST;
    else if (iCharType == 'm')
      return OType.LINKMAP;
    else if (iCharType == 'x')
      return OType.LINK;
    else if (iCharType == 'n')
      return OType.LINKSET;
    else if (iCharType == 'x')
      return OType.LINK;
    else if (iCharType == 'u')
      return OType.CUSTOM;

    return OType.STRING;
  }
public static OType getType ( final String iValue , final char iCharType ) { if ( iCharType == ' ' ) return OType . FLOAT ; else if ( iCharType == ' ' ) return OType . DECIMAL ; else if ( iCharType == ' ' ) return OType . LONG ; else if ( iCharType == ' ' ) return OType . DOUBLE ; else if ( iCharType == ' ' ) { if ( iValue . length ( ) >= 1 && iValue . length ( ) <= 3 ) return OType . BYTE ; else return OType . BINARY ; } else if ( iCharType == ' ' ) return OType . DATE ; else if ( iCharType == ' ' ) return OType . DATETIME ; else if ( iCharType == ' ' ) return OType . SHORT ; else if ( iCharType == ' ' ) return OType . EMBEDDEDSET ; else if ( iCharType == ' ' ) return OType . LINKBAG ; else if ( iCharType == ' ' ) return OType . LINKLIST ; else if ( iCharType == ' ' ) return OType . LINKMAP ; else if ( iCharType == ' ' ) return OType . LINK ; else if ( iCharType == ' ' ) return OType . LINKSET ; else if ( iCharType == ' ' ) return OType . LINK ; else if ( iCharType == ' ' ) return OType . CUSTOM ; return OType . STRING ; }
Parses the field type char returning the closer type. Default is STRING. b=binary if iValue.length() >= 4 b=byte if
iValue.length() <= 3 s=short, l=long f=float d=double a=date t=datetime

@param iValue
Value to parse
@param iCharType
Char value indicating the type
@return The closest type recognized
Parses the field type char returning the closer type . Default is STRING . b = binary if iValue . length () > = 4 b = byte if iValue . length () < = 3 s = short l = long f = float d = double a = date t = datetime