Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOEntityClassDescription.entity()


        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


        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

  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

    }

    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.