Package org.structr.core.property

Examples of org.structr.core.property.BooleanProperty$DatabaseConverter


              if (!key.startsWith(DATA_META_PREFIX)) {

                if (value != null) {
                  if (value.equalsIgnoreCase("true")) {
                    newNode.setProperty(new BooleanProperty(key), true);
                  } else if (value.equalsIgnoreCase("false")) {
                    newNode.setProperty(new BooleanProperty(key), false);
                  } else {
                    newNode.setProperty(new StringProperty(key), nodeAttr.getValue());
                  }
                }

              } else {

                int l = DATA_META_PREFIX.length();

                String upperCaseKey = WordUtils.capitalize(key.substring(l), new char[]{'-'}).replaceAll("-", "");
                String camelCaseKey = key.substring(l, l + 1).concat(upperCaseKey.substring(1));

                if (value != null) {
                  if (value.equalsIgnoreCase("true")) {
                    newNode.setProperty(new BooleanProperty(camelCaseKey), true);
                  } else if (value.equalsIgnoreCase("false")) {
                    newNode.setProperty(new BooleanProperty(camelCaseKey), false);
                  } else {
                    newNode.setProperty(new StringProperty(camelCaseKey), nodeAttr.getValue());
                  }
                }
View Full Code Here

TOP

Related Classes of org.structr.core.property.BooleanProperty$DatabaseConverter

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.