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


    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

    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 type="+field.getType(), e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    }
  } 
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.