Package org.geomajas.layer.bean

Examples of org.geomajas.layer.bean.ManyToOneAttributeBean


    attributes.put("manyToOneAttr", new ManyToOneAttribute(value));
    service.setAttributes(bean, layerBeans.getLayerInfo().getFeatureInfo(), new DummyMapper(), attributes);
    Assert.assertNotNull(bean.getManyToOneAttr());
    Assert.assertEquals("mto",bean.getManyToOneAttr().getStringAttr());
    // test replacing
    ManyToOneAttributeBean original = new ManyToOneAttributeBean();
    original.setId(5L);
    original.setStringAttr("original");
    bean.setManyToOneAttr(original);
    service.setAttributes(bean, layerBeans.getLayerInfo().getFeatureInfo(), new DummyMapper(), attributes);
    Assert.assertNotNull(bean.getManyToOneAttr());
    // should be replaced
    Assert.assertNotSame(original,bean.getManyToOneAttr());
View Full Code Here


    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

TOP

Related Classes of org.geomajas.layer.bean.ManyToOneAttributeBean

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.