Package org.cruxframework.crux.core.rebind

Examples of org.cruxframework.crux.core.rebind.CruxGeneratorException


        context.colDataObject = context.colDataObjectType.getParameterizedQualifiedSourceName();
        context.columnExpression = getValueExpression.toString();
            }
            catch (NoSuchFieldException e)
            {
              throw new CruxGeneratorException("Can not access property ["+property+"] on row object["+context.rowDataObject+"].");
            }
    }
View Full Code Here


              out.println(primitive.getSimpleSourceName()+" c2 = "+getValueExpression.toString());
              out.println("return (c1==c2) ? 0 : (c1<c2) ? -1 : 1;");
            }
            else
            {
              throw new CruxGeneratorException("Can not sort column for property ["+property+"] on row object["+context.rowDataObject+"]. Property must have a primitive or Comparable type.");
            }
          }
        }
        catch (NoSuchFieldException e)
        {
                throw new CruxGeneratorException("Can not access property ["+property+"] on row object["+context.rowDataObject+"].");
        }
        out.println("}");
        out.println("return 1;");
        out.println("}");
        out.println("return -1;");
View Full Code Here

    String dsVar = nameFactory.createName("__dat");
    sourceWriter.println(datasourceClassName+" "+dsVar+"  = new "+datasourceClassName+"(this.view);");
    JClassType datasourceClass = context.getTypeOracle().findType(DataSources.getDataSource(dataSource, device));
    if (datasourceClass == null)
    {
      throw new CruxGeneratorException("Can not found the datasource ["+datasourceClassName+"]. Check your classpath and the inherit modules");
    }
    IocContainerRebind.injectFieldsAndMethods(sourceWriter, datasourceClass, dsVar, "iocContainer", view, device);
    return dsVar;
  }
View Full Code Here

              String genClass = new DataSourceProxyCreator(logger, context, dataSourceClass).create();
              dataSourcesClassNames.put(dataSource, genClass);
            }
            catch (NotFoundException e)
            {
              throw new CruxGeneratorException(e.getMessage(), e);
            }
    }
  }
View Full Code Here

      Map<String, String> classNamesByDevice = dataSourcesClassNames.get(datasourceKey);
     
      String deviceKey = device.toString();
    if (dataSourcesCanonicalNames.containsKey(deviceKey))
      {
        throw new CruxGeneratorException("Duplicated Datasource: ["+datasourceKey+"].");
      }
    canonicallCassNamesByDevice.put(deviceKey, datasourceClass.getCanonicalName());
    classNamesByDevice.put(deviceKey, datasourceClass.getName());
    }
View Full Code Here

      String childWidget = getWidgetCreator().createChildWidget(out, context.getChildElement(), context);
     
     
      if (!context.direction.equals(Direction.CENTER) && context.size == -1)
      {
        throw new CruxGeneratorException("The attribute size is required for cells not centered in DockLayoutPanel wiht id: ["+context.getWidgetId()+"].");
      }
      boolean childPartialSupport = getWidgetCreator().hasChildPartialSupport(context.getChildElement());
      if (childPartialSupport)
      {
        out.println("if ("+getWidgetCreator().getChildWidgetClassName(context.getChildElement())+".isSupported()){");
View Full Code Here

        {
          srcWriter.println("result.push((double)(("+Date.class.getCanonicalName()+")key).getTime());");
        }
        else
        {
          throw new CruxGeneratorException("Invalid key type for objectStore ["+targetObjectType.getParameterizedQualifiedSourceName()+"]");
        }
        srcWriter.println("}");
      }
  }
View Full Code Here

  protected JType getPropertyType(String property)
    {
      JType jType = JClassUtils.getTypeForProperty(property, targetObjectType);
      if (jType == null)
      {
        throw new CruxGeneratorException("Invalid property for objectStore ["+targetObjectType.getParameterizedQualifiedSourceName()+"]");
      }
      return jType;
    }
View Full Code Here

    srcWriter.println("if (object == null){");
    srcWriter.println("throw new NullPointerException();");
    srcWriter.println("}");
    if (targetObjectType.isAssignableTo(blobType))
    {
      throw new CruxGeneratorException("Blobs and files can not be inserted into object stores. Use FieStore instead.");
    }
    else if (isEmptyType())
    {
      srcWriter.println("callback.onEncode("+JsUtils.class.getCanonicalName()+".toJSONValue(object));");
    }
View Full Code Here

   
    if (autoIncrement)
    {
      if (!getKeyTypeName().equals("Integer"))
      {
        throw new CruxGeneratorException("Auto increment keys can only be used on integer keys");
      }
      srcWriter.println("} else {");
      srcWriter.println("return null;");
    }
    else
View Full Code Here

TOP

Related Classes of org.cruxframework.crux.core.rebind.CruxGeneratorException

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.