Package java.util

Examples of java.util.Collection.clear()


            String objectType = LifeCycleManager.ORGANIZATION;

            Organization pubSource = (Organization) bqm.getRegistryObject(sourceid, objectType);
            assertNotNull("Source Org", pubSource.getName().getValue());

            orgs.clear();
            orgs.add(target);
            br = blm2.saveOrganizations(orgs);
            if (br.getExceptions() != null)
            {
                fail("Target:: Save Organizations failed");
View Full Code Here


            String objectType = LifeCycleManager.ORGANIZATION;
            Organization pubSource = (Organization) bqm.getRegistryObject(sourceId, objectType);
            assertNotNull("Source retrieved: ", pubSource.getName().getValue());

            orgs.clear();
            orgs.add(target);
            br = blm2.saveOrganizations(orgs);
            if (br.getExceptions() != null)
            {
                fail("Target:Save Orgs failed");
View Full Code Here

            // we need to remove the join entries), or there are no FKs specified (in which case we need to clean up)
            if (!(value instanceof SCO))
            {
                value = (Collection)sm.wrapSCOField(fmd.getAbsoluteFieldNumber(), value, false, false, true);
            }
            value.clear();
            ((SCOCollection)value).flush();
        }
    }

    // ------------------------------- JDOQL Query Methods --------------------------------------
View Full Code Here

        Iterator pairsIterator = pairs.iterator();
        while (pairsIterator.hasNext())
        {
            Map.Entry keyValuePair=(Map.Entry) pairsIterator.next();
            Collection coll=(Collection)keyValuePair.getValue();
            coll.clear();
        }
        super.clear();
    }

    /**
 
View Full Code Here

            // we need to remove the join entries), or there are no FKs specified (in which case we need to clean up)
            if (!(value instanceof SCO))
            {
                value = (Collection)sm.wrapSCOField(mmd.getAbsoluteFieldNumber(), value, false, false, true);
            }
            value.clear();
            ((SCOCollection)value).flush();
        }
    }
}
View Full Code Here

        Collection coll = ( Collection ) testProp;
        assertEquals( 1, coll.size() );
        assertEquals( STRING_VALUE, coll.iterator().next() );

        // modify the array property
        coll.clear();
        coll.add( STRING_VALUE2 );

        // the array element change must not be reflected in the configuration
        Dictionary newProps2 = cimpl.getProperties();
        Object testProp2 = newProps2.get( COLLECTION );
View Full Code Here

        // ensure that no two entries are equal using the equality method
        // of the element objects.  MailAddress objects test equality based
        // on equivalent but not necessarily visually identical addresses.
        Collection recipients = mail.getRecipients();
        // Wipe all the exist recipients
        recipients.clear();
        recipients.addAll(getHeaderMailAddresses(message, "Mail-For"));
        if (recipients.isEmpty()) {
            recipients.addAll(getHeaderMailAddresses(message, "To"));
            recipients.addAll(getHeaderMailAddresses(message, "Cc"));
        }
View Full Code Here

        Column[] cols;
        Collection unmappedCols = new ArrayList(5);
        for (int i = 0; i < schemas.length; i++) {
            tables = schemas[i].getTables();
            for (int j = 0; j < tables.length; j++) {
                unmappedCols.clear();
                cols = tables[j].getColumns();
                for (int k = 0; k < cols.length; k++)
                    if (cols[k].getRefCount() == 0)
                        unmappedCols.add(cols[k]);
View Full Code Here

        try {
            coll = getProxyManager().copyCollection(orig);
        } catch (Exception e) {
            coll = (Collection) _sm.newFieldProxy(vmd.getFieldMetaData().getIndex());
        }
        coll.clear();
        for (Iterator itr = orig.iterator(); itr.hasNext();)
            coll.add(embed(vmd, itr.next()));
        return coll;
    }
View Full Code Here

        em = emf.createEntityManager();
        pc = em.find(ManagedIface.class, oid);
        set = pc.getSetI();
        assertEquals(4, set.size());
        seen.clear();
        for (Iterator it = set.iterator(); it.hasNext();) {
            rel = (ManagedIface) it.next();
            seen.add(new Integer(rel.getIntField()));
        }
        assertEquals(4, seen.size());
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.