Package org.geomajas.layer.feature

Examples of org.geomajas.layer.feature.Attribute


    }
    ((LongAttribute) attribute).setValue(value);
  }

  public void setShortAttribute(String name, Short value) {
    Attribute attribute = getAttributes().get(name);
    if (!(attribute instanceof ShortAttribute)) {
      throw new IllegalStateException("Cannot set short value on attribute with different type, " +
          attribute.getClass().getName() + " setting value " + value);
    }
    ((ShortAttribute) attribute).setValue(value);
  }
View Full Code Here


    }
    ((ShortAttribute) attribute).setValue(value);
  }

  public void setStringAttribute(String name, String value) {
    Attribute attribute = getAttributes().get(name);
    if (!(attribute instanceof StringAttribute)) {
      throw new IllegalStateException("Cannot set boolean value on attribute with different type, " +
          attribute.getClass().getName() + " setting value " + value);
    }
    ((StringAttribute) attribute).setValue(value);
  }
View Full Code Here

    }
    ((StringAttribute) attribute).setValue(value);
  }

  public void setUrlAttribute(String name, String value) {
    Attribute attribute = getAttributes().get(name);
    if (!(attribute instanceof UrlAttribute)) {
      throw new IllegalStateException("Cannot set url value on attribute with different type, " +
          attribute.getClass().getName() + " setting value " + value);
    }
    ((UrlAttribute) attribute).setValue(value);
  }
View Full Code Here

    }
    ((UrlAttribute) attribute).setValue(value);
  }

  public void setManyToOneAttribute(String name, AssociationValue value) {
    Attribute attribute = getAttributes().get(name);
    if (!(attribute instanceof ManyToOneAttribute)) {
      throw new IllegalStateException("Cannot set manyToOne value on attribute with different type, " +
          attribute.getClass().getName() + " setting value " + value);
    }
    ((ManyToOneAttribute) attribute).setValue(value);
  }
View Full Code Here

    }
    ((ManyToOneAttribute) attribute).setValue(value);
  }

  public void addOneToManyValue(String name, AssociationValue value) {
    Attribute attribute = getAttributes().get(name);
    if (!(attribute instanceof OneToManyAttribute)) {
      throw new IllegalStateException("Cannot set oneToMany value on attribute with different type, " +
          attribute.getClass().getName() + " setting value " + value);
    }
    OneToManyAttribute oneToMany = (OneToManyAttribute) attribute;
    if (oneToMany.getValue() == null) {
      oneToMany.setValue(new ArrayList<AssociationValue>());
    }
View Full Code Here

TOP

Related Classes of org.geomajas.layer.feature.Attribute

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.