Package er.indexing

Examples of er.indexing.ERIndex


        try {
            Tag tag = Tag.clazz.allObjects(ec).lastObject();
            Asset asset = Asset.clazz.allObjects(ec).lastObject();
            AssetGroup assetGroup = AssetGroup.clazz.allObjects(ec).lastObject();
            // new DataCreator().createDummyData();
            ERIndex eofStore = ERIndex.indexNamed("AssetInEOFStore");
            ERIndex fileStore = ERIndex.indexNamed("AssetInFileStore");
            EOQualifier tagQualifier = new EOKeyValueQualifier("tags.name", EOQualifier.QualifierOperatorEqual, tag.name());
            EOQualifier groupQualifier = new EOKeyValueQualifier("assetGroup.name", EOQualifier.QualifierOperatorEqual, tag.name());
            log.info("fileStore: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore: " + eofStore.findGlobalIDs(tagQualifier).count());
            log.info("fileStore: " + fileStore.findGlobalIDs(groupQualifier).count());
            log.info("eofStore: " + eofStore.findGlobalIDs(groupQualifier).count());
           
            String newName = "cooltest";
            tagQualifier = new EOKeyValueQualifier("tags.name", com.webobjects.eocontrol.EOQualifier.QualifierOperatorEqual, newName);
            tag.setName(newName + " " + System.currentTimeMillis());
            ec.saveChanges();
           
            assetGroup.setName(newName + "  " + System.currentTimeMillis());
            ec.saveChanges();
            log.info("fileStore 1: " + fileStore.findGlobalIDs(tagQualifier).count());
            log.info("eofStore 1: " + eofStore.findGlobalIDs(tagQualifier).count());
            try {
                if(true) {
                    Thread.sleep(2000);
                }
                log.info("fileStore 2: " + fileStore.findGlobalIDs(tagQualifier).count());
                log.info("eofStore 2: " + eofStore.findGlobalIDs(tagQualifier).count());
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
View Full Code Here

TOP

Related Classes of er.indexing.ERIndex

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.