Examples of allValues()


Examples of com.webobjects.foundation.NSDictionary.allValues()

    return pk == null ? null : ERXCrypto.crypterForAlgorithm(ERXCrypto.BLOWFISH).encrypt(pk);
  }

  public Object foreignKeyForRelationshipWithKey(String rel) {
    NSDictionary d = EOUtilities.destinationKeyForSourceObject(editingContext(), this, rel);
    return d != null && d.count() > 0 ? d.allValues().objectAtIndex(0) : null;
  }

  public NSArray<String> primaryKeyAttributeNames() {
    return entity().primaryKeyAttributeNames();
  }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

    }
   
    public NSArray messages(){
        NSDictionary md = this.messageDictionary();
        if( md != null ){
            return md.allValues();
        }
       return NSArray.EmptyArray;
    }
   
    public NSArray messagesForAttribute(){
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

    }

    public NSArray messages(){
        if( showAllErrors() ){
            NSDictionary md = messageDictionary();
            if( md != null ) return md.allValues();
            else return NSArray.EmptyArray;
        } else {
            NSMutableArray array = new NSMutableArray();
            NSDictionary d2 = exception().userInfo();
            if( d2 != null ){
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

    public static NSArray primaryKeysForObjects(NSArray<? extends EOEnterpriseObject> eos) {
        NSMutableArray result = new NSMutableArray();
        if (eos != null) {
            for (EOEnterpriseObject target : eos) {
                NSDictionary pKey = EOUtilities.primaryKeyForObject(target.editingContext(), target);
                result.addObject(pKey.allValues().objectAtIndex(0));
            }
        }
        return result;
    }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

         */
        public void traverseForObjects(NSArray sourceObjects, boolean skipFaultedSourceObjects) {
            if (sourceObjects == null || sourceObjects.count() < 1) return;

            NSDictionary objectsByEntity = splitObjectsByEntity(sourceObjects);
            Enumeration e = objectsByEntity.allValues().objectEnumerator();
            while (e.hasMoreElements()) {
                NSArray homogeniousObjects = (NSArray) e.nextElement();
                traverseForHomogeniousObjects(homogeniousObjects, skipFaultedSourceObjects);
            }
        }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

      result = EOUtilities.rawRowsForSQL(ec, model.name(), sql, null);
    }

    if (result.count() > 0) {
      NSDictionary dict = (NSDictionary) result.objectAtIndex(0);
      NSArray values = dict.allValues();
      if (values.count() > 0) {
        Object value = values.objectAtIndex(0);
        if (value instanceof Number) {
          return ((Number) value).intValue();
        }
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

    NSArray array = EOUtilities.rawRowsForSQL(ec, modelName, sqlForGetNextValFromSequencedNamed(sequenceName), null);
    if (array.count() == 0) {
      throw new RuntimeException("Unable to generate value from sequence named: " + sequenceName + " in model: " + modelName);
    }
    NSDictionary dictionary = (NSDictionary) array.objectAtIndex(0);
    NSArray valuesArray = dictionary.allValues();
    return (Number) valuesArray.objectAtIndex(0);
  }

  /**
   * Creates a where clause string " someKey IN ( someValue1,...)". Can
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

    /* (non-Javadoc)
     * @see er.extensions.ERXEnterpriseObject#foreignKeyForRelationshipWithKey(java.lang.String)
     */
    public Object foreignKeyForRelationshipWithKey(String rel) {
        NSDictionary d=EOUtilities.destinationKeyForSourceObject(editingContext(), this, rel);
        return d != null && d.count()>0 ? d.allValues().objectAtIndex(0) : null;
    }


    /* (non-Javadoc)
     * @see er.extensions.ERXEnterpriseObject#primaryKeyAttributeNames()
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

            // Get the primary key of the object
            NSArray pkValues = ERXEOControlUtilities.primaryKeyArrayForObject(eo);
            if( pkValues == null && eo instanceof ERXGeneratesPrimaryKeyInterface) {
                NSDictionary pkDict = ((ERXGeneratesPrimaryKeyInterface)eo).primaryKeyDictionary(false);
                if( pkDict != null )
                    pkValues = pkDict.allValues();
            }
            if(pkValues == null)
                throw new RuntimeException("Primary key is null for object: " + eo);
            String pk = pkValues.componentsJoinedByString( AttributeValueSeparator );
           
View Full Code Here

Examples of com.webobjects.foundation.NSDictionary.allValues()

          expression.setStatement(sql.toString());
          channel.evaluateExpression(expression);
          try {
            NSDictionary row;
            while ((row = channel.fetchRow()) != null) {
              Enumeration pksEnum = row.allValues().objectEnumerator();
              while (pksEnum.hasMoreElements()) {
                Number pkObj = (Number)pksEnum.nextElement();
                Number pk;
                if (isIntType) {
                  pk = Integer.valueOf(pkObj.intValue());
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.