Examples of attributeNamed()


Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

        String externalName = entity.externalName();
        if (externalName != null) {
          // If you have a parent entity and that parent entity shares your table name, then you're single table inheritance
          boolean singleTableInheritance = (parentEntity != null && externalName.equals(parentEntity.externalName()));
          if (singleTableInheritance) {
            EOAttribute parentAttribute = parentEntity.attributeNamed(attribute.name());
            if (parentAttribute == null) {
              // If this attribute is new in the subclass, you have to allow nulls
              shouldAllowNull = true;
            }
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

            boolean validIndex = false;
            localBuf.append("create index " + indexName + " on " + entity.externalName() + "(");
            for (Enumeration<String> attributes = NSArray.componentsSeparatedByString(attributeNames, ",").objectEnumerator(); attributes.hasMoreElements();) {
              String attributeName = attributes.nextElement();
              attributeName = attributeName.trim();
              EOAttribute attribute = entity.attributeNamed(attributeName);
              if (attribute == null) {
                attribute = ERXEOAccessUtilities.attributeWithColumnNameFromEntity(attributeName, entity);
              }
              if (attribute != null && externalTypesToIgnore.indexOfObject(attribute.externalType()) != NSArray.NotFound) {
                continue;
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

            boolean validIndex = false;
            localBuf.append("create index " + indexName + " on " + entity.externalName() + "(");
            for (Enumeration e = NSArray.componentsSeparatedByString(indexValues, ",").objectEnumerator(); e.hasMoreElements();) {
              String attributeName = (String) e.nextElement();
              attributeName = attributeName.trim();
              EOAttribute attribute = entity.attributeNamed(attributeName);

              if (attribute == null) {
                attribute = ERXEOAccessUtilities.attributeWithColumnNameFromEntity(attributeName, entity);
              }
              if (attribute != null && externalTypesToIgnore.indexOfObject(attribute.externalType()) != NSArray.NotFound) {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

     */
    public EOAttribute attribute() {
        EOAttribute attribute = null;
        if (eoObject() != null) {
            EOEntity entity = EOUtilities.entityForObject(eoObject().editingContext(), eoObject());
            attribute = entity != null ? entity.attributeNamed(propertyKey()) : null;
        }
        return attribute;
    }
   
    /**
 
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

        }
        if (count == 0) {
          EOFetchSpecification fetchSpec = new EOFetchSpecification(migrationTableName(adaptor), new EOKeyValueQualifier("modelName", EOQualifier.QualifierOperatorEqual, model.name()), null);
          NSDictionary nextRow;
          try {
            channel.selectAttributes(new NSArray<EOAttribute>(dbUpdaterEntity.attributeNamed("updateLock")), fetchSpec, false, dbUpdaterEntity);
            nextRow = channel.fetchRow();
          }
          finally {
            channel.cancelFetch();
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

    try {
      EOModel dbUpdaterModel = dbUpdaterModelWithModel(model, adaptor);
      EOEntity dbUpdaterEntity = dbUpdaterModel.entityNamed(migrationTableName(adaptor));
      EOFetchSpecification fetchSpec = new EOFetchSpecification(migrationTableName(adaptor), new EOKeyValueQualifier("modelName", EOQualifier.QualifierOperatorEqual, model.name()), null);
      try {
        channel.selectAttributes(new NSArray<EOAttribute>(dbUpdaterEntity.attributeNamed("version")), fetchSpec, false, dbUpdaterEntity);
        NSDictionary nextRow = channel.fetchRow();
        if (nextRow == null) {
          version = initialVersionForModel(model);
        }
        else {
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

                entity=ERXEOAccessUtilities.entityNamed(object.editingContext(), objectForPropertyDisplayed.entityName());
                lastKey=ERXStringUtilities.lastPropertyKeyInKeyPath(key);
            }
        }
        if (entity!=null && lastKey!=null) {
            EOAttribute a=entity.attributeNamed(lastKey);
            NSDictionary userInfo=null;
            if (a!=null) userInfo=a.userInfo();
            else {
                EORelationship r=entity.relationshipNamed(lastKey);
                if (r!=null) userInfo=r.userInfo();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

            }

            Enumeration partialAttributes = partialExtensionEntity.attributes().objectEnumerator();
            while (partialAttributes.hasMoreElements()) {
              EOAttribute partialAttribute = (EOAttribute) partialAttributes.nextElement();
              if (partialEntity.attributeNamed(partialAttribute.name()) == null) {
                NSMutableDictionary<String, Object> attributePropertyList = new NSMutableDictionary<String, Object>();
                partialAttribute.encodeIntoPropertyList(attributePropertyList);
                String factoryMethodArgumentType = (String) attributePropertyList.objectForKey("factoryMethodArgumentType");
                // OFFICIALLY THE DUMBEST DAMN THING I'VE EVER
                // SEEN
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

        String externalName = entity.externalName();
        if (externalName != null) {
          // If you have a parent entity and that parent entity shares your table name, then you're single table inheritance
          boolean singleTableInheritance = (parentEntity != null && externalName.equals(parentEntity.externalName()));
          if (singleTableInheritance) {
            EOAttribute parentAttribute = parentEntity.attributeNamed(attribute.name());
            if (parentAttribute == null) {
              // If this attribute is new in the subclass, you have to allow nulls
              shouldAllowNull = true;
            }
          }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntity.attributeNamed()

            constraint.append('_');
            if (j != 0)
              pkSql.append(',');

            pkSql.append("\"");
            String columnName = entity.attributeNamed(keys.objectAtIndex(j)).columnName();
            pkSql.append(columnName.toUpperCase());
            pkSql.append("\"");
            constraint.append(columnName);
          }
          constraint.append("\"");
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.