class ValueMetaConverter implements Serializable, IValueMetaConverter {

  @Override
  public Object convertFromSourceToTargetDataType( int sourceValueMetaType, int targetValueMetaType, Object value )
    throws ValueMetaConversionException {
    if ( value == null ) {
      return null;
    }

    switch ( sourceValueMetaType ) {
      case ValueMetaInterface.TYPE_INET:
        return convertFromInetMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_STRING:
        return convertFromStringMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_INTEGER:
        return convertFromIntegerMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_NUMBER:
        return convertFromNumberMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_BIGNUMBER:
        return convertFromBigNumberMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_TIMESTAMP:
        return convertFromTimestampMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_DATE:

        return convertFromDateMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_BOOLEAN:
        return convertFromBooleanMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_BINARY:
        return convertFromBinaryMetaInterface( targetValueMetaType, value );
      case ValueMetaInterface.TYPE_SERIALIZABLE:
        return convertFromSerializableMetaInterface( targetValueMetaType, value );
      default:
        throwBadConversionCombination( sourceValueMetaType, targetValueMetaType, value );
    }
    return null;
  }

}