org.greenrobot.greendao.database.DatabaseStatement Java Examples

The following examples show how to use org.greenrobot.greendao.database.DatabaseStatement. 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 File: SyllableDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Syllable 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.getText());
    stmt.bindLong(7, entity.getUsageCount());
}
 
Example #2
Source File: SearchHistoryBeanDao.java    From HaoReader with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, SearchHistoryBean entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
    stmt.bindLong(2, entity.getType());
 
    String content = entity.getContent();
    if (content != null) {
        stmt.bindString(3, content);
    }
    stmt.bindLong(4, entity.getDate());
}
 
Example #3
Source File: UserDao.java    From android-orm-benchmark-updated with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, User entity) {
    stmt.clearBindings();
 
    String last_name = entity.getLast_name();
    if (last_name != null) {
        stmt.bindString(1, last_name);
    }
 
    String first_name = entity.getFirst_name();
    if (first_name != null) {
        stmt.bindString(2, first_name);
    }
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(3, id);
    }
}
 
Example #4
Source File: MessageDao.java    From android-orm-benchmark-updated with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Message entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
 
    String content = entity.getContent();
    if (content != null) {
        stmt.bindString(2, content);
    }
    stmt.bindLong(3, entity.getClient_id());
    stmt.bindLong(4, entity.getCreated_at());
    stmt.bindDouble(5, entity.getSorted_by());
    stmt.bindLong(6, entity.getCommand_id());
    stmt.bindLong(7, entity.getSender_id());
    stmt.bindLong(8, entity.getChannel_id());
}
 
Example #5
Source File: StudentDao.java    From FimiX8-RE with MIT License 6 votes vote down vote up
public final void bindValues(DatabaseStatement stmt, Student entity) {
    stmt.clearBindings();
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id.longValue());
    }
    String name = entity.getName();
    if (name != null) {
        stmt.bindString(2, name);
    }
    String age = entity.getAge();
    if (age != null) {
        stmt.bindString(3, age);
    }
    String number = entity.getNumber();
    if (number != null) {
        stmt.bindString(4, number);
    }
}
 
Example #6
Source File: LetterDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Letter 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.getText());
    stmt.bindLong(7, entity.getUsageCount());
}
 
Example #7
Source File: UserEntityDao.java    From Study_Android_Demo with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, UserEntity 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 password = entity.getPassword();
    if (password != null) {
        stmt.bindString(3, password);
    }
}
 
Example #8
Source File: StudentImageCollectionEventDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement 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 #9
Source File: AvatarModelDao.java    From PLDroidShortVideo with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, AvatarModel entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
 
    String iconPath = entity.getIconPath();
    if (iconPath != null) {
        stmt.bindString(2, iconPath);
    }
 
    String configJson = entity.getConfigJson();
    if (configJson != null) {
        stmt.bindString(3, configJson);
    }
    stmt.bindLong(4, entity.getGender());
}
 
Example #10
Source File: MagicPhotoEntityDao.java    From PLDroidShortVideo with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, MagicPhotoEntity entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
    stmt.bindLong(2, entity.getWidth());
    stmt.bindLong(3, entity.getHeight());
 
    String groupPointsStr = entity.getGroupPointsStr();
    if (groupPointsStr != null) {
        stmt.bindString(4, groupPointsStr);
    }
 
    String groupTypeStr = entity.getGroupTypeStr();
    if (groupTypeStr != null) {
        stmt.bindString(5, groupTypeStr);
    }
 
    String imagePath = entity.getImagePath();
    if (imagePath != null) {
        stmt.bindString(6, imagePath);
    }
}
 
Example #11
Source File: WordDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Word 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.getText());
    stmt.bindString(7, entity.getPhonetics());
    stmt.bindLong(8, entity.getUsageCount());
 
    SpellingConsistency spellingConsistency = entity.getSpellingConsistency();
    if (spellingConsistency != null) {
        stmt.bindString(9, spellingConsistencyConverter.convertToDatabaseValue(spellingConsistency));
    }
}
 
