public int deleteByBaseId ( long id , GeometryType geometryType ) { String geometryTypeName = null ; if ( geometryType != null ) { geometryTypeName = geometryType . getName ( ) ; } StringBuilder where = new StringBuilder ( ) ; where . append ( buildWhere ( StyleMappingTable . COLUMN_BASE_ID , id ) ) ; where . append ( " AND " ) ; where . append ( buildWhere ( StyleMappingTable . COLUMN_GEOMETRY_TYPE_NAME , geometryTypeName ) ) ; List < Object > whereArguments = new ArrayList <> ( ) ; whereArguments . add ( id ) ; if ( geometryTypeName != null ) { whereArguments . add ( geometryTypeName ) ; } String [ ] whereArgs = buildWhereArgs ( whereArguments ) ; int deleted = delete ( where . toString ( ) , whereArgs ) ; return deleted ; }
Delete by base is and geometry type