public Users searchDistributorBasedOnIdOrMobNum(String userIdOrMobnum) {
   Users users;
   if (userIdOrMobnum != null
       && (userIdOrMobnum.startsWith("R")
           || userIdOrMobnum.startsWith("A")
           || userIdOrMobnum.startsWith("E"))) {
     return null;
   }
   if (userIdOrMobnum != null && (userIdOrMobnum.startsWith("D"))) {
     String userId = ExtractorUtil.extractIdFromString(userIdOrMobnum);
     String str = commonDao.checkTypeOfUser(userId);
     if (CommonConstants.ROLE_DISTRIBUTOR.equalsIgnoreCase(str)) {
       users = distributorSearchFranchiseeDao.searchUserBasedOnIdOrMobNum(userId);
       return users;
     } else {
       return null;
     }
   } else {
     Long userId = (long) commonDao.getUserId(userIdOrMobnum);
     String str = commonDao.checkTypeOfUser(userId.toString());
     if (CommonConstants.ROLE_DISTRIBUTOR.equalsIgnoreCase(str)) {
       return distributorSearchFranchiseeDao.searchUserBasedOnIdOrMobNum(userIdOrMobnum);
     } else {
       return null;
     }
   }
 }
  public Users searchRetailerBasedOnIdOrMobNum(String userIdOrMobnumber) {

    if (userIdOrMobnumber != null
        && (userIdOrMobnumber.startsWith("R")
            || userIdOrMobnumber.startsWith("C")
            || userIdOrMobnumber.startsWith("D"))) {
      userIdOrMobnumber = ExtractorUtil.extractIdFromString(userIdOrMobnumber);
    }

    Users users = distributorSearchFranchiseeDao.searchUserBasedOnIdOrMobNum(userIdOrMobnumber);
    return users;
  }
 public List<FranchiseeDetailAsDist> searchAllFranchisee(String distId) {
   List<FranchiseeDetailAsDist> franDetailAsDists =
       distributorSearchFranchiseeDao.allFranAsDist(distId);
   return franDetailAsDists;
 }