Examples of DataField


Examples of DisplayProject.DataField

        }
        return qq_s1;
    }

    public void setqq_s1(DataField value) {
        DataField oldValue = qq_s1;
        qq_s1 = value;
        this.qq_Listeners.firePropertyChange("qq_s1", oldValue, value);
    }
View Full Code Here

Examples of cascading.pattern.datafield.DataField

    if( predicate instanceof SimplePredicate )
      {
      String fieldName = ( (SimplePredicate) predicate ).getField().getValue();
      String value = ( (SimplePredicate) predicate ).getValue();
      SimplePredicate.Operator operator = ( (SimplePredicate) predicate ).getOperator();
      DataField expectedField = modelSchema.getExpectedField( fieldName );

      if( expectedField == null )
        throw new IllegalStateException( "missing field declaration in dictionary for: " + fieldName );

      Type expectedFieldType = expectedField.getType();

      switch( operator )
        {
        case EQUAL:
          return new EqualsToPredicate( fieldName, Coercions.coerce( value, expectedFieldType ) );
        case NOT_EQUAL:
          return new NotEqualsToPredicate( fieldName, Coercions.coerce( value, expectedFieldType ) );
        case LESS_THAN:
          return new LessThanPredicate( fieldName, (Comparable) Coercions.coerce( value, expectedFieldType ) );
        case LESS_OR_EQUAL:
          return new LessOrEqualThanPredicate( fieldName, (Comparable) Coercions.coerce( value, expectedFieldType ) );
        case GREATER_THAN:
          return new GreaterThanPredicate( fieldName, (Comparable) Coercions.coerce( value, expectedFieldType ) );
        case GREATER_OR_EQUAL:
          return new GreaterOrEqualThanPredicate( fieldName, (Comparable) Coercions.coerce( value, expectedFieldType ) );
        case IS_MISSING:
          return new IsMissingPredicate( fieldName );
        case IS_NOT_MISSING:
          return new IsNotMissingPredicate( fieldName );
        }
      }

    if( predicate instanceof SimpleSetPredicate )
      {
      String fieldName = ( (SimpleSetPredicate) predicate ).getField().getValue();
      Array valueArray = ( (SimpleSetPredicate) predicate ).getArray();
      SimpleSetPredicate.BooleanOperator operator = ( (SimpleSetPredicate) predicate ).getBooleanOperator();
      DataField expectedField = modelSchema.getExpectedField( fieldName );

      if( expectedField == null )
        throw new IllegalStateException( "missing field declaration in dictionary for: " + fieldName );

      List list = PMMLUtil.parseArray( valueArray ); // performs coercions
View Full Code Here

Examples of com.extjs.gxt.ui.client.data.DataField

    type.addField("lastposter");
    type.addField("excerpt");
    type.addField("replycount");
    type.addField("threadid");

    DataField datefield = new DataField("lastpost");
    datefield.setType(Date.class);
    datefield.setFormat("timestamp");
    type.addField(datefield);

    JsonPagingLoadResultReader<PagingLoadResult<ModelData>> reader = new JsonPagingLoadResultReader<PagingLoadResult<ModelData>>(
        type);
View Full Code Here

Examples of com.extjs.gxt.ui.client.data.DataField

    type.addField("lastposter");
    type.addField("excerpt");
    type.addField("replycount");
    type.addField("threadid");

    DataField datefield = new DataField("lastpost");
    datefield.setType(Date.class);
    datefield.setFormat("timestamp");
    type.addField(datefield);

    JsonPagingLoadResultReader<PagingLoadResult<ModelData>> reader = new JsonPagingLoadResultReader<PagingLoadResult<ModelData>>(
        type);
View Full Code Here

Examples of com.extjs.gxt.ui.client.data.DataField

    type.addField("title", "topic_title");
    type.addField("topicId", "topic_id");
    type.addField("author", "author");
    type.addField("excerpt", "post_text");

    DataField date = new DataField("lastPost", "post_time");
    date.setType(Date.class);
    date.setFormat("timestamp");
    type.addField(date);

    JsonPagingLoadResultReader<PagingLoadResult<ModelData>> reader = new JsonPagingLoadResultReader<PagingLoadResult<ModelData>>(
        type);
View Full Code Here

Examples of net.helipilot50.stocktrade.displayproject.DataField

     * Provided for backwards compatibility.
     * @param pFormat
     * @param pAlignment
     */
    public FormattedCellRenderer(Format pFormat, int pAlignment) {
      this(new DataField(pFormat));
      this.dataFieldCloned.setHorizontalAlignment(pAlignment);
    this.dataFieldCloned.getCaret().setVisible(false);
    }
View Full Code Here

Examples of net.sourceforge.jivalo.andromda.dgmm.DataField

    }
   
    public Object interpret()
    {
       
        DataField dataField = null;
       
        // TODO Auto-generated method stub
        if (redefines != null)
        {
            dataField = null;
        }
        else
        {
            if (!LevelNumberFactory.getInstance().getLevelNumber( "88" ).equals( this.level ))
            {
                JavaType type = ( JavaType ) pictureClause.interpret();
               
//                if (this.occurs > 0)
//                {
//                    dataField = new DataFieldArray(type.getType()
//                            , this.dataName, type.getLength()
//                            , type.getFraction(), this.occurs );
//                }
//                else
//                {
                    dataField = new DataField(type.getType(), this.dataName
                            , type.getLength(), type.getFraction());
//                }
            }
           
        }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField

            if (LOG.isDebugEnabled()) {
                LOG.debug("Class retrieved: {}", cl.getName());
            }

            for (Field field : cl.getDeclaredFields()) {
                DataField dataField = field.getAnnotation(DataField.class);
                if (dataField != null) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Position defined in the class: {}, position: {}, Field: {}",
                                new Object[]{cl.getName(), dataField.pos(), dataField});
                    }

                    if (dataField.required()) {
                        ++numberMandatoryFields;
                    } else {
                        ++numberOptionalFields;
                    }

                    int pos = dataField.pos();
                    if (annotatedFields.containsKey(pos)) {
                        Field f = annotatedFields.get(pos);
                        LOG.warn("Potentially invalid model: existing @DataField '{}' replaced by '{}'", f.getName(), field.getName());
                    }
                    dataFields.put(pos, dataField);
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField

        int counterMandatoryFields = 0;

        for (String data : tokens) {

            // Get DataField from model
            DataField dataField = dataFields.get(pos);
            ObjectHelper.notNull(dataField, "No position " + pos + " defined for the field: " + data + ", line: " + line);

            if (dataField.trim()) {
                data = data.trim();
            }

            if (dataField.required()) {
                // Increment counter of mandatory fields
                ++counterMandatoryFields;

                // Check if content of the field is empty
                // This is not possible for mandatory fields
                if (data.equals("")) {
                    throw new IllegalArgumentException("The mandatory field defined at the position " + pos + " is empty for the line: " + line);
                }
            }

            // Get Field to be setted
            Field field = annotatedFields.get(pos);
            field.setAccessible(true);

            if (LOG.isDebugEnabled()) {
                LOG.debug("Pos: {}, Data: {}, Field type: {}", new Object[]{pos, data, field.getType()});
            }

            // Create format object to format the field
            Format<?> format = FormatFactory.getFormat(field.getType(), getLocale(), dataField);

            // field object to be set
            Object modelField = model.get(field.getDeclaringClass().getName());

            // format the data received
            Object value = null;

            if (!data.equals("")) {
                try {
                    value = format.parse(data);
                } catch (FormatException ie) {
                    throw new IllegalArgumentException(ie.getMessage() + ", position: " + pos + ", line: " + line, ie);
                } catch (Exception e) {
                    throw new IllegalArgumentException("Parsing error detected for field defined at the position: " + pos + ", line: " + line, e);
                }
            } else {
                if (!dataField.defaultValue().isEmpty()) {
                    value = format.parse(dataField.defaultValue());
                } else {
                    value = getDefaultValueForPrimitive(field.getType());
                }
            }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField

        for (Field field : clazz.getDeclaredFields()) {

            field.setAccessible(true);

            DataField datafield = field.getAnnotation(DataField.class);

            if (datafield != null) {

                if (obj != null) {

                    // Retrieve the format, pattern and precision associated to the type
                    Class<?> type = field.getType();

                    // Create format
                    Format<?> format = FormatFactory.getFormat(type, getLocale(), datafield);

                    // Get field value
                    Object value = field.get(obj);

                    result = formatString(format, value);

                    if (datafield.trim()) {
                        result = result.trim();
                    }

                    if (datafield.clip() && result.length() > datafield.length()) {
                        result = result.substring(0, datafield.length());
                    }

                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Value to be formatted: {}, position: {}, and its formatted value: {}", new Object[]{value, datafield.pos(), result});
                    }

                } else {
                    result = "";
                }

                Integer key;

                if (isMessageOrdered() && obj != null) {

                    // Generate a key using the number of the section
                    // and the position of the field
                    Integer key1 = sections.get(obj.getClass().getName());
                    Integer key2 = datafield.position();
                    Integer keyGenerated = generateKey(key1, key2);

                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Key generated: {}, for section: {}", String.valueOf(keyGenerated), key1);
                    }

                    key = keyGenerated;

                } else {
                    key = datafield.pos();
                }

                if (!results.containsKey(key)) {
                    List<String> list = new LinkedList<String>();
                    list.add(result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.