Example #12
Source File: ParamEntityDao.java    From Android with MIT License 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, ParamEntity entity) {
    stmt.clearBindings();
 
    Long _id = entity.get_id();
    if (_id != null) {
        stmt.bindLong(1, _id);
    }
 
    String key = entity.getKey();
    if (key != null) {
        stmt.bindString(2, key);
    }
 
    String value = entity.getValue();
    if (value != null) {
        stmt.bindString(3, value);
    }
 
    String ext = entity.getExt();
    if (ext != null) {
        stmt.bindString(4, ext);
    }
}
 
Example #13
Source File: RecommandFriendEntityDao.java    From Android with MIT License 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, RecommandFriendEntity entity) {
    stmt.clearBindings();
 
    Long _id = entity.get_id();
    if (_id != null) {
        stmt.bindLong(1, _id);
    }
    stmt.bindString(2, entity.getPub_key());
    stmt.bindString(3, entity.getUsername());
    stmt.bindString(4, entity.getAddress());
    stmt.bindString(5, entity.getAvatar());
 
    Integer status = entity.getStatus();
    if (status != null) {
        stmt.bindLong(6, status);
    }
}
 
Example #14
Source File: CourseGroupDao.java    From ClassSchedule with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, CourseGroup entity) {
    stmt.clearBindings();
 
    Long cgId = entity.getCgId();
    if (cgId != null) {
        stmt.bindLong(1, cgId);
    }
 
    String cgName = entity.getCgName();
    if (cgName != null) {
        stmt.bindString(2, cgName);
    }
 
    String cgSchool = entity.getCgSchool();
    if (cgSchool != null) {
        stmt.bindString(3, cgSchool);
    }
}
 
Example #15
Source File: UserDao.java    From enjoyshop with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, User entity) {
    stmt.clearBindings();
 
    Long userId = entity.getUserId();
    if (userId != null) {
        stmt.bindLong(1, userId);
    }
 
    String phone = entity.getPhone();
    if (phone != null) {
        stmt.bindString(2, phone);
    }
 
    String pwd = entity.getPwd();
    if (pwd != null) {
        stmt.bindString(3, pwd);
    }
    stmt.bindLong(4, entity.getSex());
 
    String nickName = entity.getNickName();
    if (nickName != null) {
        stmt.bindString(5, nickName);
    }
    stmt.bindLong(6, entity.getRegetTime());
}
 
Example #16
Source File: LocalUserDao.java    From OpenHub with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, LocalUser 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);
    }
}
 
Example #17
Source File: WeatherEntityDao.java    From easyweather with MIT License 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, WeatherEntity entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
 
    String cityName = entity.getCityName();
    if (cityName != null) {
        stmt.bindString(2, cityName);
    }
 
    byte[] weather = entity.getWeather();
    if (weather != null) {
        stmt.bindBlob(3, weather);
    }
 
    java.util.Date updateTime = entity.getUpdateTime();
    if (updateTime != null) {
        stmt.bindLong(4, updateTime.getTime());
    }
}
 
Example #18
Source File: LetterDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Letter 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.getText());
    stmt.bindLong(7, entity.getUsageCount());
}
 
Example #19
Source File: AuthUserDao.java    From OpenHub with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, AuthUser entity) {
    stmt.clearBindings();
    stmt.bindString(1, entity.getAccessToken());
    stmt.bindLong(2, entity.getAuthTime().getTime());
    stmt.bindLong(3, entity.getExpireIn());
    stmt.bindString(4, entity.getScope());
    stmt.bindLong(5, entity.getSelected() ? 1L: 0L);
    stmt.bindString(6, entity.getLoginId());
 
    String name = entity.getName();
    if (name != null) {
        stmt.bindString(7, name);
    }
 
    String avatar = entity.getAvatar();
    if (avatar != null) {
        stmt.bindString(8, avatar);
    }
}
 
Example #20
Source File: SyllableDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Syllable 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.getText());
    stmt.bindLong(7, entity.getUsageCount());
}
 
Example #21
Source File: ChatLogDao.java    From Android-IM with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement 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 #22
Source File: UserModelDao.java    From Android-Architecture with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, UserModel 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 userNick = entity.getUserNick();
    if (userNick != null) {
        stmt.bindString(3, userNick);
    }
 
    Long createTime = entity.getCreateTime();
    if (createTime != null) {
        stmt.bindLong(4, createTime);
    }
}
 
