Examples of allowsNull()


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

                EORelationship relationship = (EORelationship)relationships.nextElement();
                if(!relationship.isToMany()) {
                    if(relationship.isMandatory()) {
                        for(Enumeration attributes = relationship.sourceAttributes().objectEnumerator(); attributes.hasMoreElements(); ) {
                            EOAttribute attribute = (EOAttribute)attributes.nextElement();
                            if(attribute.allowsNull()) {
                                handleMandatoryRelationshipError(eoentity, relationship, attribute);
                            }
                        }
                    } else {
                        for(Enumeration attributes = relationship.sourceAttributes().objectEnumerator(); attributes.hasMoreElements(); ) {
View Full Code Here

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

                            }
                        }
                    } else {
                        for(Enumeration attributes = relationship.sourceAttributes().objectEnumerator(); attributes.hasMoreElements(); ) {
                            EOAttribute attribute = (EOAttribute)attributes.nextElement();
                            if(!attribute.allowsNull() && !primaryKeys.containsObject(attribute)) {
                                handleOptionalRelationshipError(eoentity, relationship, attribute);
                            }
                        }
                    }
                }
View Full Code Here

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

      Object parsedValue;
      if (value == null || ERXValueUtilities.isNull(value) || (value instanceof String && ((String) value).length() == 0)) {
        if (parentEntity != null) {
          if (parentEntity instanceof EOEntityClassDescription) {
            EOAttribute attribute = ((EOEntityClassDescription)parentEntity).entity().attributeNamed(attributeName);
            if (attribute != null && !attribute.allowsNull() && String.class.isAssignableFrom(valueType)) {
              parsedValue = "";
            }
            else {
              parsedValue = EOKeyValueCoding.NullValue;
            }
View Full Code Here

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

        if (entity != null) {
          attribute = entity.attributeNamed(key.key());
        }
        NSMutableDictionary<String, Object> property = new NSMutableDictionary<String, Object>();

        boolean optional = attribute != null && attribute.allowsNull();
        property.setObjectForKey(optional, "optional");

        Class<?> attributeClass = classDescription.classForAttributeKey(key.key());
        if (String.class.isAssignableFrom(attributeClass)) {
          property.setObjectForKey("string", "type");
View Full Code Here

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

    }
   
    @Override
    public NSArray<EOSQLExpression> statementsToRenameColumnNamed(String columnName, String tableName, String newName, EOSchemaGenerationOptions options) {
        EOAttribute attribute = attributeInEntityWithColumnName(entityForTableName(tableName), newName);
        String nullStatement = attribute.allowsNull() ? " NULL" : " NOT NULL";
        String externalType = columnTypeStringForAttribute(attribute);
        return new NSArray<EOSQLExpression>(_expressionForString(new StringBuilder().append("ALTER TABLE ").append(formatTableName(tableName)).append(" CHANGE ").append(formatColumnName(columnName)).append(' ').append(formatColumnName(newName)).append(' ').append(externalType).append(nullStatement).toString()));
    }
   
    @Override
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.