Examples of Field


Examples of com.talosdigital.cotejo.entity.Field

 
  @Test
  public void testGetFieldById(){
    when(fieldDao.getFieldById(FIELD_ID)).thenReturn(field);
    when(field.getId()).thenReturn(FIELD_ID);
    Field tempField = fieldService.getFieldById(FIELD_ID);
    assertEquals(FIELD_ID, tempField.getId());
  }
View Full Code Here

Examples of com.taobao.tddl.interact.bean.Field

    Map<String, Field> tbNames = topology.get(dbIndex);
    if (tbNames == null) {
      tbNames = new HashMap<String, Field>();
      topology.put(dbIndex, tbNames);
    }
    Field f = tbNames.get(tbName);
    if (f == null) {
      f = new Field(tbParams.size());
      tbNames.put(tbName, f);
    }
    for (AdvancedParameter ap : tbParams) {
      Set<Object> set = f.sourceKeys.get(ap.key);
      if (set == null) {
View Full Code Here

Examples of com.thoughtworks.xstream.tools.benchmark.xmlfriendly.targets.Field$Reflection

        stats.addMetric(new CharacterCountMetric('$'));
        stats.addMetric(new CharacterCountMetric('_'));
        stats.addProduct(new NoReplacer());
        stats.addTarget(new FieldReflection());
        stats.addTarget(new Field_Reflection());
        stats.addTarget(new Field$Reflection());
        stats.run(new MultiReporter(reporters) {

            public void endBenchmark() {
                // do nothing
            }

        });

        Harness harness = new Harness();
        harness.addMetric(new SerializationSpeedMetric(100));
        harness.addMetric(new DeserializationSpeedMetric(100, false));
        harness.addProduct(new CombinedLookupReplacer(0));
        // harness.addProduct(new CombinedLookupReplacer(32));
        harness.addProduct(new CombinedLookupAppender(0));
        // harness.addProduct(new CombinedLookupAppender(32));
        harness.addProduct(new SeparateLookupReplacer(0));
        // harness.addProduct(new SeparateLookupReplacer(32));
        harness.addProduct(new IterativeReplacer(0));
        // harness.addProduct(new IterativeReplacer(32));
        harness.addProduct(new IterativeAppender(0));
        // harness.addProduct(new IterativeAppender(32));
        harness.addProduct(new IterativeAppenderWithShortcut());
        harness.addProduct(new CachingIterativeAppenderWithShortcut());
        harness.addTarget(new FieldReflection());
        harness.addTarget(new Field_Reflection());
        harness.addTarget(new Field$Reflection());
        harness.run(new MultiReporter(reporters) {

            public void startBenchmark() {
                // do nothing
            }
View Full Code Here

Examples of com.totsp.gwittir.client.ui.table.Field

        base.getFlexCellFormatter().setColSpan(2, 0, 2);
        base.setWidget(3, 0, notes);
        base.getFlexCellFormatter().setColSpan(3, 0, 2);
        p.add(base);
        p.add(new Label("Addresses:"));
        addressCols[0] = new Field("type", "Type");
        addressCols[1] = new Field("address1", "Address");
        addressCols[2] = new Field("address2", "");
        addressCols[3] = new Field("city", "City");
        addressCols[4] = new Field("state", "State");
        addressCols[5] = new Field("zip", "Zip");

        factory.add(StateLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    Label label = new Label();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((StateLookup) o).code;
                            }
                        });

                    return label;
                }
            });

        factory.add(TypeLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    TextBox label = new TextBox();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((TypeLookup) o).name;
                            }
                        });

                    return label;
                }
            });
        factory.add(String.class, BoundWidgetTypeFactory.LABEL_PROVIDER);
        factory.add(Address.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    AddressEdit e = new AddressEdit();
                    e.setAction(new AddressEditAction());

                    return e;
                }
            });

        addresses = new BoundTable(BoundTable.HEADER_MASK +
                BoundTable.SORT_MASK + BoundTable.NO_SELECT_CELL_MASK +
                BoundTable.NO_SELECT_COL_MASK//+ BoundTable.MULTIROWSELECT_MASK
                 + BoundTable.INSERT_WIDGET_MASK, factory);
        addresses.setColumns(addressCols);

        addresses.setWidth("500px");
        p.add(addresses);
        p.add(this.newAddress);
        p.add(new Label("Phone Numbers: "));

        phoneCols[0] = new Field("type", "Type");
        phoneCols[1] = new Field("number", "Number");

        BoundWidgetTypeFactory phoneFactory = new BoundWidgetTypeFactory(true);
        phoneFactory.add(TypeLookup.class, TypeSelectorProvider.INSTANCE);

        this.phoneNumbers = new BoundTable(BoundTable.HEADER_MASK +
View Full Code Here

Examples of com.twitter.elephantbird.thrift.TStructDescriptor.Field

        pObj = tuple.get(i);
      } catch (ExecException e) {
        throw new RuntimeException(e);
      }
      if (pObj != null) {
        Field field = tDesc.getFieldAt(i);
        try {
          tObj.setFieldValue(field.getFieldIdEnum(), toThriftValue(field, pObj));
        } catch (Exception e) {
          String value = String.valueOf(tObj);
          final int max_length = 100;
          if (max_length < value.length()) {
            value = value.substring(0, max_length - 3) + "...";
          }
          String type = tObj == null ? "unknown" : tObj.getClass().getName();
          throw new RuntimeException(String.format(
              "Failed to set field '%s' using tuple value '%s' of type '%s' at index %d",
              field.getName(), value, type, i), e);
        }
      }
      // if tDesc is a union, at least one field needs to be non-null.
      // user is responsible for ensuring that.
    }
