Package org.eurekastreams.commons.search.modelview

Examples of org.eurekastreams.commons.search.modelview.ModelView


        maps.add(buildMap(DomainGroup.class, 9L));
        maps.add(buildMap(Person.class, 1L));
        maps.add(buildMap(DomainGroup.class, 1L));

        // ModelViews that the mocked mappers will return - numbers describe their order
        final ModelView person2 = buildModelView(new PersonModelView(), 3L);
        final ModelView group4 = buildModelView(new DomainGroupModelView(), 9L);
        final ModelView person5 = buildModelView(new PersonModelView(), 1L);
        final ModelView group7 = buildModelView(new DomainGroupModelView(), 1L);

        // the list of Group IDs we expect to be sent to the group mapper
        final List<Long> expectedGroupIdList = new ArrayList<Long>();
        expectedGroupIdList.add(9L);
        expectedGroupIdList.add(1L);
View Full Code Here


            throw new IllegalArgumentException(message);
        }
        Class< ? > modelClass = modelToViewClassMap.get(entityClass);

        // instantiate, load the properties, and return the ModelView
        ModelView modelView = (ModelView) reflectiveInstantiator.instantiateObject(modelClass);
        modelView.loadProperties(properties);

        // If the ComplexExplanation is included, populate the ModelView with
        // it. These properties can't be imported by the ModelView because that
        // class needs to only deal with simple objects that GWT can support -
        // ComplexExplanation not being one of them.
        if (properties.containsKey("__HSearch_Explanation"))
        {
            Explanation explanation = (Explanation) properties.get("__HSearch_Explanation");
            modelView.setSearchIndexExplanationString(explanation.toString());
        }

        return modelView;
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.search.modelview.ModelView

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.