Example #23
Source File: GroupDao.java    From CoolChat with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Group entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
    stmt.bindLong(2, entity.getGroupId());
 
    String groupName = entity.getGroupName();
    if (groupName != null) {
        stmt.bindString(3, groupName);
    }
 
    String groupAvatar = entity.getGroupAvatar();
    if (groupAvatar != null) {
        stmt.bindString(4, groupAvatar);
    }
 
    String createTime = entity.getCreateTime();
    if (createTime != null) {
        stmt.bindString(5, createTime);
    }
}
 
Example #24
Source File: GroupUsersDao.java    From CoolChat with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, GroupUsers entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
    stmt.bindLong(2, entity.getUserId());
 
    String userName = entity.getUserName();
    if (userName != null) {
        stmt.bindString(3, userName);
    }
 
    String userAvatar = entity.getUserAvatar();
    if (userAvatar != null) {
        stmt.bindString(4, userAvatar);
    }
 
    String userSex = entity.getUserSex();
    if (userSex != null) {
        stmt.bindString(5, userSex);
    }
}
 
Example #25
Source File: NumberDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Number 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.bindLong(6, entity.getValue());
 
    String symbol = entity.getSymbol();
    if (symbol != null) {
        stmt.bindString(7, symbol);
    }
}
 
Example #26
Source File: WordDao.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Word 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.getText());
    stmt.bindString(7, entity.getPhonetics());
    stmt.bindLong(8, entity.getUsageCount());
 
    SpellingConsistency spellingConsistency = entity.getSpellingConsistency();
    if (spellingConsistency != null) {
        stmt.bindString(9, spellingConsistencyConverter.convertToDatabaseValue(spellingConsistency));
    }
}
 
Example #27
Source File: X8AiLinePointLatlngInfoDao.java    From FimiX8-RE with MIT License 6 votes vote down vote up
public final void bindValues(DatabaseStatement stmt, X8AiLinePointLatlngInfo entity) {
    stmt.clearBindings();
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id.longValue());
    }
    stmt.bindLong(2, (long) entity.getNumber());
    stmt.bindLong(3, (long) entity.getTotalnumber());
    stmt.bindDouble(4, entity.getLongitude());
    stmt.bindDouble(5, entity.getLatitude());
    stmt.bindLong(6, (long) entity.getAltitude());
    stmt.bindDouble(7, (double) entity.getYaw());
    stmt.bindLong(8, (long) entity.getGimbalPitch());
    stmt.bindLong(9, (long) entity.getSpeed());
    stmt.bindLong(10, (long) entity.getYawMode());
    stmt.bindLong(11, (long) entity.getGimbalMode());
    stmt.bindLong(12, (long) entity.getTrajectoryMode());
    stmt.bindLong(13, (long) entity.getMissionFinishAction());
    stmt.bindLong(14, (long) entity.getRCLostAction());
    stmt.bindDouble(15, entity.getLongitudePOI());
    stmt.bindDouble(16, entity.getLatitudePOI());
    stmt.bindLong(17, (long) entity.getAltitudePOI());
    stmt.bindLong(18, entity.getLineId());
    stmt.bindLong(19, (long) entity.getPointActionCmd());
    stmt.bindLong(20, (long) entity.getRoration());
}
 
Example #28
Source File: JoinNumbersWithWordsDao.java    From ml-authentication with Apache License 2.0 5 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement 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 #29
Source File: DeviceDao.java    From ml-authentication with Apache License 2.0 5 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, Device entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
    stmt.bindString(2, entity.getDeviceId());
}
 
Example #30
Source File: SearchAddDao.java    From Android-IM with Apache License 2.0 5 votes vote down vote up
@Override
protected final void bindValues(DatabaseStatement stmt, SearchAdd entity) {
    stmt.clearBindings();
 
    Long id = entity.getId();
    if (id != null) {
        stmt.bindLong(1, id);
    }
 
    String content = entity.getContent();
    if (content != null) {
        stmt.bindString(2, content);
    }
}