EmailRecords

public class EmailRecords<T>

The EmailRecords class wraps the EmailRecord list and stores the current item count.

Constructors

EmailRecords

public EmailRecords()

Creates a new instance of EmailRecords, which contains no records.

EmailRecords

public EmailRecords(Integer totalRecords, Integer page, Integer totalPages, List<T> allRecords)

Creates a new instance of EmailRecords, with all fields set to the values specified in the parameters. The page and totalPages parameters are for the purposes of paginating the list of records in the UI.

Parameters:
  • totalRecords – the total number of records
  • page – the current page
  • totalPages – the total number of pages
  • allRecords – the list of records

Methods

getPage

public Integer getPage()

Gets the current page.

Returns:the current page

getRecords

public Integer getRecords()

Gets the total number of records.

Returns:the total number of records

getRows

public List<T> getRows()

Gets the list of records.

Returns:the list of records

getTotal

public Integer getTotal()

Gets the total number of pages.

Returns:the total number of pages

setRows

public void setRows(List<T> rows)

Sets the list of records.

Parameters:
  • rows – the list of records

setTotal

public void setTotal(Integer total)

Sets the total number of records.

Parameters:
  • total – the total number of records

toString

public String toString()

Returns a string representation of this EmailRecords object.

Returns:a string representation of this EmailRecords object