Why this matters
- Offset pagination — detailed pointwise breakdown in the section below.
- Cursor pagination — detailed pointwise breakdown in the section below.
- Filters — detailed pointwise breakdown in the section below.
- PaginatedResult type — detailed pointwise breakdown in the section below.
- Production Java structure interviewers expect in backend LLD.
Dependency direction
Controller / FacadeHTTP or API entry
Serviceuse cases, orchestration
Domainentities, rules, invariants
Repositorypersistence port
Overview
Offset, cursor, and filter design for list endpoints. Study each section below in order — every list is interview-ready reference material.
Offset pagination
Points to cover
- Definition — what Offset pagination means in one clear sentence
- When to use — the force or smell that triggers this concept
- CampusOS example — where this appears in parking, booking, or library modules
- How to explain — pointwise bullets you can say aloud in an interview
- Common mistake — what weak candidates do instead
- Refactor move — one concrete change that improves the design
Cursor pagination
Points to cover
- Definition — what Cursor pagination means in one clear sentence
- When to use — the force or smell that triggers this concept
- CampusOS example — where this appears in parking, booking, or library modules
- How to explain — pointwise bullets you can say aloud in an interview
- Common mistake — what weak candidates do instead
- Refactor move — one concrete change that improves the design
Filters
Points to cover
- Definition — what Filters means in one clear sentence
- When to use — the force or smell that triggers this concept
- CampusOS example — where this appears in parking, booking, or library modules
- How to explain — pointwise bullets you can say aloud in an interview
- Common mistake — what weak candidates do instead
- Refactor move — one concrete change that improves the design
PaginatedResult type
Points to cover
- Definition — what PaginatedResult type means in one clear sentence
- When to use — the force or smell that triggers this concept
- CampusOS example — where this appears in parking, booking, or library modules
- How to explain — pointwise bullets you can say aloud in an interview
- Common mistake — what weak candidates do instead
- Refactor move — one concrete change that improves the design
// CampusOS — apply "Offset pagination" on paper first, then in code
public final class ApiPaginationFilteringExample {
// 1. Name entities from the problem statement
// 2. Draw relationships before writing methods
// 3. Introduce patterns only when a force appears
}
Quick recall
Everything you need if you only revisit this box.
- Offset pagination — review this slice before mock interviews.
- Cursor pagination — review this slice before mock interviews.
- Filters — review this slice before mock interviews.
- PaginatedResult type — review this slice before mock interviews.
Test yourself
Answer these before moving on — recall is what makes it stick.