Package org.structr.core.converter

Examples of org.structr.core.converter.PropertyConverter.convert()


                  Object convertedValue = val;

                  PropertyConverter inputConverter = propertyKey.inputConverter(SecurityContext.getSuperUserInstance());
                  if (inputConverter != null) {

                    convertedValue = inputConverter.convert(val);
                  }

                  //newNode.unlockReadOnlyPropertiesOnce();
                  newNode.setProperty(propertyKey, convertedValue);
View Full Code Here


        final App app                          = StructrApp.getInstance(securityContext);
        final PropertyKey key                  = notion.getPrimaryPropertyKey();
        final PropertyConverter inputConverter = key.inputConverter(securityContext);

        // transform search values using input convert of notion property
        final Object transformedValue          = inputConverter != null ? inputConverter.convert(searchValue) : searchValue;

        if (exactMatch) {

          Result<AbstractNode> result = app.nodeQuery(entityProperty.relatedType()).and(key, transformedValue).getResult();
View Full Code Here

    PropertyConverter converter = databaseConverter(securityContext, obj);
    final Object convertedValue;

    if (converter != null) {

      convertedValue = converter.convert(value);

    } else {

      convertedValue = value;
    }
View Full Code Here

              PropertyConverter inputConverter = StructrApp.getConfiguration().getPropertyKeyForJSONName(cls, key).inputConverter(securityContext);


              if (inputConverter != null) {
                try {
                  val = inputConverter.convert(entry.getValue());
                } catch (FrameworkException ex) {
                  logger.log(Level.SEVERE, null, ex);
                }

              } else {
View Full Code Here

        for (String part : requestParameter.split("[,;]+")) {
          sources.add(part);
        }
      }

      return (List<T>)inputConverter.convert(sources);
    }

    return null;
  }
View Full Code Here

          PropertyConverter converter = propertyKey.databaseConverter(securityContext, entity);

          if (converter != null) {

            try {
              Object propertyValue = converter.convert(value);
              resultMap.put(propertyKey, propertyValue);

            } catch(ClassCastException cce) {

              cce.printStackTrace();
View Full Code Here

          PropertyConverter converter = propertyKey.inputConverter(securityContext);

          if (converter != null) {

            try {
              Object propertyValue = converter.convert(value);
              resultMap.put(propertyKey, propertyValue);

            } catch(ClassCastException cce) {

              cce.printStackTrace();
View Full Code Here

    PropertyConverter inputConverter = inputConverter(securityContext);
    Object convertedSearchValue      = requestParameter;

    if (inputConverter != null) {

      convertedSearchValue = inputConverter.convert(convertedSearchValue);
    }

    return (T)convertedSearchValue;
  }
View Full Code Here

          Object rangeStartConverted = rangeStart;
          Object rangeEndConverted = rangeEnd;

          if (inputConverter != null) {

            rangeStartConverted = inputConverter.convert(rangeStartConverted);
            rangeEndConverted = inputConverter.convert(rangeEndConverted);
          }

          query.andRange(this, rangeStartConverted, rangeEndConverted);
View Full Code Here

          Object rangeEndConverted = rangeEnd;

          if (inputConverter != null) {

            rangeStartConverted = inputConverter.convert(rangeStartConverted);
            rangeEndConverted = inputConverter.convert(rangeEndConverted);
          }

          query.andRange(this, rangeStartConverted, rangeEndConverted);

          return;
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.