REST Web Services 22 - Pagination and Filtering

REST Web Services 22 - Pagination and Filtering

Java Brains

9 лет назад

206,844 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

karl russell menil
karl russell menil - 26.02.2021 07:33

Topic: Full stack javascript - Data Pagination and Filtering

Good day,

If I may humbly ask a little help, any hints, comments and suggestions are very much welcome, thank you in advance for all your help, please see question below, how do I code this?:

/*
Create the `showPage` function
This function will create and insert/append the elements needed to display a "page" of nine students
*/



/*
Create the `addPagination` function
This function will create and insert/append the elements needed for the pagination buttons
*/



// Call functions

Ответить
Ajay Kumar
Ajay Kumar - 18.02.2021 21:51

👍👍👍

Ответить
Andressa
Andressa - 27.01.2021 17:50

great video sir

Ответить
Zhandos Yernazarov
Zhandos Yernazarov - 07.10.2020 13:08

thank you sir

Ответить
Anand B
Anand B - 15.06.2020 23:45

I am getting an error in

Calendar cal= new Calendar.getInstance();

Ответить
spoorthi vaidya
spoorthi vaidya - 11.03.2020 17:45

What is page parameter

Ответить
Pavan Kumar Mullangi
Pavan Kumar Mullangi - 27.11.2019 16:03

how can we implement filtering on the attributes..lets say out of 20 attributes in the resource, one client need to get 10 attributes and another client need 15 attributes. Is it possible to control what attributes are needed by the client?

Ответить
John Peter
John Peter - 27.11.2019 15:34

Hi Kaushik, Thanks a lot for these amazing tutorial videos, it has given quite a clarity along with hands on at its best.

Ответить
ali gholami
ali gholami - 21.09.2019 17:25

koushnik , خیلی آقایی

Ответить
marlo
marlo - 10.06.2019 21:47

I Started a new religion called "Java Brains",
Its the first time in my life that I find a tutorial were every single thing works perfect!
And its much better then courses on Udemy, Thanks !!

Ответить
Neralla Raviteja
Neralla Raviteja - 25.05.2019 14:33

when i am trying to do GET method for /messages it's not showng the list of messages even the Status is 200 . Can anyone please tell me what wrong i did

Ответить
Sita Mahalakshmi C
Sita Mahalakshmi C - 24.03.2019 22:24

I have learnt many things from your tutorial from my starting carrier... Still continuing... My sincere thanks Koushik

Ответить
Ifrit
Ifrit - 22.01.2019 21:56

Thank you so much. I have a question. What about if in the service when you retrieve all messages, the amount of messages is very big. Is this logic, Hibernate retrieves all the messages and then shows only the messages by requested year?

Ответить
SOMNATH PAL
SOMNATH PAL - 03.01.2019 11:52

Hi Sir,
I used the condition like :- " if(start + size > 0) " and I am getting proper response for all the scenarios.
Hope its correct way.

@GET
public List<Message> getAllMessages(@QueryParam("year") int year,
@QueryParam("start") int start,
@QueryParam("size") int size)
{
if(year > 0)
{
System.out.println("calling getAllMessagesForYear");
return messageService.getAllMessagesForYear(year);
}

if(start + size > 0)
{
System.out.println("calling getAllMessagesPaginated");
return messageService.getAllMessagesPaginated(start, size);
}

return messageService.getAllMesages();

}

Thanks,
Somnath Pal.

Ответить
Abira Roychoudhury
Abira Roychoudhury - 16.10.2018 12:53

Can't we use method overloading for the case of getMessages() in the MessageResource class? Instead of putting all the QueryParam and if statements in a single method?

Ответить
shashwat gupta
shashwat gupta - 02.09.2018 13:03

I still don't understand why we shouldn't write size >=0 How does that affect the getAllMessages() method ?

Ответить
rajsekhar mahapatro
rajsekhar mahapatro - 29.05.2018 18:56

Hi Koushik, i am following your videos they are just great. But i am stuck at one point. I have created profiles service and resource and i have made it to consume and produce JSON, but when i hit the end point i am 500 err and the response i am getting the response as text and the message resource is working fine. Its really weird could you please help me out.

Ответить