Package java.util

Examples of java.util.Collection.addAll()


            if (ap != null) {
                Collection newAp = (Collection)newRoot.getProperty(NodeConstants.Info.ACCESS_PATTERNS);
                if (newAp == null) {
                    newRoot.setProperty(NodeConstants.Info.ACCESS_PATTERNS, ap);
                } else {
                    newAp.addAll(ap);
                }
            }
            RulePlaceAccess.copyDependentHints(frame, newRoot);
        }
    }
View Full Code Here


              if (keys != null) {
                keys = new ArrayList<Object>(keys);
              } else {
                keys = new ArrayList<Object>(2);
              }
              keys.addAll(metadata.getIndexesInGroup(group.getMetadataID()));
            }
           
            if(keys != null && keys.size() > 0) {
                // For each key, get key elements
              for (Object key : keys) {
View Full Code Here

                    writeMethod.invoke(object, new ArrayList<Object>());
                  }
                  if (readMethod != null){
                    Collection objectList = (Collection) readMethod.invoke(object);
                    if(objectList != null){
                      objectList.addAll(populatedObjects);
                    }else{
                      if(traceEnabled)
                        traceLog.warn("List property dont have write method. Also read method returned null. " +
                            "Ignoring json value for list " + prop.getName());
                    }
View Full Code Here

      @SuppressWarnings("rawtypes")
      Collection newCollection = (Collection<?>)getNewInstance(clazz);
            //create an object for each element
            if (itemClass.equals(Object.class)) {
                //Object[]
              newCollection.addAll(values);
                if(traceEnabled)
                  traceLog.warn(String.format("Unparameterazed list with object type found. accessor: \"%s\" class: %s",
                      accessor.getName(),accessor.getDeclaringClass()));
            } else if (isJSONPrimitive(itemClass)) {
                //primitive array
View Full Code Here

        }

        // Validate this query's entitlements
        Collection entitledObjects = GroupCollectorVisitor.getGroups(obj, true);
        if (!isXMLCommand(obj)) {
            entitledObjects.addAll(ElementCollectorVisitor.getElements(obj, true));
        }

        if(entitledObjects.size() == 0) {
            return;
        }
View Full Code Here

    try {
      InitialContext ic = CVUtility.getInitialContext();
      EventsLocalHome home = (EventsLocalHome)ic.lookup("local/Events");
      EventsLocal local = home.create();
      local.setDataSource(this.dataSource);
      returnCollection.addAll(local.getAttendeesForEvent(userID, eventID));
    } // end of try block
    catch (Exception exe) {
      exe.printStackTrace();
    } // end of catch block (Exception)
    return returnCollection;
View Full Code Here

      }
    }

    //Fill in old values in new Collection
    if (existingCollection != null) {
      result.addAll((Collection) existingCollection);
    }

    //Add the new value:
    //For an ordered Collection
    if (result instanceof List) {
View Full Code Here

    public String[] getExtends(JavaClass javaClass) {
        Collection extendsLst = new ArrayList();
        EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName(TagLibrary.EJB_HOME);

        if ((homeTag != null) && (homeTag.getExtends() != null)) {
            extendsLst.addAll(Arrays.asList(homeTag.getExtends()));
        }

        if (!extendsLst.contains("javax.ejb.EJBHome")) {
            extendsLst.add("javax.ejb.EJBHome");
        }
View Full Code Here

        for (Iterator iter = roleTags.iterator(); iter.hasNext();) {
            RoleList roleLst = (RoleList) iter.next();

            if (roleLst != null && roleLst.getRoleNames() != null) {
                roles.addAll(Arrays.asList(roleLst.getRoleNames()));
            }
        }

        return roles;
    }
View Full Code Here

                    "Couldn't resolve role-names for method permission" +
                    (version.greaterOrEquals(EjbVersion.EJB_2_0) ? " or unchecked is false" : ""));
            }

            // Lets expand by permission for interface type
            retLst.addAll(MethodPermission.unroll(permType, permTag.getRoleNames()));
        }

        // Now let's dig into method level ejb.permission tags
        JavaMethod[] methods = javaClass.getMethods();
        JavaMethod method;
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.