Examples of EOEntityClassDescription


Examples of com.webobjects.eoaccess.EOEntityClassDescription

            attribute.setClassName(type);
          }
        }
        entity.addAttribute(attribute);
      }
      classDescription = new EOEntityClassDescription(entity);
      NSKeyValueCoding.Utility.takeValueForKey(entity, classDescription, "classDescription");
      EOClassDescription.registerClassDescription(classDescription, clazz);
      pojoModel.addEntity(entity);
    } else {
      // classDescription = entity.classDescriptionForInstances();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntityClassDescription

    return gids;
  }

  protected EOGlobalID readGID(DataInputStream dis) throws IOException {
    String entityName = dis.readUTF();
    EOEntityClassDescription classDescription = (EOEntityClassDescription) EOEntityClassDescription.classDescriptionForEntityName(entityName);
    return _readGID(classDescription, entityName, dis);
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntityClassDescription

        EOAccessArrayFaultHandler handler = (EOAccessArrayFaultHandler) EOFaultHandler.handlerForFault(obj);
        EOEditingContext ec = handler.editingContext();
        EOEnterpriseObject source = ec.faultForGlobalID(handler.sourceGlobalID(), ec);
        if (source instanceof AutoBatchFaultingEnterpriseObject) {
          String key = handler.relationshipName();
          EOEntityClassDescription cd = (EOEntityClassDescription) source.classDescription();
          EORelationship relationship = cd.entity().relationshipNamed(key);
          if (_handler.batchSizeForRelationship(ec, relationship) > 0) {
            markStart("ToMany.Calculation", source, key);
            NSArray<EOEnterpriseObject> candidates = null;
            NSArray currentObjects = (NSArray) ERXThreadStorage.valueForKey(THREAD_KEY);
            boolean fromThreadStorage = false;
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntityClassDescription

        EOGlobalID sourceGID = eo.batchFaultingSourceGlobalID();
        String key = eo.batchFaultingRelationshipName();
        if(sourceGID != null && key != null) {
          EOEditingContext ec = eo.editingContext();
          AutoBatchFaultingEnterpriseObject source = (AutoBatchFaultingEnterpriseObject) ec.faultForGlobalID(sourceGID, ec);
          EOEntityClassDescription cd = (EOEntityClassDescription)source.classDescription();
          EORelationship relationship = cd.entity().relationshipNamed(key);
          if(_handler.batchSizeForRelationship(ec, relationship) > 0 && !relationship.isToMany()) {
            markStart("ToOne.Calculation", source, key);
            long timestamp = source.batchFaultingTimeStamp();
            boolean fromThreadStorage = false;
            NSMutableArray<EOEnterpriseObject> eos = new NSMutableArray<EOEnterpriseObject>();
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntityClassDescription

    public static NSArray fakeRelationshipForKey(EOEnterpriseObject sourceObject, String relationshipKey, String destinationEntityName, String delimiter) {
  String selectionString = (String)sourceObject.valueForKey(relationshipKey);
  NSArray selectionsKeys = NSArray.componentsSeparatedByString(selectionString, delimiter);
  NSMutableArray selections = new NSMutableArray(selectionsKeys.count());
  Enumeration e = selectionsKeys.objectEnumerator();
  EOEntityClassDescription cd = (EOEntityClassDescription)EOClassDescription.classDescriptionForEntityName(destinationEntityName);
  NSArray pks = cd.entity().primaryKeyAttributes();

  if(pks.count() != 1) {
      throw new IllegalArgumentException("The destination entity's primary key can't be compound.");
  }
View Full Code Here

Examples of com.webobjects.eoaccess.EOEntityClassDescription

        return uiStyle;
    }

    boolean isMandatory() {
        if(!isMandatoryRead) {
      EOEntityClassDescription cd = (EOEntityClassDescription)EOClassDescription.classDescriptionForEntityName(sourceEntityName());
      isMandatory = !cd.entity().attributeNamed(destinationDisplayKey()).allowsNull();
      isMandatoryRead = true;
  }
        return isMandatory;
    }
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.