Package com.webobjects.eoaccess

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


            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

      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

        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

            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

      return null;
    }
   
    EOAttribute attribute = entity.primaryKeyAttributes().lastObject();
    String attrName = attribute.name();
    boolean isIntType = "i".equals(attribute.valueType());

    NSMutableArray<NSDictionary<String, Object>> results = new NSMutableArray<NSDictionary<String, Object>>(count);
    String sequenceName = _sequenceNameForEntity(entity);
    PostgresqlExpression expression = new PostgresqlExpression(entity);
   
View Full Code Here

      return null;
    }

    EOAttribute attribute = entity.primaryKeyAttributes().lastObject();
    String attrName = attribute.name();
    boolean isIntType = "i".equals(attribute.valueType());

    NSMutableArray<NSDictionary<String, Object>> results = new NSMutableArray<NSDictionary<String, Object>>(count);
    String sequenceName = _sequenceNameForEntity(entity);
    H2Expression expression = new H2Expression(entity);
View Full Code Here

      return null;
    }
   
    EOAttribute attribute = entity.primaryKeyAttributes().lastObject();
    String attrName = attribute.name();
    boolean isIntType = "i".equals(attribute.valueType());

    NSMutableArray results = new NSMutableArray(count);
    String sequenceName = sequenceNameForEntity(entity);
    DB2Expression expression = new DB2Expression(entity);
   
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.