Package org.structr.common.error

Examples of org.structr.common.error.TypeToken


            } catch(ClassCastException cce) {

              cce.printStackTrace();

              throw new FrameworkException(entityType.getSimpleName(), new TypeToken(propertyKey, propertyKey.typeName()));
            }

          } else {

            resultMap.put(propertyKey, value);
View Full Code Here


            } catch(ClassCastException cce) {

              cce.printStackTrace();

              throw new FrameworkException(entityType.getSimpleName(), new TypeToken(propertyKey, propertyKey.typeName()));
            }

          } else {

            resultMap.put(propertyKey, value);
View Full Code Here

            } catch(ClassCastException cce) {

              cce.printStackTrace();

              throw new FrameworkException(entityType.getSimpleName(), new TypeToken(propertyKey, propertyKey.typeName()));
            }

          } else {

            resultMap.put(propertyKey, value);
View Full Code Here

            } catch(ClassCastException cce) {

              cce.printStackTrace();

              throw new FrameworkException(entity.getSimpleName(), new TypeToken(propertyKey, propertyKey.typeName()));
            }

          } else {

            resultMap.put(propertyKey, value);
View Full Code Here

        } catch(ClassCastException cce) {

          cce.printStackTrace();

          throw new FrameworkException(entity.getSimpleName(), new TypeToken(propertyKey, propertyKey.typeName()));
        }

      } else {

        inputTypedProperties.put(propertyKey.jsonName(), entry.getValue());
View Full Code Here

    if(value != null && type.isAssignableFrom(value)) {
      return true;
    }

    // set error
    errorBuffer.add(object.getType(), new TypeToken(key, type.getName()));

    return false;
  }
View Full Code Here

        return true;

      } else {

        errorBuffer.add(object.getType(), new TypeToken(key, "long"));
      }

    } else {

      errorBuffer.add(object.getType(), new EmptyPropertyToken(key));
View Full Code Here

  private T getTypedResult(Result<T> result, Class<T> type) throws FrameworkException {
   
    GraphObject obj = result.get(0);

    if(!type.isAssignableFrom(obj.getClass())) {
      throw new FrameworkException(type.getSimpleName(), new TypeToken(AbstractNode.base, type.getSimpleName()));
    }

    return result.get(0);
  }
View Full Code Here

      case 1 :
       
        T obj = result.get(0);
        //if(!type.getSimpleName().equals(node.getType())) {
        if (!type.isAssignableFrom(obj.getClass())) {
          throw new FrameworkException("base", new TypeToken(propertyKey, type.getSimpleName()));
        }
        return obj;
    }

    if (convertedSource != null) {
View Full Code Here

  private T getTypedResult(Result<T> result, Class<T> type) throws FrameworkException {
   
    GraphObject obj = result.get(0);

    if (!type.isAssignableFrom(obj.getClass())) {
      throw new FrameworkException(type.getSimpleName(), new TypeToken(AbstractNode.base, type.getSimpleName()));
    }

    return result.get(0);
  }
View Full Code Here

TOP

Related Classes of org.structr.common.error.TypeToken

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.