Package com.webobjects.eoaccess

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


                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

            }

            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

        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

            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

        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

   *
   * @return true if the 'keyWhenRelationship' is the name of an attribute
   */
  public boolean useFetch() {
    EOEntity entity = EOUtilities.entityNamed(ec(), destinationEntityName());
    return (entity.attributeNamed(keyWhenRelationship()) != null);
  }
 
  @SuppressWarnings("unchecked")
  public NSArray<EOEnterpriseObject> destinationObjectsWithQualifier(EOQualifier qual) {
    NSArray<EOEnterpriseObject> result = null;
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.