Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSArray.valueForKey()


         */
        protected void registerDescriptionForClass(Class class1) {
            NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName());
            if (entities != null) {
                if (log.isDebugEnabled())
                    log.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name"));
                for (Enumeration e = entities.objectEnumerator(); e.hasMoreElements();) {
                    EOEntity entity = (EOEntity)e.nextElement();
                    ERXEntityClassDescription cd = newClassDescriptionForEntity(entity);
                    EOClassDescription.registerClassDescription(cd, class1);
                    _setClassDescriptionOnEntity(entity, cd);
View Full Code Here


        EOQualifier aQualifier = new EOAndQualifier(new NSArray(new Object[] { aPathQualifier, aNotQualifier }));
        EOFetchSpecification aFetchSpecification = new EOFetchSpecification("FSDirectory", aQualifier, null);
        EOEditingContext anEditingContext = new EOEditingContext();
        NSArray someObjects = anEditingContext.objectsWithFetchSpecification(aFetchSpecification);

        System.out.println("Fetch result for '" + aQualifier + "': " + someObjects.valueForKey("name"));

        if (someObjects != null) {
            EOEnterpriseObject anObject = (EOEnterpriseObject) someObjects.lastObject();
            NSArray someFiles = (NSArray) anObject.valueForKey("files");
            NSArray someDirectories = (NSArray) anObject.valueForKey("directories");
View Full Code Here

            System.out.println("anObject name: " + anObject.valueForKey("name"));
            System.out.println("someFiles.count: " + someFiles.count());
            System.out.println("someFiles.name: " + someFiles.valueForKey("name"));
            System.out.println("someFiles.content.length: " + someFiles.valueForKeyPath("content.length"));
            System.out.println("someDirectories.count: " + someDirectories.count());
            System.out.println("someDirectories.name: " + someDirectories.valueForKey("name"));
        }
        EOClassDescription aClassDescription = EOClassDescription.classDescriptionForEntityName("FSDirectory");
        EOEnterpriseObject anObject = aClassDescription.createInstanceWithEditingContext(anEditingContext, null);
        anObject.takeValueForKey((System.getProperty("user.home") + File.separator + "FSItemInsertTest"), "absolutePath");
View Full Code Here

        return _appenders;
    }

    public NSArray levelsWithoutUnset() {
        NSArray applicableLevels = ERXArrayUtilities.arrayMinusObject(new NSArray(LoggerLevel.values()), LoggerLevel.UNSET);
        return (NSArray)applicableLevels.valueForKey("level");
    }

    public LoggerLevel currentAppenderLevel() {
        Priority threshold = anAppender.getThreshold();
        return LoggerLevel.loggerLevelForLog4JLevel(threshold != null ? Level.toLevel(threshold.toInt()) : null);
View Full Code Here

            }
            log.debug("Fetching primary keys.");
            NSArray primaryKeyDictionaries = editingContext().objectsWithFetchSpecification(pkFetchSpec);

            String pkAttributeName = entity.primaryKeyAttributes().lastObject().name();
            primaryKeys = (NSArray)primaryKeyDictionaries.valueForKey(pkAttributeName);
            if (performDistinctInMemory) {
              primaryKeys = ERXArrayUtilities.arrayWithoutDuplicates(primaryKeys);
            }
        }
        return primaryKeys;
View Full Code Here

                int relCount = relationships.count();
                for (int j = 0; j < relCount; j++) {
                    EORelationship currentRelationship = ((EORelationship) relationships.objectAtIndex(j));
                    if (_shouldGenerateForeignKeyConstraints(currentRelationship)) {
                        NSArray statements = foreignKeyConstraintStatementsForRelationship(currentRelationship);
                        if (!generatedStatements.containsObject(statements.valueForKey("statement"))) {
                            result.addObjectsFromArray(statements);
                            generatedStatements.addObject(statements.valueForKey("statement"));
                        }
                    }
                }
View Full Code Here

                    EORelationship currentRelationship = ((EORelationship) relationships.objectAtIndex(j));
                    if (_shouldGenerateForeignKeyConstraints(currentRelationship)) {
                        NSArray statements = foreignKeyConstraintStatementsForRelationship(currentRelationship);
                        if (!generatedStatements.containsObject(statements.valueForKey("statement"))) {
                            result.addObjectsFromArray(statements);
                            generatedStatements.addObject(statements.valueForKey("statement"));
                        }
                    }
                }
            }
        }
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.