Package org.cruxframework.crux.core.rebind

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


        }

        String formatterClass = Formatters.getFormatter(formatterName);
        if (formatterClass == null || formatterClass.length() == 0)
        {
          throw new CruxGeneratorException("Formatter ["+formatterName+"] not found!");
        }
        return "new " + formatterClass + "("+parameters.toString()+")";
      }
      catch (Exception e)
      {
        throw new CruxGeneratorException(e.getMessage(), e);
      }
    }
  }
View Full Code Here


        {
          propType = JClassUtils.buildGetValueExpression(getValueExpression, dtoType, colKey, "recordObject", true);
        }
        catch (Exception e)
        {
          throw new CruxGeneratorException("Datasource ["+dataSourceClass.getQualifiedSourceName()+"] has an invalid ColumnDefinition ["+colKey+"].");
        }

        JClassType comparableType = context.getTypeOracle().findType(Comparable.class.getCanonicalName());

        boolean isSortable = (propType.isPrimitive() != null) || (comparableType.isAssignableFrom((JClassType) propType));
View Full Code Here

      sourceWriter.println("return record.getRecordObject();");
      sourceWriter.println("}");
    }
    catch (Exception e)
    {
      throw new CruxGeneratorException("Error for register client datasource. DataSource: ["+dataSourceClass.getName()+"].", e);
    }
  } 
View Full Code Here

      sourceWriter.println("}");
   
    }
    catch (Exception e)
    {
      throw new CruxGeneratorException("Error for register client datasource. DataSource: ["+dataSourceClass.getName()+"].", e);
    }
  }
View Full Code Here

          fieldExpression.append(JClassUtils.getFieldValueGet(jClassPropertyType, fieldName, "", false));

          propertyType = JClassUtils.getPropertyType(jClassPropertyType, fieldName);
          if (propertyType == null)
          {
            throw new CruxGeneratorException("Error Generating DataSource ["+dataSourceClass.getName()+"]. Can not retrieve identifier field ["+identifier[i]+"].");
          }

                }
        result.append("+"+fieldExpression.toString());
      }
View Full Code Here

    if (idAnnotation != null)
    {
      return idAnnotation.value();
    }

    throw new CruxGeneratorException("Error Generating DataSource ["+dataSourceClass.getName()+"]. No identifier selected. Use the @DataSourceRecordIdentifier annotation to inform the identifier");
    }
View Full Code Here

    JType returnType = JClassUtils.getReturnTypeFromMethodClass(dataSourceClass, methodName, new JType[]{});
    JClassType returnClassType = returnType.isClassOrInterface();
   
    if (returnClassType == null)
    {
      throw new CruxGeneratorException("Error Generating DataSource ["+dataSourceClass.getName()+"]. Invalid Bound object. Primitive is not allowed");
    }
    return returnClassType;
    }
View Full Code Here

      SelectionProperty device = context.getPropertyOracle().getSelectionProperty(logger, "device.features");
      return device==null?null:device.getCurrentValue();
    }
    catch (BadPropertyValueException e)
    {
      throw new CruxGeneratorException("Can not read device.features property.", e);
    }
  }
View Full Code Here

          " new "+LoadOracleEvent.class.getCanonicalName()+"<"+className+">("+EscapeUtils.quote(context.getWidgetId())+")", this);
      out.println(className + " " + context.getWidget()+" = new "+className+"("+oracle+");");
    }
    else
    {
      throw new CruxGeneratorException("The attribute onLoadOracle is required for widget id: ["+context.getWidgetId()+"].");
    }
  } 
View Full Code Here

        srcWriter.println("public "+className+" get(){");
        String instantiationClass = getInstantiationClass(className);
        JClassType instantiationType = context.getTypeOracle().findType(instantiationClass);
        if (instantiationType == null)
        {
          throw new CruxGeneratorException("Can not found type: "+instantiationClass);
        }
        if (instantiationType.isAssignableTo(remoteServiceType) && ConfigurationFactory.getConfigurations().sendCruxViewNameOnClientRequests().equals("true"))
        {
          srcWriter.println(className + " ret = GWT.create("+instantiationClass+".class);");
          srcWriter.println("(("+ServiceDefTarget.class.getCanonicalName() + ")ret).setRpcRequestBuilder(new "
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.