Examples of FeatureBean


Examples of org.geomajas.layer.bean.FeatureBean

      return new FeatureEntity((FeatureBean) object);
    }

    public Entity findOrCreateEntity(String dataSourceName, Object id) throws LayerException {
      if (dataSourceName.equals(FeatureBean.class.getName())) {
        return new FeatureEntity(new FeatureBean());
      }
      if (dataSourceName.equals(ManyToOneAttributeBean.class.getName())) {
        return new ManyToOneEntity(new ManyToOneAttributeBean());
      }
      throw new LayerException();
View Full Code Here

Examples of org.geomajas.layer.bean.FeatureBean

    Iterator<FeatureBean> iterator =
        (Iterator<FeatureBean>) beanLayer.getElements(filterService.createTrueFilter(), 0, 0);
    int count = 0;
    int check = 0;
    while (iterator.hasNext()) {
      FeatureBean featureBean = iterator.next();
      count++;
      if (3 == featureBean.getId()) {
        Assert.assertEquals("changed", featureBean.getStringAttr());
      }
      check |= 1 << (featureBean.getId() - 1);
    }
    Assert.assertEquals(3, count);
    Assert.assertEquals(7, check);
  }
View Full Code Here

Examples of org.geomajas.layer.bean.FeatureBean

    Iterator<FeatureBean> iterator =
        (Iterator<FeatureBean>) beanLayer.getElements(filterService.createTrueFilter(), 0, 0);
    int count = 0;
    int check = 0;
    while (iterator.hasNext()) {
      FeatureBean featureBean = iterator.next();
      count++;
      check |= 1 << (featureBean.getId() - 1);
    }
    Assert.assertEquals(4, count);
    Assert.assertEquals(15, check);

    // now delete again
    Filter filter = filterService.createFidFilter(new String[]{"4"});
    oldFeatures = layerService.getFeatures(LAYER_ID,
        crs, filter, null, VectorLayerService.FEATURE_INCLUDE_ATTRIBUTES);
    Assert.assertEquals(1, oldFeatures.size());
    newFeatures = new ArrayList<InternalFeature>();
    layerService.saveOrUpdate(LAYER_ID, crs, oldFeatures, newFeatures);

    iterator = (Iterator<FeatureBean>) beanLayer.getElements(filterService.createTrueFilter(), 0, 0);
    count = 0;
    check = 0;
    while (iterator.hasNext()) {
      FeatureBean featureBean = iterator.next();
      count++;
      check |= 1 << (featureBean.getId() - 1);
    }
    Assert.assertEquals(3, count);
    Assert.assertEquals(7, check);

  }
View Full Code Here

Examples of org.geomajas.layer.bean.FeatureBean

  @Autowired
  private org.geomajas.security.SecurityManager securityManager;

  @Before
  public void init() {
    featureBean = new FeatureBean();
    featureBean.setId(TEST_ID);
    featureBean.setStringAttr(TEST_STRING);
    featureBean.setIntegerAttr(TEST_INTEGER);
    featureBean.setBooleanAttr(true);
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.