Package net.sf.joafip.store.service.conversion

Examples of net.sf.joafip.store.service.conversion.ConversionException


  private boolean assertPersistencetype(final FieldInfo originalFieldInfo,
      final FieldInfo replacementFieldInfo) throws ClassInfoException,
      ConversionException {
    if (originalFieldInfo.isStaticField() != replacementFieldInfo
        .isStaticField()) {
      throw new ConversionException(
          "field replacement static type mismatch\n"
              + originalFieldInfo + "\n" + replacementFieldInfo);
    }
    return true;
  }
View Full Code Here


      }

    } while (intermediateConversionDef != null);

    if (previousClassReplacementDef != null) {
      throw new ConversionException("can not add to:\n"
          + classReplacementDefList + "\nexisting:\n"
          + previousClassReplacementDef);
    }
  }
View Full Code Here

            newFieldType, originalFieldInfo.getStaticField(),
            originalFieldInfo.getTransientField());
      }
      return replacementFieldInfo;
    } catch (ClassInfoException exception) {
      throw new ConversionException(exception);
    }
  }
View Full Code Here

  protected int computeIdentifier(final String stringIdentifier)
      throws ConversionException {
    try {
      return Version.releaseId(stringIdentifier);
    } catch (FilePersistenceException exception) {
      throw new ConversionException(exception);
    }
  }
View Full Code Here

  protected int computeIdentifier(final String stringIdentifier)
      throws ConversionException {
    try {
      return Integer.parseInt(stringIdentifier);
    } catch (NumberFormatException exception) {
      throw new ConversionException(exception);
    }
  }
View Full Code Here

    case 3:
      // <class name> # <field def>
      className = poundSplit[0];
      checkClassName();
      if (!fieldInfo(poundSplit[1])) {
        throw new ConversionException("must defined field \""
            + poundSplit[1] + "\"");
      }
      computeFieldName(poundSplit[2]);
      break;
    default:
      throw new ConversionException("bad separation by # in \""
          + fieldDef + "\"");
    }

  }
View Full Code Here

  private void computeFieldName(final String string)
      throws ConversionException {
    final String[] split = string.split("@");
    if (string.contains(":") || string.contains(".") || split.length > 2) {
      throw new ConversionException("bad field name \"" + string + "\"");
    }
    fieldName = split[0];
    if (split.length == 2) {
      try {
        fieldIndex = Integer.parseInt(split[1]);
      } catch (NumberFormatException exception) {
        throw new ConversionException("bad field index in \"" + string
            + "\"", exception);
      }
    } else {
      fieldIndex = -1;
    }
View Full Code Here

    }
  }

  private void checkClassName() throws ConversionException {
    if (className.contains(":")) {
      throw new ConversionException("bad class name \"" + className
          + "\"");
    }
  }
View Full Code Here

        transientField = Boolean.FALSE;
      } else if ("transient".equals(modifier)) {
        staticField = Boolean.FALSE;
        transientField = Boolean.TRUE;
      } else {
        throw new ConversionException("bad modifier \"" + split[0]
            + "\"");
      }
      fieldClassName = split[1];
      fieldDeclaringClassName = split[2];
      fieldInfo = true;
      break;
    default:
      throw new ConversionException("bad separation by : ("
          + (split.length - 1) + " occurence)in \"" + string + "\"");
    }
    return fieldInfo;
  }
View Full Code Here

        conversionDefinitionIdIntReader.close();
        inputStream.close();
      }

    } catch (IllegalArgumentException exception) {
      throw new ConversionException(exception);
    } catch (IllegalAccessException exception) {
      throw new ConversionException(exception);
    } catch (InvocationTargetException exception) {
      throw new ConversionException(exception);
    } catch (IOException exception) {
      throw new ConversionException(exception);
    } catch (URISyntaxException exception) {
      throw new ConversionException(exception);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.conversion.ConversionException

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.