Examples of valueType()


Examples of com.typesafe.config.ConfigValue.valueType()

        /* look for normal, explicit type syntax. ie. "{type: my-type, val: my-val}" */
        String classField = pluginMap.classField();
        ConfigValue typeValue = configObject.get(classField);
        if (typeValue != null) {
            if (typeValue.valueType() != ConfigValueType.STRING) {
                throw new ConfigException.WrongType(typeValue.origin(), classField,
                                                    "STRING", typeValue.valueType().toString());
            }
            String stype = (String) typeValue.unwrapped();
            try {
View Full Code Here

Examples of com.typesafe.config.ConfigValue.valueType()

        String classField = pluginMap.classField();
        ConfigValue typeValue = configObject.get(classField);
        if (typeValue != null) {
            if (typeValue.valueType() != ConfigValueType.STRING) {
                throw new ConfigException.WrongType(typeValue.origin(), classField,
                                                    "STRING", typeValue.valueType().toString());
            }
            String stype = (String) typeValue.unwrapped();
            try {
                Class<T> normalType = (Class<T>) pluginMap.getClass(stype);
                ConfigObject aliasDefaults = pluginMap.aliasDefaults(stype);
View Full Code Here

Examples of com.typesafe.config.ConfigValue.valueType()

        Config fieldDefaults = classInfo.getFieldDefaults();
        Collection<String> unusedKeys = new HashSet<>(config.root().keySet());

        ConfigValue fieldAliasesValue = config.root().get("_rename");
        ConfigObject fieldAliases;
        if ((fieldAliasesValue != null) && (fieldAliasesValue.valueType() != ConfigValueType.NULL)) {
            fieldAliases = (ConfigObject) fieldAliasesValue;
        } else {
            fieldAliases = ConfigFactory.empty().root();
        }
View Full Code Here

Examples of com.typesafe.config.ConfigValue.valueType()

        }

        ConfigValue primaryFieldNameValue = config.root().get("_primary");
        String primaryFieldName = null;
        boolean usedPrimaryField = false;
        if ((primaryFieldNameValue != null) && (primaryFieldNameValue.valueType() != ConfigValueType.NULL)) {
            primaryFieldName = (String) primaryFieldNameValue.unwrapped();
        }

        for (CodableFieldInfo field : classInfo.values()) {
            if (field.isWriteOnly()) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOAttribute.valueType()

    }
    EOAttribute pkAttribute = (EOAttribute) pkAttributes.objectAtIndex(0);
    int nextSequence = store.nextSequence();
    Object pkValue;
    String className = pkAttribute.className();
    String valueType = pkAttribute.valueType();
    if ("NSData".equals(className)) {
      pkValue = new NSData(String.valueOf(nextSequence).getBytes());
    }
    else {
      if (valueType == null || "i".equals(valueType)) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOAttribute.valueType()

            if (d2wContext.valueForKey(ValidationKeys.MinimumInputValue) != null) {
                throw ERXValidationFactory.defaultFactory().createCustomException(null, key, value, "QueryValueRequired");
            }
        } else {
            EOAttribute attribute = d2wContext.attribute();
            String valueType = attribute.valueType();

            if ("s".equals(valueType) || "i".equals(valueType) || "l".equals(valueType)) { // Short or Integer or Long
                long longValue = value.longValue();
                if (hasValidationDefinitionForKey(ValidationKeys.MinimumInputValue)) {
                    Long minimumValue = ERXValueUtilities.longValue(d2wContext().valueForKey(ValidationKeys.MinimumInputValue));
View Full Code Here

Examples of com.webobjects.eoaccess.EOAttribute.valueType()

      throw new ERLuceneAdaptorException("Failed to generate primary key because " + entity.name() + " has a composite primary key.");
    }
    EOAttribute pkAttribute = (EOAttribute) pkAttributes.objectAtIndex(0);
    Object pkValue = null;
    String className = pkAttribute.className();
    String valueType = pkAttribute.valueType();
    if ("com.webobjects.foundation.NSData".equals(className)) {
//      if(true==false) {
//        ByteArrayBuffer buf = new ByteArrayBuffer();
//        try {
//          buf.write(entity.externalName().getBytes());
View Full Code Here

Examples of com.webobjects.eoaccess.EOAttribute.valueType()

        for (EORelationship relationship : (NSArray<EORelationship>)entity.relationships()) {
          for (EOJoin join : (NSArray<EOJoin>)relationship.joins()) {
            EOAttribute sourceAttribute = join.sourceAttribute();
            EOAttribute destinationAttribute = join.destinationAttribute();
            if (sourceAttribute != null && destinationAttribute != null) {
              if (ObjectUtils.notEqual(sourceAttribute.className(), destinationAttribute.className()) || ObjectUtils.notEqual(sourceAttribute.valueType(), destinationAttribute.valueType())) {
                if (!ERXProperties.booleanForKey("er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch")) {
                  throw new RuntimeException("The attribute " + sourceAttribute.name() + " in " + sourceAttribute.entity().name() + " (" + sourceAttribute.className() + ", " + sourceAttribute.valueType() + ") is a foreign key to " + destinationAttribute.name() + " in " + destinationAttribute.entity().name() + " (" + destinationAttribute.className() + ", " + destinationAttribute.valueType() + ") but their class names or value types do not match.  If this is actually OK, you can set er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch=true in your Properties file.");
                }
              }
            }
View Full Code Here

Examples of com.webobjects.eoaccess.EOAttribute.valueType()

            EOAttribute sourceAttribute = join.sourceAttribute();
            EOAttribute destinationAttribute = join.destinationAttribute();
            if (sourceAttribute != null && destinationAttribute != null) {
              if (ObjectUtils.notEqual(sourceAttribute.className(), destinationAttribute.className()) || ObjectUtils.notEqual(sourceAttribute.valueType(), destinationAttribute.valueType())) {
                if (!ERXProperties.booleanForKey("er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch")) {
                  throw new RuntimeException("The attribute " + sourceAttribute.name() + " in " + sourceAttribute.entity().name() + " (" + sourceAttribute.className() + ", " + sourceAttribute.valueType() + ") is a foreign key to " + destinationAttribute.name() + " in " + destinationAttribute.entity().name() + " (" + destinationAttribute.className() + ", " + destinationAttribute.valueType() + ") but their class names or value types do not match.  If this is actually OK, you can set er.extensions.ERXModelGroup." + sourceAttribute.entity().name() + "." + sourceAttribute.name() + ".ignoreTypeMismatch=true in your Properties file.");
                }
              }
            }
          }
        }
View Full Code Here

Examples of com.webobjects.foundation.NSKeyValueCoding._KeyBinding.valueType()

      if (index < 0) {
        return WOHelperFunctionClassKeyValueCoding.DefaultImplementation._keyGetBindingForKey(objectClass, keyPath);
      }
      String key = keyPath.substring(0, index);
      _KeyBinding keyBinding = WOHelperFunctionClassKeyValueCoding.DefaultImplementation._keyGetBindingForKey(objectClass, key);
      return keyBinding != null ? WOHelperFunctionClassKeyValueCoding.DefaultImplementation.keyGetBindingForKeyPath(keyBinding.valueType(), keyPath.substring(index + 1)) : null;
    }

    DefaultImplementation() {
      throw new IllegalStateException("Cannot instantiate an instance of class " + getClass().getName());
    }
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.