Cursor getColumnName - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Cursor getColumnName method.

This code example shows how to use the following methods:getColumnName, getString
 
        return false; 
    } 
 
    private final String makeDisplayString(Cursor cursor) {
        if (cursor.getColumnName(0).equals(SEARCHING_CURSOR_MARKER)) {
            return ""; 
        } 
 
        String displayName = cursor.getString(EmailQuery.NAME);
        String emailAddress = cursor.getString(EmailQuery.ADDRESS);
        if (TextUtils.isEmpty(displayName) || TextUtils.equals(displayName, emailAddress)) {
             return emailAddress;
        } else { 
            return new Rfc822Token(displayName, emailAddress, null).toString();
        } 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:getColumnName
    return wrappedCursor.getColumnIndexOrThrow(s);
  } 
 
  @Implementation 
  public String getColumnName(int i) {
    return wrappedCursor.getColumnName(i);
  } 
 
  @Implementation 
  public String[] getColumnNames() {
    return wrappedCursor.getColumnNames();
  } 
 
  @Implementation 
  public int getColumnCount() { 
    return wrappedCursor.getColumnCount();
  } 
 
  @Implementation 
  public byte[] getBlob(int i) {
6
CodeRank
This code example shows how to use the following methods:getColumnName
        return wrappedCursor.getColumnIndexOrThrow(s);
    } 
 
    @Implementation 
    public String getColumnName(int i) {
        return wrappedCursor.getColumnName(i);
    } 
 
    @Implementation 
    public String[] getColumnNames() {
        return wrappedCursor.getColumnNames();
    } 
 
    @Implementation 
    public int getColumnCount() { 
        return wrappedCursor.getColumnCount();
    } 
 
    @Implementation 
    public byte[] getBlob(int i) {
6
CodeRank
This code example shows how to use the following methods:getColumnIndex, getColumnName, getCount
				null,  
				"session_id = ?",  
				new String[] {Long.toString(sessionId)}, 
				null, null, null); 
		 
		if (c == null || c.getCount() == 0) {
			return null; 
		} 
		 
		return c.getColumnName(c.getColumnIndex("name"));
	} 
} 
6
CodeRank
This code example shows how to use the following methods:getColumnName
        return mActiveCursor.getColumnIndexOrThrow(columnName);
    } 
 
    @Override 
    public String getColumnName(int columnIndex) {
        return mActiveCursor.getColumnName(columnIndex);
    } 
 
    @Override 
    public String[] getColumnNames() {
        return mActiveCursor.getColumnNames();
    } 
 
    @Override 
    public int getCount() { 
        // CursorLoaders seem to call getCount() a lot. So we're caching the aggregated count. 
        if (mCount == -1) {
            int count = 0;
            for (Cursor cursor : mCursors) {
                if (cursor != null) {
6
CodeRank
This code example shows how to use the following methods:getColumnName
		return 0; 
	} 
 
	@Override 
	public String getColumnLabel(int column) throws SQLException {
		return cursor.getColumnName(column - 1);
	} 
 
	@Override 
	public String getColumnName(int column) throws SQLException {
		return cursor.getColumnName(column - 1);
	} 
 
	@Override 
    public int getColumnType(int column) throws SQLException {
        int oldPos = cursor.getPosition();
        boolean moved = false;
        if (cursor.isBeforeFirst() || cursor.isAfterLast()) {
            boolean resultSetEmpty = cursor.getCount() == 0 || cursor.isAfterLast();
            if (resultSetEmpty) {
5
CodeRank
This code example shows how to use the following methods:getColumnName
	return cursor.getColumnIndexOrThrow(columnName);
    } 
 
    @Implementation 
    public String getColumnName(int columnIndex) {
	return cursor.getColumnName(columnIndex);
    } 
 
    @Implementation 
    public String[] getColumnNames() {
	return cursor.getColumnNames();
    } 
 
    @Implementation 
    public int getColumnCount() { 
	return cursor.getColumnCount();
    } 
 
    @Implementation 
    public byte[] getBlob(int columnIndex) {
5
CodeRank
This code example shows how to use the following methods:getColumnName
	/* (non-Javadoc) 
	 * @see android.database.Cursor#getColumnName(int) 
	 */ 
	@Override 
	public String getColumnName(int columnIndex) {		
		return mCursor.getColumnName(columnIndex);
	} 
 
	/* (non-Javadoc) 
	 * @see android.database.Cursor#getColumnNames() 
	 */ 
	@Override 
	public String[] getColumnNames() {
		return mCursor.getColumnNames();
	} 
 
	/* (non-Javadoc) 
	 * @see android.database.Cursor#getCount() 
	 */ 
	@Override 
5
CodeRank
This code example shows how to use the following methods:getColumnName
			throws IllegalArgumentException { 
		return internalCursor.getColumnIndexOrThrow(columnName);
	} 
 
	public String getColumnName(int columnIndex) {
		return internalCursor.getColumnName(columnIndex);
	} 
 
	public String[] getColumnNames() {
		return internalCursor.getColumnNames();
	} 
 
	public int getCount() { 
		return internalCursor.getCount();
	} 
 
	public double getDouble(int columnIndex) {
		return internalCursor.getDouble(columnIndex);
	} 
 
4
CodeRank
This code example shows how to use the following methods:getColumnName
         throws IllegalArgumentException { 
      return internalCursor.getColumnIndexOrThrow(columnName);
   } 
 
   public String getColumnName(int columnIndex) {
      return internalCursor.getColumnName(columnIndex);
   } 
 
   public String[] getColumnNames() {
      return internalCursor.getColumnNames();
   } 
 
   public int getCount() { 
      return internalCursor.getCount();
   } 
 
   public double getDouble(int columnIndex) {
      return internalCursor.getDouble(columnIndex);
   } 
 
4
CodeRank

Related Cursor getColumnName Questions & Answers:

getColumnName Method Overview
Returns the column name at the given zero-based column index.
See Code Examples for other Android Cursor Methods: