Package org.compass.core

Examples of org.compass.core.CompassCallback


    private CompassHitsOperations getHits(final String searchString,
            final int start, final int max_num_hits,
            final String[] aliases) {

        CompassHitsOperations hits = compassTemplate
                .executeFind(new CompassCallback() {
                    public Object doInCompass(CompassSession session)
                            throws CompassException {

                        CompassHits hits = session.queryBuilder()
                                .queryString(searchString).toQuery()
View Full Code Here


            }

            final String[] aliases = { "school" };
            final String searchString = sb.toString();

            compassTemplate.execute(new CompassCallback() {
                public Object doInCompass(CompassSession session)
                        throws CompassException {

                    CompassHits hits = session.queryBuilder()
                            .queryString(searchString).toQuery()
View Full Code Here

        final List ids = getIds(args);
        final List objects = getObjects(args);

        validateArguments(args, clazz, ids, objects, options);

        return doInCompass(new CompassCallback() {
            public Object doInCompass(CompassSession session) throws CompassException {
                CompassOperations compassOperations = session;
                if (!objects.isEmpty()) {
                    for (Iterator iter = objects.iterator(); iter.hasNext(); ) {
                        compassOperations.delete(iter.next());
View Full Code Here

        if (args.length == 0 || (args.length == 1 && args[0] instanceof Map && clazz != null)) {
            CompassGpsUtils.index(compassGps, clazz);
            return null;
        }

        return doInCompass(new CompassCallback() {
            public Object doInCompass(CompassSession session) throws CompassException {
                List objectsToSave = objects;
                if (clazz != null && !ids.isEmpty()) {
                    Assert.isTrue(objects.isEmpty(), "Either provide ids or objects, not both");
                    objectsToSave = (List) InvokerHelper.invokeStaticMethod(clazz, "getAll", ids);
View Full Code Here

TOP

Related Classes of org.compass.core.CompassCallback

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.