private int getViewID() {
        if (viewID < 0) {
            String sql = "SELECT view_id FROM views WHERE name=?";
            String[] args = {name};
            Cursor cursor = null;
            try {
                cursor = store.getStorageEngine().rawQuery(sql, args);
                if (cursor.moveToNext()) {
                    viewID = cursor.getInt(0);
                }
            } catch (SQLException e) {
                Log.e(Log.TAG_VIEW, "Error getting view id", e);
            } finally {
                if (cursor != null) {
                    cursor.close();
                }
            }
        }
        return viewID;
    }
private int getViewID ( ) { if ( viewID < 0 ) { String sql = "SELECT view_id FROM views WHERE name=?" ; String [ ] args = { name } ; Cursor cursor = null ; try { cursor = store . getStorageEngine ( ) . rawQuery ( sql , args ) ; if ( cursor . moveToNext ( ) ) { viewID = cursor . getInt ( 0 ) ; } } catch ( SQLException e ) { Log . e ( Log . TAG_VIEW , "Error getting view id" , e ) ; } finally { if ( cursor != null ) { cursor . close ( ) ; } } } return viewID ; }
/////////////////////////////////////////////////////////////////////////