use of com.applozic.mobicommons.people.channel.ChannelUserMapper in project Applozic-Android-SDK by AppLozic.
the class ChannelService method addMemberToChannelProcess.
/**
* @deprecated Use {@link #addMemberToChannelWithResponseProcess(Integer, String)} instead.
*/
@Deprecated
public String addMemberToChannelProcess(Integer channelKey, String userId) {
if (channelKey == null && TextUtils.isEmpty(userId)) {
return "";
}
ApiResponse apiResponse = channelClientService.addMemberToChannel(channelKey, userId);
if (apiResponse == null) {
return null;
}
if (apiResponse.isSuccess()) {
ChannelUserMapper channelUserMapper = new ChannelUserMapper(channelKey, userId);
channelDatabaseService.addChannelUserMapper(channelUserMapper);
}
return apiResponse.getStatus();
}
use of com.applozic.mobicommons.people.channel.ChannelUserMapper in project Applozic-Android-SDK by AppLozic.
the class ChannelDatabaseService method getChannelUser.
// Cleanup: private
public static ChannelUserMapper getChannelUser(Cursor cursor) {
ChannelUserMapper channelUserMapper = new ChannelUserMapper();
channelUserMapper.setUserKey(cursor.getString(cursor.getColumnIndex(MobiComDatabaseHelper.USERID)));
channelUserMapper.setKey(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.CHANNEL_KEY)));
channelUserMapper.setUnreadCount(cursor.getShort(cursor.getColumnIndex(MobiComDatabaseHelper.UNREAD_COUNT)));
channelUserMapper.setRole(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.ROLE)));
channelUserMapper.setStatus(cursor.getShort(cursor.getColumnIndex(MobiComDatabaseHelper.STATUS)));
channelUserMapper.setParentKey(cursor.getInt(cursor.getColumnIndex(MobiComDatabaseHelper.PARENT_GROUP_KEY)));
return channelUserMapper;
}
Aggregations