@Override public short getShort(int column) { return mCursor.getShort(column); }
@Override public short getShort(final int column) { return mQueueCursor.getShort(column); }
@Override public short getShort(final int column) { return mQueueCursor.getShort(column); }
@Override public short getShort(int columnIndex) { return mActiveCursor.getShort(columnIndex); }
@Override public short getShort(int column) { return mCursor.getShort(column); }
@Override public SimpleEntityNotNull readEntity(Cursor cursor, int offset) { SimpleEntityNotNull entity = new SimpleEntityNotNull( // cursor.getLong(offset + 0), // id cursor.getShort(offset + 1) != 0, // simpleBoolean (byte) cursor.getShort(offset + 2), // simpleByte cursor.getShort(offset + 3), // simpleShort cursor.getInt(offset + 4), // simpleInt cursor.getLong(offset + 5), // simpleLong cursor.getFloat(offset + 6), // simpleFloat cursor.getDouble(offset + 7), // simpleDouble cursor.getString(offset + 8), // simpleString cursor.getBlob(offset + 9) // simpleByteArray ); return entity; }
@Override @Implementation public short getShort(int i) { return wrappedCursor.getShort(i); }
private static FileDownloadModel createFromCursor(Cursor c) { final FileDownloadModel model = new FileDownloadModel(); model.setId(c.getInt(c.getColumnIndex(FileDownloadModel.ID))); model.setUrl(c.getString(c.getColumnIndex(FileDownloadModel.URL))); model.setPath(c.getString(c.getColumnIndex(FileDownloadModel.PATH)), c.getShort(c.getColumnIndex(FileDownloadModel.PATH_AS_DIRECTORY)) == 1); model.setStatus((byte) c.getShort(c.getColumnIndex(FileDownloadModel.STATUS))); model.setSoFar(c.getLong(c.getColumnIndex(FileDownloadModel.SOFAR))); model.setTotal(c.getLong(c.getColumnIndex(FileDownloadModel.TOTAL))); model.setErrMsg(c.getString(c.getColumnIndex(FileDownloadModel.ERR_MSG))); model.setETag(c.getString(c.getColumnIndex(FileDownloadModel.ETAG))); model.setFilename(c.getString(c.getColumnIndex(FileDownloadModel.FILENAME))); model.setConnectionCount( c.getInt(c.getColumnIndex(FileDownloadModel.CONNECTION_COUNT))); return model; }
@Override public TestEntity readEntity(Cursor cursor, int offset) { TestEntity entity = new TestEntity( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.getInt(offset + 1), // simpleInt cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2), // simpleInteger cursor.getString(offset + 3), // simpleStringNotNull cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // simpleString cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // indexedString cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // indexedStringAscUnique cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7)), // simpleDate cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0, // simpleBoolean cursor.isNull(offset + 9) ? null : cursor.getBlob(offset + 9) // simpleByteArray ); return entity; }
@Override public void readEntity(Cursor cursor, SimpleEntityNotNull entity, int offset) { entity.setId(cursor.getLong(offset + 0)); entity.setSimpleBoolean(cursor.getShort(offset + 1) != 0); entity.setSimpleByte((byte) cursor.getShort(offset + 2)); entity.setSimpleShort(cursor.getShort(offset + 3)); entity.setSimpleInt(cursor.getInt(offset + 4)); entity.setSimpleLong(cursor.getLong(offset + 5)); entity.setSimpleFloat(cursor.getFloat(offset + 6)); entity.setSimpleDouble(cursor.getDouble(offset + 7)); entity.setSimpleString(cursor.getString(offset + 8)); entity.setSimpleByteArray(cursor.getBlob(offset + 9)); }
/** @inheritdoc */ @Override public Filter readEntity(Cursor cursor, int offset) { Filter entity = new Filter( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.getInt(offset + 1), // mode cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // text cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3) != 0 // enable ); return entity; }
@Override public SimpleEntity readEntity(Cursor cursor, int offset) { SimpleEntity entity = new SimpleEntity( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getShort(offset + 1) != 0, // simpleBoolean cursor.isNull(offset + 2) ? null : (byte) cursor.getShort(offset + 2), // simpleByte cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3), // simpleShort cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4), // simpleInt cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5), // simpleLong cursor.isNull(offset + 6) ? null : cursor.getFloat(offset + 6), // simpleFloat cursor.isNull(offset + 7) ? null : cursor.getDouble(offset + 7), // simpleDouble cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // simpleString cursor.isNull(offset + 9) ? null : cursor.getBlob(offset + 9) // simpleByteArray ); return entity; }
@Override public void readEntity(Cursor cursor, TestEntity entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setSimpleInt(cursor.getInt(offset + 1)); entity.setSimpleInteger(cursor.isNull(offset + 2) ? null : cursor.getInt(offset + 2)); entity.setSimpleStringNotNull(cursor.getString(offset + 3)); entity.setSimpleString(cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4)); entity.setIndexedString(cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5)); entity.setIndexedStringAscUnique(cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6)); entity.setSimpleDate(cursor.isNull(offset + 7) ? null : new java.util.Date(cursor.getLong(offset + 7))); entity.setSimpleBoolean(cursor.isNull(offset + 8) ? null : cursor.getShort(offset + 8) != 0); entity.setSimpleByteArray(cursor.isNull(offset + 9) ? null : cursor.getBlob(offset + 9)); }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, Filter entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setMode(cursor.getInt(offset + 1)); entity.setText(cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2)); entity.setEnable(cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3) != 0); }
@Override public void readEntity(Cursor cursor, SimpleEntity entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setSimpleBoolean(cursor.isNull(offset + 1) ? null : cursor.getShort(offset + 1) != 0); entity.setSimpleByte(cursor.isNull(offset + 2) ? null : (byte) cursor.getShort(offset + 2)); entity.setSimpleShort(cursor.isNull(offset + 3) ? null : cursor.getShort(offset + 3)); entity.setSimpleInt(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4)); entity.setSimpleLong(cursor.isNull(offset + 5) ? null : cursor.getLong(offset + 5)); entity.setSimpleFloat(cursor.isNull(offset + 6) ? null : cursor.getFloat(offset + 6)); entity.setSimpleDouble(cursor.isNull(offset + 7) ? null : cursor.getDouble(offset + 7)); entity.setSimpleString(cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8)); entity.setSimpleByteArray(cursor.isNull(offset + 9) ? null : cursor.getBlob(offset + 9)); }
protected List<Book> getBooks(String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy, String limit) { List<Book> books = new ArrayList<Book>(); Cursor cursor = Connector.getDatabase().query(getTableName(Book.class), columns, selection, selectionArgs, groupBy, having, orderBy, limit); if (cursor.moveToFirst()) { do { long id = cursor.getLong(cursor.getColumnIndexOrThrow("id")); String bookName = cursor.getString(cursor.getColumnIndexOrThrow("bookname")); int pages = cursor.getInt(cursor.getColumnIndexOrThrow("pages")); double price = cursor.getDouble(cursor.getColumnIndexOrThrow("price")); char level = cursor.getString(cursor.getColumnIndexOrThrow("level")).charAt(0); short isbn = cursor.getShort(cursor.getColumnIndexOrThrow("isbn")); float area = cursor.getFloat(cursor.getColumnIndexOrThrow("area")); boolean isPublished = cursor.getInt(cursor.getColumnIndexOrThrow("ispublished")) == 1; Book book = new Book(); book.setId(id); book.setBookName(bookName); book.setPages(pages); book.setPrice(price); book.setLevel(level); book.setIsbn(isbn); book.setArea(area); book.setPublished(isPublished); books.add(book); } while (cursor.moveToNext()); } cursor.close(); return books; }
/** @inheritdoc */ @Override public void readEntity(Cursor cursor, NewsChannelTable entity, int offset) { entity.setNewsChannelName(cursor.getString(offset + 0)); entity.setNewsChannelId(cursor.getString(offset + 1)); entity.setNewsChannelType(cursor.getString(offset + 2)); entity.setNewsChannelSelect(cursor.getShort(offset + 3) != 0); entity.setNewsChannelIndex(cursor.getInt(offset + 4)); entity.setNewsChannelFixed(cursor.isNull(offset + 5) ? null : cursor.getShort(offset + 5) != 0); }
@Override public TestData readEntity(Cursor cursor, int offset) { TestData entity = new TestData( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // testString cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // testLong cursor.isNull(offset + 3) ? null : new java.util.Date(cursor.getLong(offset + 3)), // testDate cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4), // testInt cursor.isNull(offset + 5) ? null : cursor.getShort(offset + 5) != 0 // testBoolean ); return entity; }
@Override public TestData3 readEntity(Cursor cursor, int offset) { TestData3 entity = new TestData3( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // testString cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // testLong cursor.isNull(offset + 3) ? null : new java.util.Date(cursor.getLong(offset + 3)), // testDate cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4), // testInt cursor.isNull(offset + 5) ? null : cursor.getShort(offset + 5) != 0 // testBoolean ); return entity; }
@Override public void readEntity(Cursor cursor, TestData2 entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setTestString(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1)); entity.setTestLong(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); entity.setTestDate(cursor.isNull(offset + 3) ? null : new java.util.Date(cursor.getLong(offset + 3))); entity.setTestInt(cursor.isNull(offset + 4) ? null : cursor.getInt(offset + 4)); entity.setTestBoolean(cursor.isNull(offset + 5) ? null : cursor.getShort(offset + 5) != 0); }