View Full Code Here

Examples of com.vaadin.ui.Field

             */
            if (propertyId.equals("secondaryTypes")) {
                return getSecondaryTypesList(itemId);
            }

            final Field f = super.createField(container, itemId, propertyId,
                    uiContext);
            if (f != null) {
                if (f instanceof TextField) {
                    TextField tf = (TextField) f;
                    tf.setWidth("100%");
                }
                if (propertyId.equals("kilometers")) {
                    f.setWidth("4em");
                    f.addValidator(new Validator() {
                        @Override
                        public void validate(Object value)
                                throws InvalidValueException {
                            // FIXME this does not follow the standard pattern
                            // for validators and has side effects!
                            try {
                                @SuppressWarnings("unused")
                                float f = Float.parseFloat((String) value);
                            } catch (Exception e) {
                                Notification.show("Bad number value");
                                f.setValue(0);
                            }
                        }
                    });
                }
                if (propertyId.equals("date")) {
View Full Code Here

Examples of com.volantis.devrep.device.api.xml.definitions.Field

    private void dumpStructure(StringBuffer buffer, String indent,
            Structure structure) {
        buffer.append(indent + "type=Structure\n");
        Iterator fields = structure.fields();
        while (fields.hasNext()) {
            Field field = (Field) fields.next();
            buffer.append(indent + "  Field:\n");
            buffer.append(indent + "    name=" + field.getName() + "\n");
            dumpType(field.getType(), indent + "    ", buffer);
        }
    }
View Full Code Here

Examples of com.youtube.vitess.vtgate.Field

    for (Object field : fields) {
      BSONObject fieldBson = (BSONObject) field;
      String fieldName = new String((byte[]) fieldBson.get("Name"));
      int mysqlType = Ints.checkedCast((Long) fieldBson.get("Type"));
      FieldType fieldType = FieldType.get(mysqlType);
      fieldList.add(new Field(fieldName, fieldType));
    }
    return fieldList;
  }
View Full Code Here

Examples of de.fub.bytecode.classfile.Field

      if (signature.equals(DOM_IMPL_SIG))
    signature = classGen.getDOMClassSig();

      // Add a new field to this class
      if (classGen.containsField(name) == null) {
    classGen.addField(new Field(ACC_PUBLIC,
              cpg.addUtf8(name),
              cpg.addUtf8(signature),
              null, cpg.getConstantPool()));

    // Push a reference to "this" for putfield
View Full Code Here

Examples of de.mhus.lib.adb.model.Field

    }
  }

  public Field createField(DbManager manager, Table table, String name, boolean pk, boolean virtual, Method setter, Method getter, Class<?> ret, IConfig attr,DbDynamic.Field dynamicField) {

    Field field = null;
    if (virtual)
      field = new FieldVirtual( table, name, pk, setter, getter, ret, attr );
    else
      field = new FieldPersistent( manager, table, name, pk, setter, getter, ret, attr, dynamicField );
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.