Examples of Results


Examples of org.apache.isis.objectstore.sql.Results

        sql.append(" from ");
        sql.append(table);
        sql.append(" where ");
        appendCollectionWhereValues(connector, parent, sql);

        final Results rs = connector.select(sql.toString());

        final SpecificationLoaderSpi reflector = IsisContext.getSpecificationLoader();
        final JdbcPolymorphicObjectReferenceMapping idMapping =
            (JdbcPolymorphicObjectReferenceMapping) idMappingAbstract;

        while (rs.next()) {
            final ObjectSpecification itemSpecification = reflector.loadSpecification(rs.getString(classColumnName));
            idMapping.setObjectSpecification(itemSpecification);

            // Load new recordSet for the actual class
            final ObjectMapping itemMapper = objectMappingLookup.getMapping(itemSpecification, connector);
            final TypedOid oid = idMapping.recreateOid(rs, itemSpecification);
            final ObjectAdapter loadedObject = itemMapper.getObject(connector, oid);

            LOG.debug("  element  " + loadedObject.getOid());

            list.add(loadedObject);
        }
        rs.close();

    }
View Full Code Here

Examples of org.apache.isis.objectstore.sql.Results

        sql.append(" from ");
        sql.append(table);
        sql.append(" where ");
        appendCollectionWhereValues(connector, parent, sql);

        final Results rs = connector.select(sql.toString());
        while (rs.next()) {
            final Oid oid = idMappingAbstract.recreateOid(rs, specification);
            final ObjectAdapter element = getAdapter(specification, oid);
            loadFields(element, rs, fieldMappingByField);
            LOG.debug("  element  " + element.getOid());
            list.add(element);
        }
        rs.close();
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.objectstores.sql.Results

            sql.append(", ");
            elementMapping.appendColumnNames(sql);
            sql.append(" from ");
            sql.append(tableName);

            final Results rs = connector.select(sql.toString());
            final List<ObjectAdapter> list = new ArrayList<ObjectAdapter>();
            while (rs.next()) {
                final ObjectAdapter element = ((JdbcObjectReferenceMapping) elementMapping).initializeField(rs);
                LOG.debug("  element  " + element.getOid());
                list.add(element);
            }
            final CollectionFacet collectionFacet = collection.getSpecification().getFacet(CollectionFacet.class);
            collectionFacet.init(collection, list.toArray(new ObjectAdapter[list.size()]));
            rs.close();
            if (makeResolved) {
                PersistorUtil.end(collection);
            }
        }
    }
View Full Code Here

Examples of org.apache.struts2.convention.annotation.Results

     * @param results map of results
     * @param resultsByExtension  map of result types keyed by extension
     */
    protected void createResultsFromAnnotations(Class<?> actionClass, PackageConfig packageConfig, String defaultResultPath,
                                                Map<String, ResultConfig> results, Map<String, ResultTypeConfig> resultsByExtension) {
        Results resultsAnn = actionClass.getAnnotation(Results.class);
        if (resultsAnn != null) {
            createFromAnnotations(results, defaultResultPath, packageConfig, resultsAnn.value(),
                    actionClass, resultsByExtension);
        }

        Result resultAnn = actionClass.getAnnotation(Result.class);
        if (resultAnn != null) {
View Full Code Here

Examples of org.apache.uima.alchemy.digester.domain.Results

public class CategorizationJsonDigesterTest extends TestCase {

  public void testParseAlchemyXML() {
    try {
      JsonTextCategorizationDigester digester = new JsonTextCategorizationDigester();
      Results results = digester.parseAlchemyXML(this.getClass().getResourceAsStream(
              "/jsonCategorizationResult.js"));
      assertTrue(results != null);
    } catch (Exception e) {
      e.printStackTrace();
      fail();
View Full Code Here

Examples of org.easymock.internal.Results

    @Test
    public void emptyResults() {
        // We never create a Results without at least one Range
        // This test is only to unit test Results with this to cover the case anyway
        final Results results = new Results();
        assertFalse(results.hasResults());
        assertNull(results.next());
    }
View Full Code Here

Examples of org.geoserver.wps.gs.AggregateProcess.Results

                }

                // build the filter and gather the statistics
                Filter areaFilter = ff.within(ff.property(dataGeomName), ff.literal(zoneGeom));
                SimpleFeatureCollection zoneCollection = data.subCollection(areaFilter);
                Results stats = new AggregateProcess().execute(zoneCollection, dataAttribute,
                        FUNCTIONS, true, null);

                // build the resulting feature
                builder.addAll(zone.getAttributes());
                if(stats != null) {
                    builder.add(stats.getCount());
                    builder.add(stats.getMin());
                    builder.add(stats.getMax());
                    builder.add(stats.getSum());
                    builder.add(stats.getAverage());
                    builder.add(stats.getStandardDeviation());
                }
                return builder.buildFeature(zone.getID());
            } catch (Exception e) {
                throw new WPSException("Failed to compute statistics on feature " + zone, e);
            }
View Full Code Here

Examples of org.geotools.process.vector.AggregateProcess.Results

                }

                // build the filter and gather the statistics
                Filter areaFilter = ff.within(ff.property(dataGeomName), ff.literal(zoneGeom));
                SimpleFeatureCollection zoneCollection = data.subCollection(areaFilter);
                Results stats = new AggregateProcess().execute(zoneCollection, dataAttribute,
                        FUNCTIONS, true, null);

                // build the resulting feature
                builder.addAll(zone.getAttributes());
                if(stats != null) {
                    builder.add(stats.getCount());
                    builder.add(stats.getMin());
                    builder.add(stats.getMax());
                    builder.add(stats.getSum());
                    builder.add(stats.getAverage());
                    builder.add(stats.getStandardDeviation());
                }
                return builder.buildFeature(zone.getID());
            } catch (Exception e) {
                throw new ProcessException("Failed to compute statistics on feature " + zone, e);
            }
View Full Code Here

Examples of org.infinispan.schematic.SchemaLibrary.Results

     */
    public Problems validate() {
        if (problems == null) {
            SimpleProblems problems = new SimpleProblems();
            warnUseOfDeprecatedFields(problems);
            Results results = SCHEMA_LIBRARY.validate(doc, JSON_SCHEMA_URI);
            for (Problem problem : results) {
                switch (problem.getType()) {
                    case ERROR:
                        problems.addError(JcrI18n.configurationError, problem.getPath(), problem.getReason());
                        break;
View Full Code Here

Examples of org.jboss.dna.graph.Results

                                batch.read(nextPath);
                            }
                        }

                        // Load all of the nodes (we should be reading at least 2 nodes) ...
                        Results batchResults = batch.execute();

                        // Add the children and properties in the lowest cached node ...
                        Path previousPath = null;
                        Node<Payload, PropertyPayload> topNode = node;
                        Node<Payload, PropertyPayload> previousNode = node;
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.