public SPFPersona getPersonaOf ( String appIdentifier ) { SQLiteDatabase db = mRegistryTable . getReadableDatabase ( ) ; String table = Contract . TABLE_NAME ; String [ ] columns = { Contract . COLUMN_PERSONA } ; String selection = Contract . COLUMN_APP_IDENTIFIER + " = ? " ; String [ ] selectionArgs = { appIdentifier } ; String groupBy = null ; String having = null ; String orderBy = null ; Cursor c = db . query ( table , columns , selection , selectionArgs , groupBy , having , orderBy ) ; if ( c . moveToNext ( ) ) { String persona = c . getString ( c . getColumnIndex ( Contract . COLUMN_PERSONA ) ) ; return new SPFPersona ( persona ) ; } c . close ( ) ; return SPFPersona . DEFAULT ; }
Returns the SPFPersona associated to the specified application . If the application does not exist returns the default SPFPersona .