@Override public Cursor wrapCursor(Cursor cursor) { return new AttributesCursor(attributesTable, cursor); } });
/** * {@inheritDoc} */ @Override public AttributesRow getRow(int[] columnTypes, Object[] values) { return new AttributesRow(getTable(), columnTypes, values); }
/** * {@inheritDoc} */ @Override protected AttributesColumn createColumn(AttributesCursor cursor, int index, String name, String type, Long max, boolean notNull, int defaultValueIndex, boolean primaryKey) { GeoPackageDataType dataType = getDataType(type); Object defaultValue = cursor.getValue(defaultValueIndex, dataType); AttributesColumn column = new AttributesColumn(index, name, dataType, max, notNull, defaultValue, primaryKey); return column; }
AttributesColumn pkColumn2 = relatedDao.getTable().getPkColumn(); AttributesCursor ars = relatedDao.queryForAll(); while (ars.moveToNext()) { long relatedId = ars.getLong(pkColumn2.getIndex()); List<Long> baseIds = rte.getMappingsForRelated( extendedRelation, relatedId); relatedIdMappings.put(relatedId, baseIds); ars.close();
while (attributesCursor.moveToNext()) { AttributesRow attributesRow = attributesCursor.getRow(); long randomSimpleRowId = simpleAttributesIds.get((int) (Math .random() * simpleAttributesIds.size())); userMappingDao.create(userMappingRow); attributesCursor.close();
int count = cursor.getCount(); int manualCount = 0; while (cursor.moveToNext()) { AttributesRow attributesRow = cursor.getRow(); validateAttributesRow(columns, attributesRow); cursor.close(); count = cursor.getCount(); manualCount = 0; while (cursor.moveToNext()) { manualCount++; cursor.moveToPosition(random); AttributesRow attributesRow = cursor.getRow(); cursor.close(); TestCase.assertTrue(cursor.getCount() > 0); boolean found = false; while (cursor.moveToNext()) { queryAttributesRow = cursor.getRow(); TestCase.assertEquals(column1Value, queryAttributesRow.getValue(column1.getName())); cursor.close(); TestCase.assertTrue(cursor.getCount() > 0);
int count = cursor.getCount(); if (count > 0) { cursor.moveToPosition(random); AttributesRow attributesRow = cursor.getRow(); cursor.close(); TestCase.assertNotNull(queryAttributesRow); cursor = dao.queryForAll(); TestCase.assertEquals(count + 1, cursor.getCount()); cursor.close(); TestCase.assertNotNull(queryAttributesRow2); cursor = dao.queryForAll(); TestCase.assertEquals(count + 2, cursor.getCount()); cursor.close(); TestCase.assertNotNull(queryAttributesRow3); cursor = dao.queryForAll(); TestCase.assertEquals(count + 3, cursor.getCount()); cursor.close(); cursor.close();
/** * {@inheritDoc} */ @Override protected AttributesCursor wrapCursor(Cursor cursor) { return new AttributesCursor(null, cursor); } }
.getAttributesDao(baseTableName); AttributesCursor attributesCursor = attributesDao.queryForAll(); int attributesCount = attributesCursor.getCount(); List<Long> attributeIds = new ArrayList<>(); while (attributesCursor.moveToNext()) { attributeIds.add(attributesCursor.getRow().getId()); attributesCursor.close(); while (attributesCursor.moveToNext()) { AttributesRow attributesRow = attributesCursor.getRow(); List<Long> mappedIds = rte.getMappingsForBase( attributesRelation, attributesRow.getId()); attributesCursor.close(); TestCase.assertEquals(totalMappedCount, totalMapped);