Examples of classDescription()


Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

    for (Enumeration iter = list.objectEnumerator(); iter.hasMoreElements();) {
      Object o = iter.nextElement();

      EOEnterpriseObject eo = recordForObject(ec, o);
      ec = eo.editingContext();
      cd = eo.classDescription();
      objects.addObject(eo);
    }
    EOArrayDataSource ds = new EOArrayDataSource(cd, ec);
    ds.setArray(objects);
    return ds;
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

   
    // accessors
    public EODetailDataSource detailDataSource() {
      if (detailDataSource == null) {
        EOEnterpriseObject object = (EOEnterpriseObject) valueForBinding("object");
        detailDataSource = new EODetailDataSource(object.classDescription(), key());
        detailDataSource.qualifyWithRelationshipKey(key(), object);
        detailDataSource.fetchObjects();
      } return detailDataSource;
    }
   
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

     */
    public static EOArrayDataSource dataSourceForArray(NSArray<? extends EOEnterpriseObject> array) {
        EOArrayDataSource dataSource = null;
        if (array != null && array.count() > 0) {
            EOEnterpriseObject eo = array.objectAtIndex(0);
            dataSource = new EOArrayDataSource(eo.classDescription(), eo.editingContext());
            dataSource.setArray(array);
        }
        return dataSource;
    }

View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

        Object value = null;
        String key = key();
        if(object instanceof EOEnterpriseObject) {
            EOEnterpriseObject eo = (EOEnterpriseObject)object;
            EOEditingContext ec = eo.editingContext();
            EOClassDescription cd = eo.classDescription();
            if (cd.attributeKeys().containsObject(key)) {
                value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(eo, key);
            } else if (cd.toOneRelationshipKeys().containsObject(key)) {
                value = eo.valueForKeyPath(key);
            } else if (EOUtilities.entityNamed(ec, eo.entityName()).primaryKeyAttributeNames().containsObject(key)) {
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

    public boolean evaluateWithObject(Object object) {
        Object value = null;
        if(object instanceof EOEnterpriseObject) {
            EOEnterpriseObject eo = (EOEnterpriseObject)object;
            EOEditingContext ec = eo.editingContext();
            if(eo.classDescription().attributeKeys().containsObject(key())) {
                value = NSKeyValueCodingAdditions.Utility.valueForKeyPath(eo, key());
            } else if(EOUtilities.entityNamed(ec, eo.entityName()).primaryKeyAttributeNames().containsObject(key())) {
                // when object is an EO and key() is a cross-relationship keypath, we drop through to this case
                // and we'll fail.
                value = EOUtilities.primaryKeyForObject(ec,eo).objectForKey(key());
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

     *    in the array.
     */
    protected static String primaryKeyNameForObjects(NSArray eos) {
        validateObjects(eos);
        EOEnterpriseObject eo = (EOEnterpriseObject)eos.lastObject();
        EOEntity entity = ((EOEntityClassDescription)eo.classDescription()).entity();
        if (entity.primaryKeyAttributeNames().count() != 1)
            throw new IllegalStateException("Attempting to construct a qualifier for an entity with a compound primary key: " + entity);
        return entity.primaryKeyAttributeNames().lastObject();
    }

View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

        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);
View Full Code Here

Examples of com.webobjects.eocontrol.EOEnterpriseObject.classDescription()

            NSMutableArray faults = new NSMutableArray();
            for (EOEnterpriseObject current : candidates) {
              if (current instanceof AutoBatchFaultingEnterpriseObject) {
                AutoBatchFaultingEnterpriseObject currentEO = (AutoBatchFaultingEnterpriseObject) current;
                if (currentEO.batchFaultingTimeStamp() == timestamp || fromThreadStorage) {
                  if (!EOFaultHandler.isFault(currentEO) && currentEO.classDescription() == source.classDescription()) {
                    Object fault = currentEO.storedValueForKey(key);
                    if (EOFaultHandler.isFault(fault)) {
                      faults.addObject(fault);
                      eos.addObject(currentEO);
                      if (eos.count() == autoBatchFetchSize()) {
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.