Exemple #1
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Firsatlarim entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setFirsat_id(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
   entity.setSure(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
   entity.setYararlanildi_mi(cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3) != 0);
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, PIC entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setAlbum_id(cursor.getInt(offset + 1));
   entity.setDate(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setGallery_id(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
 }
 protected Collection<FileInfo> loadFileInfos(long fileId) {
   final ArrayList<FileInfo> infos = new ArrayList<FileInfo>();
   while (fileId != -1) {
     final Cursor cursor =
         myDatabase.rawQuery(
             "SELECT name,size,parent_id FROM Files WHERE file_id = " + fileId, null);
     if (cursor.moveToNext()) {
       FileInfo info = createFileInfo(fileId, cursor.getString(0), null);
       if (!cursor.isNull(1)) {
         info.FileSize = cursor.getLong(1);
       }
       infos.add(0, info);
       fileId = cursor.isNull(2) ? -1 : cursor.getLong(2);
     } else {
       fileId = -1;
     }
     cursor.close();
   }
   for (int i = 1; i < infos.size(); ++i) {
     final FileInfo oldInfo = infos.get(i);
     final FileInfo newInfo = createFileInfo(oldInfo.Id, oldInfo.Name, infos.get(i - 1));
     newInfo.FileSize = oldInfo.FileSize;
     infos.set(i, newInfo);
   }
   return infos;
 }
Exemple #4
0
 protected void bindViewToMediaListItem(
     View paramView, Context paramContext, Cursor paramCursor, long paramLong) {
   int i = 1;
   Document localDocument = MusicUtils.getDocument(paramView);
   long l = paramCursor.getLong(0);
   String str1 = paramCursor.getString(i);
   if (paramCursor.getInt(2) != 0) ;
   while (true) {
     localDocument.setId(l);
     localDocument.setArtistId(l);
     localDocument.setTitle(str1);
     localDocument.setArtistName(str1);
     Document.Type localType = Document.Type.ARTIST;
     localDocument.setType(localType);
     localDocument.setHasLocal(i);
     if (!paramCursor.isNull(4)) {
       String str2 = paramCursor.getString(4);
       localDocument.setArtistMetajamId(str2);
     }
     if (!paramCursor.isNull(3)) {
       String str3 = paramCursor.getString(3);
       localDocument.setArtUrl(str3);
     }
     if (!(paramView instanceof PlayCardView)) return;
     PlayCardView localPlayCardView = (PlayCardView) paramView;
     PlayCardView.ContextMenuDelegate localContextMenuDelegate =
         ArtistGridFragment.this.mCardsContextMenuDelegate;
     localPlayCardView.bind(localDocument, localContextMenuDelegate);
     return;
     int j = 0;
   }
 }
Exemple #5
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Bank entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setName(cursor.getString(offset + 1));
   entity.setUpdatedDate(
       cursor.isNull(offset + 2) ? null : new java.util.Date(cursor.getLong(offset + 2)));
 }
  public AlarmInstance(Cursor c) {
    mId = c.getLong(ID_INDEX);
    mYear = c.getInt(YEAR_INDEX);
    mMonth = c.getInt(MONTH_INDEX);
    mDay = c.getInt(DAY_INDEX);
    mHour = c.getInt(HOUR_INDEX);
    mMinute = c.getInt(MINUTES_INDEX);
    mLabel = c.getString(LABEL_INDEX);
    mVibrate = c.getInt(VIBRATE_INDEX) == 1;
    if (c.isNull(RINGTONE_INDEX)) {
      // Should we be saving this with the current ringtone or leave it null
      // so it changes when user changes default ringtone?
      mRingtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
    } else {
      mRingtone = Uri.parse(c.getString(RINGTONE_INDEX));
    }

    if (!c.isNull(ALARM_ID_INDEX)) {
      mAlarmId = c.getLong(ALARM_ID_INDEX);
    }
    mAlarmState = c.getInt(ALARM_STATE_INDEX);

    if (!c.isNull(LIGHTUPPI_ID_INDEX)) {
      mLightuppiId = c.getLong(LIGHTUPPI_ID_INDEX);
    }
    if (!c.isNull(TIMESTAMP_INDEX)) {
      mTimestamp = c.getLong(TIMESTAMP_INDEX);
    }
  }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, MunkaEszkoz entity, int offset) {
   entity.setMunkaEszkozID(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setMunkaEszkozNev(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setMunkaEszkozAr(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setMunkaID(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, ItemFlagProse entity, int offset) {
   entity.setItemFlagId(cursor.getLong(offset + 0));
   entity.setLocalLanguageId(cursor.getLong(offset + 1));
   entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setDescription(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
 }
Exemple #9
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Chapter entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setChapterNumber(cursor.getString(offset + 1));
   entity.setIsLocal(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setGenreId(cursor.getLong(offset + 3));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Order entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setDate(
       cursor.isNull(offset + 1) ? null : new java.util.Date(cursor.getLong(offset + 1)));
   entity.setCustomerId(cursor.getLong(offset + 2));
 }
Exemple #11
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Unit entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setName(cursor.getString(offset + 1));
   entity.setShortName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setFacultyId(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
 }
  /**
   * Loads groups meta-data for all groups associated with all constituent raw contacts' accounts.
   */
  private void loadGroupMetaData(Contact result) {
    StringBuilder selection = new StringBuilder();
    ArrayList<String> selectionArgs = new ArrayList<String>();
    for (RawContact rawContact : result.getRawContacts()) {
      final String accountName = rawContact.getAccountName();
      final String accountType = rawContact.getAccountTypeString();
      final String dataSet = rawContact.getDataSet();
      if (accountName != null && accountType != null) {
        if (selection.length() != 0) {
          selection.append(" OR ");
        }
        selection.append("(" + Groups.ACCOUNT_NAME + "=? AND " + Groups.ACCOUNT_TYPE + "=?");
        selectionArgs.add(accountName);
        selectionArgs.add(accountType);

        if (dataSet != null) {
          selection.append(" AND " + Groups.DATA_SET + "=?");
          selectionArgs.add(dataSet);
        } else {
          selection.append(" AND " + Groups.DATA_SET + " IS NULL");
        }
        selection.append(")");
      }
    }
    final ImmutableList.Builder<GroupMetaData> groupListBuilder =
        new ImmutableList.Builder<GroupMetaData>();
    final Cursor cursor =
        getContext()
            .getContentResolver()
            .query(
                Groups.CONTENT_URI,
                GroupQuery.COLUMNS,
                selection.toString(),
                selectionArgs.toArray(new String[0]),
                null);
    if (cursor != null) {
      try {
        while (cursor.moveToNext()) {
          final String accountName = cursor.getString(GroupQuery.ACCOUNT_NAME);
          final String accountType = cursor.getString(GroupQuery.ACCOUNT_TYPE);
          final String dataSet = cursor.getString(GroupQuery.DATA_SET);
          final long groupId = cursor.getLong(GroupQuery.ID);
          final String title = cursor.getString(GroupQuery.TITLE);
          final boolean defaultGroup =
              cursor.isNull(GroupQuery.AUTO_ADD) ? false : cursor.getInt(GroupQuery.AUTO_ADD) != 0;
          final boolean favorites =
              cursor.isNull(GroupQuery.FAVORITES)
                  ? false
                  : cursor.getInt(GroupQuery.FAVORITES) != 0;

          groupListBuilder.add(
              new GroupMetaData(
                  accountName, accountType, dataSet, groupId, title, defaultGroup, favorites));
        }
      } finally {
        cursor.close();
      }
    }
    result.setGroupMetaData(groupListBuilder.build());
  }
Exemple #13
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Comment entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setContent(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setUserId(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setPostId(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setIdCatPost(cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, DolphinContext entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setActivity_name(cursor.getString(offset + 1));
   entity.setDevice_state(cursor.getString(offset + 2));
   entity.setModel_config_id(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
   entity.setPlugin_id(cursor.getLong(offset + 4));
 }
Exemple #15
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, stepbean entity, int offset) {
   entity.setDay(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
   entity.setBengin(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
   entity.setEnd(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setStepcount(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
   entity.setSource(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
 }
Exemple #16
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, SqliteMaster entity, int offset) {
   entity.setType(cursor.isNull(offset + 0) ? null : cursor.getString(offset + 0));
   entity.setName(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setTableName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setRootpage(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
   entity.setSql(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
 }
Exemple #17
0
 /** Populate one instance from a cursor */
 public void Gen_populate(android.database.Cursor cursor, int[] columnIndices) {
   if (columnIndices[GEN_ID__ID] >= 0 && !cursor.isNull(columnIndices[GEN_ID__ID])) {
     gen__Id = cursor.getLong(columnIndices[GEN_ID__ID]);
   }
   if (columnIndices[GEN_ID_SENTTEXT] >= 0 && !cursor.isNull(columnIndices[GEN_ID_SENTTEXT])) {
     gen_sentText = cursor.getString(columnIndices[GEN_ID_SENTTEXT]);
   }
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Person entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setName(cursor.getString(offset + 1));
   entity.setAge(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
   entity.setHeight(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
   entity.setIntroduction(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
 }
Exemple #19
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, NoticeBean entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setNoticeTitle(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setNoticeContent(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setNoticeTime(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setNoticePublisher(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
 }
Exemple #20
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Feeling entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setContent(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setServerId(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setStatusFlag(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
   entity.setLocationId(cursor.getLong(offset + 4));
 }
Exemple #21
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, DBCover entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setUrlSmall(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setHeight(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2));
   entity.setUrl(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setWidth(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4));
 }
Exemple #22
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Place entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setLabel(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setName(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setPinyin(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setProvince(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, EncounterSlots entity, int offset) {
   entity.setId(cursor.getLong(offset + 0));
   entity.setVersionGroupId(cursor.getLong(offset + 1));
   entity.setEncounterMethodId(cursor.getLong(offset + 2));
   entity.setSlot(cursor.isNull(offset + 3) ? null : cursor.getLong(offset + 3));
   entity.setRarity(cursor.isNull(offset + 4) ? null : cursor.getLong(offset + 4));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, TokensBD entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setExpiresIn(cursor.isNull(offset + 1) ? null : cursor.getLong(offset + 1));
   entity.setExpiresAt(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setTokenType(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setRefreshToken(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
   entity.setAccessToken(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
 }
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Address entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setUsername(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setMobileNo(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setArea(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3));
   entity.setStreet(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4));
   entity.setDetail(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5));
   entity.setIsDefault(cursor.isNull(offset + 6) ? null : cursor.getShort(offset + 6) != 0);
 }
Exemple #26
0
 /** @inheritdoc */
 @Override
 public ImageCache readEntity(Cursor cursor, int offset) {
   ImageCache entity =
       new ImageCache( //
           cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
           cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // url
           cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // path
           );
   return entity;
 }
Exemple #27
0
 /** @inheritdoc */
 @Override
 public NewsJumpBean readEntity(Cursor cursor, int offset) {
   NewsJumpBean entity =
       new NewsJumpBean( //
           cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
           cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // url
           cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2) // content
           );
   return entity;
 }
 /** @inheritdoc */
 @Override
 public Reminder readEntity(Cursor cursor, int offset) {
   Reminder entity =
       new Reminder( //
           cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id
           cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // name
           cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2) // dateTime
           );
   return entity;
 }
 public String getTitle() {
   if (_titleOverrideColumn == null)
     _titleOverrideColumn = _cursor.getColumnIndex(SubscriptionProvider.COLUMN_TITLE_OVERRIDE);
   if (_titleOverrideColumn != -1 && !_cursor.isNull(_titleOverrideColumn))
     return _cursor.getString(_titleOverrideColumn);
   if (_titleColumn == null)
     _titleColumn = _cursor.getColumnIndexOrThrow(SubscriptionProvider.COLUMN_TITLE);
   if (_cursor.isNull(_titleColumn)) return getUrl();
   return _cursor.getString(_titleColumn);
 }
Exemple #30
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, MunkaKep entity, int offset) {
   entity.setMunkaKepID(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setMunkaKepPath(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setMunkaKepDate(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2));
   entity.setMunkaKepIsUploaded(
       cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3) != 0);
   entity.setMunkaKepIsActive(cursor.isNull(offset + 4) ? null : cursor.getShort(offset + 4) != 0);
   entity.setMunkaID(cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5));
 }