/** * Sets HTTP headers to HTTP servlet response per specified paging information. * * @param httpServletResponse the HTTP servlet response * @param pagingInfo the paging information DTO */ protected void addPagingHttpHeaders(HttpServletResponse httpServletResponse, PagingInfoDto pagingInfo) { httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_NUM, String.valueOf(pagingInfo.getPageNum())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_SIZE, String.valueOf(pagingInfo.getPageSize())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_COUNT, String.valueOf(pagingInfo.getPageCount())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_TOTAL_RECORDS_ON_PAGE, String.valueOf(pagingInfo.getTotalRecordsOnPage())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_TOTAL_RECORD_COUNT, String.valueOf(pagingInfo.getTotalRecordCount())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_MAX_RESULTS_PER_PAGE, String.valueOf(pagingInfo.getMaxResultsPerPage())); }
/** * Create an instance of {@link PagingInfoDto } * */ public PagingInfoDto createPagingInfoDto() { return new PagingInfoDto(); }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof PagingInfoDto) { final PagingInfoDto copy = ((PagingInfoDto) draftCopy); if (pageNumShouldBeCopiedAndSet == Boolean.TRUE) { Long sourcePageNum; sourcePageNum = this.getPageNum(); Long copyPageNum = ((Long) strategy.copy(LocatorUtils.property(locator, "pageNum", sourcePageNum), sourcePageNum, (this.pageNum!= null))); copy.setPageNum(copyPageNum); } else { if (pageNumShouldBeCopiedAndSet == Boolean.FALSE) { if (pageSizeShouldBeCopiedAndSet == Boolean.TRUE) { Long sourcePageSize; sourcePageSize = this.getPageSize(); Long copyPageSize = ((Long) strategy.copy(LocatorUtils.property(locator, "pageSize", sourcePageSize), sourcePageSize, (this.pageSize!= null))); copy.setPageSize(copyPageSize); } else { if (pageSizeShouldBeCopiedAndSet == Boolean.FALSE) { if (pageCountShouldBeCopiedAndSet == Boolean.TRUE) { Long sourcePageCount; sourcePageCount = this.getPageCount(); Long copyPageCount = ((Long) strategy.copy(LocatorUtils.property(locator, "pageCount", sourcePageCount), sourcePageCount, (this.pageCount!= null))); copy.setPageCount(copyPageCount); } else { if (pageCountShouldBeCopiedAndSet == Boolean.FALSE) { if (totalRecordsOnPageShouldBeCopiedAndSet == Boolean.TRUE) {
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { super.appendFields(locator, buffer, strategy); { BusinessObjectDataSearchResult theBusinessObjectDataSearchResult; theBusinessObjectDataSearchResult = this.getBusinessObjectDataSearchResult(); strategy.appendField(locator, this, "businessObjectDataSearchResult", buffer, theBusinessObjectDataSearchResult, (this.businessObjectDataSearchResult!= null)); } return buffer; }
public static PagingInfoDto.Builder<Void> copyExcept(final PagingInfoDto _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; }
public static PagingInfoDto.Builder<Void> copyOnly(final PagingInfoDto _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
/** * Sets HTTP headers to HTTP servlet response per specified paging information. * * @param httpServletResponse the HTTP servlet response * @param pagingInfo the paging information DTO */ protected void addPagingHttpHeaders(HttpServletResponse httpServletResponse, PagingInfoDto pagingInfo) { httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_NUM, String.valueOf(pagingInfo.getPageNum())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_SIZE, String.valueOf(pagingInfo.getPageSize())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_PAGE_COUNT, String.valueOf(pagingInfo.getPageCount())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_TOTAL_RECORDS_ON_PAGE, String.valueOf(pagingInfo.getTotalRecordsOnPage())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_TOTAL_RECORD_COUNT, String.valueOf(pagingInfo.getTotalRecordCount())); httpServletResponse.setHeader(HTTP_HEADER_PAGING_MAX_RESULTS_PER_PAGE, String.valueOf(pagingInfo.getMaxResultsPerPage())); }
public Object createNewInstance() { return new PagingInfoDto(); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { thePageNum = this.getPageNum(); strategy.appendField(locator, this, "pageNum", buffer, thePageNum, (this.pageNum!= null)); thePageSize = this.getPageSize(); strategy.appendField(locator, this, "pageSize", buffer, thePageSize, (this.pageSize!= null)); thePageCount = this.getPageCount(); strategy.appendField(locator, this, "pageCount", buffer, thePageCount, (this.pageCount!= null)); theTotalRecordsOnPage = this.getTotalRecordsOnPage(); strategy.appendField(locator, this, "totalRecordsOnPage", buffer, theTotalRecordsOnPage, (this.totalRecordsOnPage!= null)); theTotalRecordCount = this.getTotalRecordCount(); strategy.appendField(locator, this, "totalRecordCount", buffer, theTotalRecordCount, (this.totalRecordCount!= null)); theMaxResultsPerPage = this.getMaxResultsPerPage(); strategy.appendField(locator, this, "maxResultsPerPage", buffer, theMaxResultsPerPage, (this.maxResultsPerPage!= null));
@Override public PagingInfoDto build() { if (_storedValue == null) { return this.init(new PagingInfoDto()); } else { return ((PagingInfoDto) _storedValue); } }
thePageNum = this.getPageNum(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "pageNum", thePageNum), currentHashCode, thePageNum, (this.pageNum!= null)); thePageSize = this.getPageSize(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "pageSize", thePageSize), currentHashCode, thePageSize, (this.pageSize!= null)); thePageCount = this.getPageCount(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "pageCount", thePageCount), currentHashCode, thePageCount, (this.pageCount!= null)); theTotalRecordsOnPage = this.getTotalRecordsOnPage(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalRecordsOnPage", theTotalRecordsOnPage), currentHashCode, theTotalRecordsOnPage, (this.totalRecordsOnPage!= null)); theTotalRecordCount = this.getTotalRecordCount(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalRecordCount", theTotalRecordCount), currentHashCode, theTotalRecordCount, (this.totalRecordCount!= null)); theMaxResultsPerPage = this.getMaxResultsPerPage(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "maxResultsPerPage", theMaxResultsPerPage), currentHashCode, theMaxResultsPerPage, (this.maxResultsPerPage!= null));
lhsPageNum = this.getPageNum(); Long rhsPageNum; rhsPageNum = that.getPageNum(); if (!strategy.equals(LocatorUtils.property(thisLocator, "pageNum", lhsPageNum), LocatorUtils.property(thatLocator, "pageNum", rhsPageNum), lhsPageNum, rhsPageNum, (this.pageNum!= null), (that.pageNum!= null))) { return false; lhsPageSize = this.getPageSize(); Long rhsPageSize; rhsPageSize = that.getPageSize(); if (!strategy.equals(LocatorUtils.property(thisLocator, "pageSize", lhsPageSize), LocatorUtils.property(thatLocator, "pageSize", rhsPageSize), lhsPageSize, rhsPageSize, (this.pageSize!= null), (that.pageSize!= null))) { return false; lhsPageCount = this.getPageCount(); Long rhsPageCount; rhsPageCount = that.getPageCount(); if (!strategy.equals(LocatorUtils.property(thisLocator, "pageCount", lhsPageCount), LocatorUtils.property(thatLocator, "pageCount", rhsPageCount), lhsPageCount, rhsPageCount, (this.pageCount!= null), (that.pageCount!= null))) { return false; lhsTotalRecordsOnPage = this.getTotalRecordsOnPage(); Long rhsTotalRecordsOnPage; rhsTotalRecordsOnPage = that.getTotalRecordsOnPage(); if (!strategy.equals(LocatorUtils.property(thisLocator, "totalRecordsOnPage", lhsTotalRecordsOnPage), LocatorUtils.property(thatLocator, "totalRecordsOnPage", rhsTotalRecordsOnPage), lhsTotalRecordsOnPage, rhsTotalRecordsOnPage, (this.totalRecordsOnPage!= null), (that.totalRecordsOnPage!= null))) { return false; lhsTotalRecordCount = this.getTotalRecordCount(); Long rhsTotalRecordCount; rhsTotalRecordCount = that.getTotalRecordCount(); if (!strategy.equals(LocatorUtils.property(thisLocator, "totalRecordCount", lhsTotalRecordCount), LocatorUtils.property(thatLocator, "totalRecordCount", rhsTotalRecordCount), lhsTotalRecordCount, rhsTotalRecordCount, (this.totalRecordCount!= null), (that.totalRecordCount!= null))) { return false;