Package com.alvazan.orm.api.exc

Examples of com.alvazan.orm.api.exc.TypeMismatchException


    Class objectFieldType = DboColumnMeta.convertIfPrimitive(fieldType);
    if(value!=null){
      Class actualType = value.getClass();

      if(!objectFieldType.isAssignableFrom(actualType)){
        throw new TypeMismatchException("value [" + value
            + "] is not the correct type for the parameter='"+name+"' from inspecting the Entity.  Type should be=["
            + fieldType + "]");
      }    
    }
 
View Full Code Here


  public static Object fetchFieldValue(Object entity, Field field) {
    try {
      return field.get(entity);
    } catch (IllegalArgumentException e) {
      throw new TypeMismatchException("Entity='"+entity.getClass()+"' was passed to field of a different type.  field='"+field+"'", e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    }
  } 
View Full Code Here

    for(MetaField<T> m : columnNameToField.values()) {
      try {
        m.translateToColumn(info);
      } catch(TypeMismatchException e) {
        throw new TypeMismatchException("The entity "+getMetaClass()+" has an incorrect annotation on field="+m.getField().getName()+".  The attribute 'entityType' on the annotation is incorrect for the types you are saving.", e);
      }
    }
    return row;
  }
View Full Code Here

    Class objectFieldType = ConverterUtil.convertIfPrimitive(fieldType);
    if(value!=null){
      Class actualType = value.getClass();

      if(!objectFieldType.isAssignableFrom(actualType)){
        throw new TypeMismatchException("value [" + value
            + "] is not the correct type for the parameter='"+name+"' from inspecting the Entity.  Type should be=["
            + fieldType + "]");
      }    
    }
 
View Full Code Here

    for(MetaField<T> m : columnNameToField.values()) {
      try {
        m.translateToColumn(info);
      } catch(TypeMismatchException e) {
        throw new TypeMismatchException("The entity "+getMetaClass()+" has an incorrect annotation on field="+m.getField().getName()+".  The attribute 'entityType' on the annotation is incorrect for the types you are saving.", e);
      }
    }
    return row;
  }
View Full Code Here

    Class objectFieldType = DboColumnMeta.convertIfPrimitive(fieldType);
    if(value!=null){
      Class actualType = value.getClass();

      if(!objectFieldType.isAssignableFrom(actualType)){
        throw new TypeMismatchException("value [" + value
            + "] is not the correct type for the parameter='"+name+"' from inspecting the Entity.  Type should be=["
            + fieldType + "]");
      }    
    }
 
View Full Code Here

    for(MetaField<T> m : columnNameToField.values()) {
      try {
        m.translateToColumn(info);
      } catch(TypeMismatchException e) {
        throw new TypeMismatchException("The entity "+getMetaClass()+" has an incorrect annotation on field="+m.getField().getName()+".  The attribute 'entityType' on the annotation is incorrect for the types you are saving.", e);
      }
    }
    return row;
  }
View Full Code Here

    Class objectFieldType = DboColumnMeta.convertIfPrimitive(fieldType);
    if(value!=null){
      Class actualType = value.getClass();

      if(!objectFieldType.isAssignableFrom(actualType)){
        throw new TypeMismatchException("value [" + value
            + "] is not the correct type for the parameter='"+name+"' from inspecting the Entity.  Type should be=["
            + fieldType + "]");
      }    
    }
 
View Full Code Here

    for(MetaField<T> m : columnNameToField.values()) {
      try {
        m.translateToColumn(info);
      } catch(TypeMismatchException e) {
        throw new TypeMismatchException("The entity "+getMetaClass()+" has an incorrect annotation on field="+m.getField().getName()+".  The attribute 'entityType' on the annotation is incorrect for the types you are saving.", e);
      }
    }
    return row;
  }
View Full Code Here

    for(MetaField<T> m : columnNameToField.values()) {
      try {
        m.translateToColumn(info);
      } catch(TypeMismatchException e) {
        throw new TypeMismatchException("The entity "+getMetaClass()+" has an incorrect annotation on field="+m.getField().getName()+".  The attribute 'entityType' on the annotation is incorrect for the types you are saving.", e);
      }
    }
    return row;
  }
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.exc.TypeMismatchException

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.