Support Topics Documentation Slack YouTube Blog

10 Objects Return


(Saad Zahoor) #1

Hi , i am using below code and i am getting only 10 objects instead of 31 objects that are present in my backendless account

        String whereClause = "ownerId = '"+ownerId +"'" ;// && day = 'Wednesday'";
        DataQueryBuilder queryBuilder = DataQueryBuilder.create();
        queryBuilder.setWhereClause( whereClause );

        Backendless.Data.of( Database.class ).find( queryBuilder,
                new AsyncCallback<List<Database>>(){
                    @Override
                    public void handleResponse( List<Database> foundContacts )
                    { if (foundContacts.isEmpty()){
                            Toast.makeText(JobRecord.this, "Nothing Found", Toast.LENGTH_SHORT).show();
                        }else {

                            StringBuilder stringBuilder =new StringBuilder();

                            for (int i = 0 ; i < foundContacts.size() ; i++){
                                Toast.makeText(JobRecord.this, "Total Quesy Size : " + foundContacts.size(), Toast.LENGTH_SHORT).show();
                                String getClientName = foundContacts.get(i).getClientName();
                                String getDate = foundContacts.get(i).getDateOfJob();
                                String getDayInNumber = foundContacts.get(i).getDayInNumber();
                                String getDay = foundContacts.get(i).getDay();
                                String getMonth = foundContacts.get(i).getMonth();
                                String getYear = foundContacts.get(i).getYear();
                                String getStartTime = foundContacts.get(i).getJobStartTime();
                                String getEndTime = foundContacts.get(i).getJobEndTime();
                                String getTotalTime = foundContacts.get(i).getTotalTime();

                                stringBuilder
                                        .append("Client Name : " + getClientName + "\n")
                                        .append("Day : " + getDay + "\n")
                                        .append("Day in Number : " + getDayInNumber + "\n")
                                        .append("Month : " + getMonth + "\n")
                                        .append("Year : " + getYear + "\n")
                                        .append("Date : " + getDate + "\n")
                                        .append("Start Time : " + getStartTime + "\n")
                                        .append("End Time : " + getEndTime + "\n")
                                        .append("Total Time : " + getTotalTime + "\n\n" );
                                stringBuilder.toString() ;



                            }
                            textView.setText(stringBuilder);


                        }


                    }


                    @Override
                    public void handleFault( BackendlessFault fault )
                    {

                        Toast.makeText(JobRecord.this, "Something went wrong " + fault.getMessage(), Toast.LENGTH_SHORT).show();
                    }
                });

(Mark Piller) #2

Hello,

Please read this doc to understand why it happens:
https://backendless.com/docs/android/data_data_paging.html

Regards,
Mark


(Saad Zahoor) #3

Thanks . I will look into it