001
014
015 package com.liferay.portlet.asset.model;
016
017 import com.liferay.portal.kernel.json.JSON;
018
019 import java.io.Serializable;
020
021 import java.util.List;
022
023
026 public class AssetCategoryDisplay implements Serializable {
027
028 public AssetCategoryDisplay() {
029 }
030
031 public AssetCategoryDisplay(
032 List<AssetCategory> categories, int total, int start, int end) {
033
034 _categories = categories;
035 _total = total;
036 _start = start;
037 _end = end;
038 }
039
040 public List<AssetCategory> getCategories() {
041 return _categories;
042 }
043
044 public int getEnd() {
045 return _end;
046 }
047
048 public int getPage() {
049 if ((_end > 0) && (_start >= 0)) {
050 return _end / (_end - _start);
051 }
052
053 return 0;
054 }
055
056 public int getStart() {
057 return _start;
058 }
059
060 public int getTotal() {
061 return _total;
062 }
063
064 public void setCategories(List<AssetCategory> categories) {
065 _categories = categories;
066 }
067
068 public void setEnd(int end) {
069 _end = end;
070 }
071
072 public void setStart(int start) {
073 _start = start;
074 }
075
076 public void setTotal(int total) {
077 _total = total;
078 }
079
080 @JSON
081 private List<AssetCategory> _categories;
082
083 private int _end;
084 private int _start;
085 private int _total;
086
087 }