Java Code Examples for android.database.sqlite.SQLiteStatement#bindLong()
The following examples show how to use
android.database.sqlite.SQLiteStatement#bindLong() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: react-native-sqlite-storage File: SQLiteAndroidDatabase.java License: MIT License | 6 votes |
private void bindArgsToStatement(SQLiteStatement myStatement, ReadableArray sqlArgs) { if (sqlArgs == null) return; for (int i = 0; i < sqlArgs.size(); i++) { ReadableType type = sqlArgs.getType(i); if (type == ReadableType.Number) { double tmp = sqlArgs.getDouble(i); if (tmp == (long) tmp) { myStatement.bindLong(i + 1, (long) tmp); } else { myStatement.bindDouble(i + 1, tmp); } } else if (sqlArgs.isNull(i)) { myStatement.bindNull(i + 1); } else { myStatement.bindString(i + 1, sqlArgs.getString(i)); } } }
Example 2
Source Project: ml-authentication File: StudentImageCollectionEventDao.java License: Apache License 2.0 | 6 votes |
@Override protected final void bindValues(SQLiteStatement stmt, StudentImageCollectionEvent entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, entity.getDeviceId()); stmt.bindLong(3, timeConverter.convertToDatabaseValue(entity.getTime())); stmt.bindLong(4, entity.getStudentId()); String meanFeatureVector = entity.getMeanFeatureVector(); if (meanFeatureVector != null) { stmt.bindString(5, meanFeatureVector); } }
Example 3
Source Project: Android-IM File: ChatLogDao.java License: Apache License 2.0 | 6 votes |
@Override protected final void bindValues(SQLiteStatement stmt, ChatLog entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } Long userId = entity.getUserId(); if (userId != null) { stmt.bindLong(2, userId); } String time = entity.getTime(); if (time != null) { stmt.bindString(3, time); } String content = entity.getContent(); if (content != null) { stmt.bindString(4, content); } }
Example 4
Source Project: SweetMusicPlayer File: AlbumInfoDao.java License: Apache License 2.0 | 5 votes |
/** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, AlbumInfo entity) { stmt.clearBindings(); Long albumId = entity.getAlbumId(); if (albumId != null) { stmt.bindLong(1, albumId); } String title = entity.getTitle(); if (title != null) { stmt.bindString(2, title); } String artist = entity.getArtist(); if (artist != null) { stmt.bindString(3, artist); } Integer numSongs = entity.getNumSongs(); if (numSongs != null) { stmt.bindLong(4, numSongs); } String albumArt = entity.getAlbumArt(); if (albumArt != null) { stmt.bindString(5, albumArt); } }
Example 5
Source Project: wifi_backend File: Database.java License: GNU General Public License v3.0 | 5 votes |
private static SQLiteStatement bind(SQLiteStatement statement, AccessPoint accessPoint, int start) { if(!TextUtils.isEmpty(accessPoint.ssid())) { statement.bindString(start, accessPoint.ssid()); } statement.bindString(start + 1, String.valueOf(accessPoint.estimateLocation().latitude())); statement.bindString(start + 2, String.valueOf(accessPoint.estimateLocation().longitude())); statement.bindString(start + 3, String.valueOf(accessPoint.estimateLocation().radius())); statement.bindString(start + 4, String.valueOf(accessPoint.moveGuard())); statement.bindLong(start + 5 ,changedValue(accessPoint)); bind(statement, accessPoint.sample(0), start + 6); bind(statement, accessPoint.sample(1), start + 8); bind(statement, accessPoint.sample(2), start + 10); return statement; }
Example 6
Source Project: ml-authentication File: JoinNumbersWithWordsDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, JoinNumbersWithWords entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, entity.getNumberId()); stmt.bindLong(3, entity.getWordId()); }
Example 7
Source Project: ml-authentication File: StudentImageDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, StudentImage entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, timeCollectedConverter.convertToDatabaseValue(entity.getTimeCollected())); stmt.bindString(3, entity.getImageFileUrl()); stmt.bindLong(4, entity.getStudentImageFeatureId()); stmt.bindLong(5, entity.getStudentImageCollectionEventId()); }
Example 8
Source Project: OpenHub File: BookMarkUserDao.java License: GNU General Public License v3.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, BookMarkUser entity) { stmt.clearBindings(); stmt.bindString(1, entity.getLogin()); String name = entity.getName(); if (name != null) { stmt.bindString(2, name); } String avatarUrl = entity.getAvatarUrl(); if (avatarUrl != null) { stmt.bindString(3, avatarUrl); } Integer followers = entity.getFollowers(); if (followers != null) { stmt.bindLong(4, followers); } Integer following = entity.getFollowing(); if (following != null) { stmt.bindLong(5, following); } java.util.Date markTime = entity.getMarkTime(); if (markTime != null) { stmt.bindLong(6, markTime.getTime()); } }
Example 9
Source Project: ml-authentication File: ImageDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, Image entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindString(2, localeConverter.convertToDatabaseValue(entity.getLocale())); Calendar timeLastUpdate = entity.getTimeLastUpdate(); if (timeLastUpdate != null) { stmt.bindLong(3, timeLastUpdateConverter.convertToDatabaseValue(timeLastUpdate)); } stmt.bindLong(4, entity.getRevisionNumber()); stmt.bindString(5, contentStatusConverter.convertToDatabaseValue(entity.getContentStatus())); stmt.bindString(6, entity.getContentType()); Set literacySkills = entity.getLiteracySkills(); if (literacySkills != null) { stmt.bindString(7, literacySkillsConverter.convertToDatabaseValue(literacySkills)); } Set numeracySkills = entity.getNumeracySkills(); if (numeracySkills != null) { stmt.bindString(8, numeracySkillsConverter.convertToDatabaseValue(numeracySkills)); } stmt.bindString(9, entity.getTitle()); stmt.bindString(10, imageFormatConverter.convertToDatabaseValue(entity.getImageFormat())); String dominantColor = entity.getDominantColor(); if (dominantColor != null) { stmt.bindString(11, dominantColor); } }
Example 10
Source Project: ml-authentication File: JoinAudiosWithNumbersDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, JoinAudiosWithNumbers entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, entity.getAudioId()); stmt.bindLong(3, entity.getNumberId()); }
Example 11
Source Project: Android File: GroupMemberEntityDao.java License: MIT License | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, GroupMemberEntity entity) { stmt.clearBindings(); Long _id = entity.get_id(); if (_id != null) { stmt.bindLong(1, _id); } stmt.bindString(2, entity.getIdentifier()); stmt.bindString(3, entity.getUsername()); stmt.bindString(4, entity.getAvatar()); stmt.bindString(5, entity.getAddress()); Integer role = entity.getRole(); if (role != null) { stmt.bindLong(6, role); } String nick = entity.getNick(); if (nick != null) { stmt.bindString(7, nick); } String pub_key = entity.getPub_key(); if (pub_key != null) { stmt.bindString(8, pub_key); } }
Example 12
Source Project: OpenHub File: TraceDao.java License: GNU General Public License v3.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, Trace entity) { stmt.clearBindings(); stmt.bindString(1, entity.getId()); String type = entity.getType(); if (type != null) { stmt.bindString(2, type); } String userId = entity.getUserId(); if (userId != null) { stmt.bindString(3, userId); } Long repoId = entity.getRepoId(); if (repoId != null) { stmt.bindLong(4, repoId); } java.util.Date startTime = entity.getStartTime(); if (startTime != null) { stmt.bindLong(5, startTime.getTime()); } java.util.Date latestTime = entity.getLatestTime(); if (latestTime != null) { stmt.bindLong(6, latestTime.getTime()); } Integer traceNum = entity.getTraceNum(); if (traceNum != null) { stmt.bindLong(7, traceNum); } }
Example 13
Source Project: ml-authentication File: StudentImageFeatureDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, StudentImageFeature entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, timeCreatedConverter.convertToDatabaseValue(entity.getTimeCreated())); stmt.bindString(3, entity.getFeatureVector()); }
Example 14
Source Project: ml-authentication File: JoinImagesWithNumbersDao.java License: Apache License 2.0 | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, JoinImagesWithNumbers entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindLong(2, entity.getImageId()); stmt.bindLong(3, entity.getNumberId()); }
Example 15
Source Project: easyweather File: ProvinceEntityDao.java License: MIT License | 5 votes |
@Override protected final void bindValues(SQLiteStatement stmt, ProvinceEntity entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } String provinceName = entity.getProvinceName(); if (provinceName != null) { stmt.bindString(2, provinceName); } }
Example 16
Source Project: ml-authentication File: AllophoneDao.java License: Apache License 2.0 | 4 votes |
@Override protected final void bindValues(SQLiteStatement stmt, Allophone entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindString(2, localeConverter.convertToDatabaseValue(entity.getLocale())); Calendar timeLastUpdate = entity.getTimeLastUpdate(); if (timeLastUpdate != null) { stmt.bindLong(3, timeLastUpdateConverter.convertToDatabaseValue(timeLastUpdate)); } stmt.bindLong(4, entity.getRevisionNumber()); stmt.bindString(5, contentStatusConverter.convertToDatabaseValue(entity.getContentStatus())); stmt.bindString(6, entity.getValueIpa()); stmt.bindString(7, entity.getValueSampa()); stmt.bindLong(8, entity.getDiacritic() ? 1L: 0L); SoundType soundType = entity.getSoundType(); if (soundType != null) { stmt.bindString(9, soundTypeConverter.convertToDatabaseValue(soundType)); } VowelLength vowelLength = entity.getVowelLength(); if (vowelLength != null) { stmt.bindString(10, vowelLengthConverter.convertToDatabaseValue(vowelLength)); } VowelHeight vowelHeight = entity.getVowelHeight(); if (vowelHeight != null) { stmt.bindString(11, vowelHeightConverter.convertToDatabaseValue(vowelHeight)); } VowelFrontness vowelFrontness = entity.getVowelFrontness(); if (vowelFrontness != null) { stmt.bindString(12, vowelFrontnessConverter.convertToDatabaseValue(vowelFrontness)); } LipRounding lipRounding = entity.getLipRounding(); if (lipRounding != null) { stmt.bindString(13, lipRoundingConverter.convertToDatabaseValue(lipRounding)); } ConsonantType consonantType = entity.getConsonantType(); if (consonantType != null) { stmt.bindString(14, consonantTypeConverter.convertToDatabaseValue(consonantType)); } ConsonantPlace consonantPlace = entity.getConsonantPlace(); if (consonantPlace != null) { stmt.bindString(15, consonantPlaceConverter.convertToDatabaseValue(consonantPlace)); } ConsonantVoicing consonantVoicing = entity.getConsonantVoicing(); if (consonantVoicing != null) { stmt.bindString(16, consonantVoicingConverter.convertToDatabaseValue(consonantVoicing)); } stmt.bindLong(17, entity.getUsageCount()); }
Example 17
Source Project: TLint File: UserDao.java License: Apache License 2.0 | 4 votes |
/** * @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, User entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } String userName = entity.getUserName(); if (userName != null) { stmt.bindString(2, userName); } String uid = entity.getUid(); if (uid != null) { stmt.bindString(3, uid); } String token = entity.getToken(); if (token != null) { stmt.bindString(4, token); } String icon = entity.getIcon(); if (icon != null) { stmt.bindString(5, icon); } Integer sex = entity.getSex(); if (sex != null) { stmt.bindLong(6, sex); } String cookie = entity.getCookie(); if (cookie != null) { stmt.bindString(7, cookie); } String registerTime = entity.getRegisterTime(); if (registerTime != null) { stmt.bindString(8, registerTime); } String location = entity.getLocation(); if (location != null) { stmt.bindString(9, location); } String school = entity.getSchool(); if (school != null) { stmt.bindString(10, school); } String threadUrl = entity.getThreadUrl(); if (threadUrl != null) { stmt.bindString(11, threadUrl); } String postUrl = entity.getPostUrl(); if (postUrl != null) { stmt.bindString(12, postUrl); } String nickNameUrl = entity.getNickNameUrl(); if (nickNameUrl != null) { stmt.bindString(13, nickNameUrl); } }
Example 18
Source Project: HaoReader File: ChapterBeanDao.java License: GNU General Public License v3.0 | 4 votes |
@Override protected final void bindValues(SQLiteStatement stmt, ChapterBean entity) { stmt.clearBindings(); String durChapterUrl = entity.getDurChapterUrl(); if (durChapterUrl != null) { stmt.bindString(1, durChapterUrl); } String nextChapterUrl = entity.getNextChapterUrl(); if (nextChapterUrl != null) { stmt.bindString(2, nextChapterUrl); } String durChapterName = entity.getDurChapterName(); if (durChapterName != null) { stmt.bindString(3, durChapterName); } String durChapterPlayUrl = entity.getDurChapterPlayUrl(); if (durChapterPlayUrl != null) { stmt.bindString(4, durChapterPlayUrl); } String noteUrl = entity.getNoteUrl(); if (noteUrl != null) { stmt.bindString(5, noteUrl); } Integer durChapterIndex = entity.getDurChapterIndex(); if (durChapterIndex != null) { stmt.bindLong(6, durChapterIndex); } Integer start = entity.getStart(); if (start != null) { stmt.bindLong(7, start); } Integer end = entity.getEnd(); if (end != null) { stmt.bindLong(8, end); } }
Example 19
Source Project: Android File: GroupEntityDao.java License: MIT License | 4 votes |
@Override protected final void bindValues(SQLiteStatement stmt, GroupEntity entity) { stmt.clearBindings(); Long _id = entity.get_id(); if (_id != null) { stmt.bindLong(1, _id); } stmt.bindString(2, entity.getIdentifier()); String name = entity.getName(); if (name != null) { stmt.bindString(3, name); } String ecdh_key = entity.getEcdh_key(); if (ecdh_key != null) { stmt.bindString(4, ecdh_key); } Integer common = entity.getCommon(); if (common != null) { stmt.bindLong(5, common); } Integer verify = entity.getVerify(); if (verify != null) { stmt.bindLong(6, verify); } Integer pub = entity.getPub(); if (pub != null) { stmt.bindLong(7, pub); } String avatar = entity.getAvatar(); if (avatar != null) { stmt.bindString(8, avatar); } String summary = entity.getSummary(); if (summary != null) { stmt.bindString(9, summary); } }
Example 20
Source Project: MissZzzReader File: BookDao.java License: Apache License 2.0 | 4 votes |
@Override protected final void bindValues(SQLiteStatement stmt, Book entity) { stmt.clearBindings(); String id = entity.getId(); if (id != null) { stmt.bindString(1, id); } String name = entity.getName(); if (name != null) { stmt.bindString(2, name); } String chapterUrl = entity.getChapterUrl(); if (chapterUrl != null) { stmt.bindString(3, chapterUrl); } String imgUrl = entity.getImgUrl(); if (imgUrl != null) { stmt.bindString(4, imgUrl); } String desc = entity.getDesc(); if (desc != null) { stmt.bindString(5, desc); } String author = entity.getAuthor(); if (author != null) { stmt.bindString(6, author); } String type = entity.getType(); if (type != null) { stmt.bindString(7, type); } String updateDate = entity.getUpdateDate(); if (updateDate != null) { stmt.bindString(8, updateDate); } String newestChapterId = entity.getNewestChapterId(); if (newestChapterId != null) { stmt.bindString(9, newestChapterId); } String newestChapterTitle = entity.getNewestChapterTitle(); if (newestChapterTitle != null) { stmt.bindString(10, newestChapterTitle); } String newestChapterUrl = entity.getNewestChapterUrl(); if (newestChapterUrl != null) { stmt.bindString(11, newestChapterUrl); } String historyChapterId = entity.getHistoryChapterId(); if (historyChapterId != null) { stmt.bindString(12, historyChapterId); } stmt.bindLong(13, entity.getHisttoryChapterNum()); stmt.bindLong(14, entity.getSortCode()); stmt.bindLong(15, entity.getNoReadNum()); stmt.bindLong(16, entity.getChapterTotalNum()); stmt.bindLong(17, entity.getLastReadPosition()); String source = entity.getSource(); if (source != null) { stmt.bindString(18, source); } }