/** * Constructor * * @param database database * @param db db connection * @param attributesDb attributes connection * @param table attributes table */ public AttributesDao(String database, GeoPackageConnection db, AttributesConnection attributesDb, AttributesTable table) { super(database, db, attributesDb, table); this.attributesDb = attributesDb; if (table.getContents() == null) { throw new GeoPackageException(AttributesTable.class.getSimpleName() + " " + table.getTableName() + " has null " + Contents.class.getSimpleName()); } }
/** * Constructor * * @param database * database * @param db * db connection * @param attributesDb * attributes connection * @param table * attributes table */ public AttributesDao(String database, GeoPackageConnection db, AttributesConnection attributesDb, AttributesTable table) { super(database, db, attributesDb, table); this.attributesDb = attributesDb; if (table.getContents() == null) { throw new GeoPackageException(AttributesTable.class.getSimpleName() + " " + table.getTableName() + " has null " + Contents.class.getSimpleName()); } }
registerCursorWrapper(attributesTable.getTableName(), new GeoPackageCursorWrapper() {
.getAttributesDao(attributesTable.getTableName());
attributesContents.getTableName()); TestCase.assertEquals(attributesContents.getTableName(), attributesTable.getTableName()); .getAttributesDao(attributesTable.getTableName()); attributesReference.setTableName(attributesTable.getTableName()); attributesReference.setRowIdValue(rowId); attributesReference.setTimestamp(new Date());
TestCase.assertEquals(ContentsDataType.ATTRIBUTES.getName(), attributesContents.getDataTypeString()); TestCase.assertEquals(attributesTable.getTableName(), attributesContents.getTableName()); TestCase.assertNotNull(attributesContents.getLastChange());
List<MetadataReference> references = referenceDao.queryForEq( MetadataReference.COLUMN_TABLE_NAME, attributesTable.getTableName()); if (references != null && !references.isEmpty()) { Metadata metadata = references.get(0).getMetadata(); TestCase.assertNotNull(queryRow); TestCase.assertNotNull(queryRow.getTable()); TestCase.assertEquals(attributesTable.getTableName(), queryRow.getTable().getTableName());