Package org.jasig.portal.services

Examples of org.jasig.portal.services.EntityCachingService


    int idx = 0;
    IBasicEntity ent = null;
    int adds = 100;
    Class type = MINIMAL_ENTITY_CLASS;

    EntityCachingService service = EntityCachingService.instance();

    msg = "Adding " + adds + " entities to the cache.";
    print(msg);
    for(idx=0; idx<adds; idx++)
        { service.add(testEntities[idx]); }

    msg = "Retrieving entities from the cache.";
    print(msg);
    for(idx=0; idx<adds; idx++)
    {
        ent = service.get(type, testEntityKeys[idx] );
        assertEquals(msg, ent, testEntities[idx]);
    }

    msg = "Removing entities from the cache.";
    print(msg);
    for(idx=0; idx<numTestEntities; idx++)
    {
        service.remove( type, testEntityKeys[idx] );
        ent = service.get( type, testEntityKeys[idx] );
        assertNull(msg, ent);
    }

    print("***** LEAVING EntityCacheTester.testEntityCachingServiceAddsAndDeletes() *****");

 
View Full Code Here

TOP

Related Classes of org.jasig.portal.services.EntityCachingService

Copyright © 2018 www.massapicom. 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.