Package ch.semafor.gendas.model

Examples of ch.semafor.gendas.model.Property


      }
      element.setVersion(v); // property must be Int of Long!!
    } else {
      try {
        final PropertyType propType = propertyTypeDao.findByName(propName);
        Property prop = element.getProperty(propType);
        if (prop == null) {
          prop = new Property(element, propType);
        }
        if (value instanceof java.util.List) {
          List l = (java.util.List) value;
          logger.debug("setting {} properties of \"{}\"", l.size(), prop.getType().getName());
          for (int i = 0; i < l.size(); i++) {
            setPropertyValue(prop, i, retType, l.get(i));
          }
        } else {
          setPropertyValue(prop, 0, retType, value);
        }
        if (logger.isDebugEnabled()) {
          logger.debug("adding property \"{}\"", prop.getType().getName());
        }
      } catch (CoreException ex) {
        logger.info(ex.getMessage());
      }
    }
View Full Code Here


   */
  private void setProperty(final String propName, final Object value,
      final Class retType, final Element element) {
      try {
        final PropertyType propType = propertyTypeDao.findByName(propName);
        Property prop = element.getProperty(propType);
        if (prop == null) {
          prop = new Property(element, propType);
        }
        if (value instanceof java.util.List) {
          List l = (java.util.List) value;
          logger.debug("setting {} properties of \"{}\"", l.size(), prop.getType().getName());
          for (int i = 0; i < l.size(); i++) {
            setPropertyValue(prop, i, retType, l.get(i));
          }
        } else {
          setPropertyValue(prop, 0, retType, value);
        }
        if (logger.isDebugEnabled()) {
          logger.debug("adding property \"{}\"", prop.getType().getName());
        }
      } catch (CoreException ex) {
        logger.info(ex.getMessage());
      }
    }
View Full Code Here

TOP

Related Classes of ch.semafor.gendas.model.Property

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.