Examples of SdeRow


Examples of org.geotools.arcsde.session.SdeRow

                    seQuery.execute();
                    return seQuery;
                }
            });

            SdeRow row = session.fetch(seQuery);
            assertNull(row);
        } finally {
            session.dispose();
        }
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

            // The row id column is not returned, but the geometry column is (x+1-1=x)
            assertEquals("Verify attribute count.", columnNames.length, ftype.getAttributeCount());
            ArcSDEQuery query = ArcSDEQuery.createQuery(session, ftype, Query.ALL,
                    FIDReader.NULL_READER, ArcSdeVersionHandler.NONVERSIONED_HANDLER);
            query.execute();
            SdeRow row = query.fetch();
            assertNotNull("Verify first result is returned.", row);
            Object longString = row.getObject(0);
            assertNotNull("Verify the non-nullity of first CLOB.", longString);
            assertEquals("Verify stringiness.", longString.getClass(), String.class);
            row = query.fetch();
            longString = row.getObject(0);
            assertNotNull("Verify the non-nullity of second CLOB.", longString);
            query.close();
        } finally {
            if (session != null) {
                session.dispose();
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

                return query;
            }
        });

        try {
            SdeRow row = session.fetch(query);

            int count = 0;
            final int childIdIndex = 2;
            while (row != null) {
                // duplicate shapes are not returned by arcsde.
                // in that case indicator has the value
                // SeRow.SE_IS_REPEATED_FEATURE
                int indicator = row.getIndicator(shapeIndex);
                Integer childId = row.getInteger(childIdIndex);
                assertEquals(expectedChildIds[count], childId);

                // this seems to be DB dependent, on SQLSever repeated shapes have
                // SeRow.SE_IS_REPEATED_FEATURE
                // indicator, on Oracle they're returned as SE_IS_NOT_NULL_VALUE
                // assertEquals("at index " + count, expectedShapeIndicators[count], indicator);

                if (SeRow.SE_IS_NOT_NULL_VALUE == indicator) {
                    Object shape = row.getObject(shapeIndex);
                    assertTrue(shape.getClass().getName(), shape instanceof SeShape);
                }

                count++;
                row = session.fetch(query);
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

                return query;
            }
        });

        try {
            SdeRow row = session.fetch(query);
            int count = 0;
            while (row != null) {
                // we would expect SeShape being returned from shapeIndex, but
                // ArcSDE returns shape id
                if (SeRow.SE_IS_NOT_NULL_VALUE == row.getIndicator(shapeIndex)) {
                    Object shape = row.getObject(shapeIndex);
                    // assertTrue(shape.getClass().getName(), shape instanceof
                    // SeShape);
                    assertFalse(shape.getClass().getName(), shape instanceof SeShape);
                }
                count++;
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

                query.execute();
                return query;
            }
        });
        try {
            SdeRow row = session.fetch(query);
            int count = 0;
            while (row != null) {
                // duplicate shapes are not returned by arcsde.
                // in that case indicator has the value
                // SeRow.SE_IS_REPEATED_FEATURE
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

                return query;
            }
        });

        try {
            SdeRow row = session.fetch(query);
            int count = 0;
            while (row != null) {
                Object shape = row.getObject(shapeIndex);
                assertTrue(shape instanceof Integer); // returns int instead
                // of shape
                count++;
                row = session.fetch(query);
            }
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

            testData.insertData(original, layer, session);
            final SeSqlConstruct sqlCons = new SeSqlConstruct(layer.getName());

            SeQuery query = session.createAndExecuteQuery(new String[] { "SHAPE" }, sqlCons);

            SdeRow row;
            SeShape shape;

            int i = 0;
            row = session.fetch(query);
            while (i < fetched.length && row != null) {
                shape = row.getShape(0);
                assertNotNull(shape);
                Class<? extends Geometry> clazz = ArcSDEAdapter.getGeometryTypeFromSeShape(shape);
                ArcSDEGeometryBuilder builder = ArcSDEGeometryBuilder.builderFor(clazz);
                fetched[i] = builder.construct(shape, new GeometryFactory());
                i++;
View Full Code Here

Examples of org.geotools.arcsde.session.SdeRow

        final SeQuery query = session.createAndExecuteQuery(new String[] { "ROW_ID", "INT32_COL" },
                new SeSqlConstruct(typeName));

        final int rowId;
        try {
            SdeRow row = session.fetch(query);
            rowId = row.getInteger(0).intValue();
        } finally {
            session.close(query);
        }

        session.issue(new Command<Void>() {
            @Override
            public Void execute(ISession session, SeConnection connection) throws SeException,
                    IOException {
                SeDelete delete = new SeDelete(connection);
                delete.byId(typeName, new SeObjectId(rowId));
                delete.close();
                return null;
            }
        });

        final String whereClause = "ROW_ID=" + rowId;
        final SeSqlConstruct sqlConstruct = new SeSqlConstruct(typeName, whereClause);
        final SeQuery deletedQuery = session.createAndExecuteQuery(new String[] { "ROW_ID" },
                sqlConstruct);

        SdeRow row = session.fetch(deletedQuery);
        assertNull(whereClause + " should have returned no records as it was deleted", row);
    }
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.