Examples of classPropertyNames()


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

   
    public NSArray<String> attributes() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().attributeKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

   
    public NSArray<String> toOneRelationships() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().toOneRelationshipKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

   
    public NSArray<String> toManyRelationships() {
        NSMutableArray<String> result = new NSMutableArray<String>();
        EOEntity entity = entity();
        for (String key : (NSArray<String>)displayPropertyKeys()) {
            if(entity.classDescriptionForInstances().toManyRelationshipKeys().containsObject(key) && entity.classPropertyNames().containsObject(key)) {
                result.addObject(key);
            }
        }
        return result;
    }
View Full Code Here

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

                            value = ec.committedSnapshotForObject(eo);
                        }

                        EOEntity source = ERXEOAccessUtilities.entityForEo(eo);

                        if (source.classPropertyNames().containsObject(key)) {
                            value = eo.valueForKey(key);
                        } else {
                            if (eo.isNewObject()) {
                                if (!_warned.containsObject(entityName)) {
                                    log.error("We currently don't support unsaved related objects for this entity: " + entityName);
View Full Code Here

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

        if(entityName != null) {
            // FIXME: Should try for the 'object' in the context and use the
            //    model group from the object's ec.
            EOEntity e = EOModelGroup.defaultGroup().entityNamed(entityName);
            log.debug("embeddedEntityName = " + entityName);
            NSMutableArray classProperties = e.classPropertyNames().mutableClone();
            NSArray relationships = (NSArray)e.relationships().valueForKey("name");
            classProperties.removeObjectsInArray(relationships);
            return classProperties.immutableClone();
        }
       
View Full Code Here

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

        EOEditingContext ec = eo.editingContext();
        EOEntity entity = EOUtilities.entityNamed(ec, eo.entityName());
        NSArray<String> pkAttributes = entity.primaryKeyAttributeNames();
        int count = pkAttributes.count();
        NSMutableDictionary<String, Object> nsmutabledictionary = new NSMutableDictionary<String, Object>(count);
        NSArray classPropertyNames = entity.classPropertyNames();
        while (count-- != 0) {
            String key = pkAttributes.objectAtIndex(count);
            if(!classPropertyNames.containsObject(key))
                return null;
            Object value = eo.valueForKey(key);
View Full Code Here

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

    /*
     * Snapshot should have same values as the eo and committed snapshot should be all
     * null values as eo has not yet been saved.
     */
    EOEntity entity = employee.entity();
    for (String key : (NSArray<String>) entity.classPropertyNames()) {
      Object snapshotValue = snapshot.valueForKey(key);
      assertEquals(employee.valueForKey(key), ERXValueUtilities.isNull(snapshotValue) ? null : snapshotValue);
      assertTrue(ERXValueUtilities.isNull(committedSnapshot.valueForKey(key)));
    }
   
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.