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 AssetVocabularyDisplay implements Serializable {
027
028 public AssetVocabularyDisplay() {
029 }
030
031 public AssetVocabularyDisplay(
032 List<AssetVocabulary> vocabularies, int total, int start, int end) {
033
034 _vocabularies = vocabularies;
035 _total = total;
036 _start = start;
037 _end = end;
038 }
039
040 public int getEnd() {
041 return _end;
042 }
043
044 public int getPage() {
045 if ((_end > 0) && (_start >= 0)) {
046 return _end / (_end - _start);
047 }
048
049 return 0;
050 }
051
052 public int getStart() {
053 return _start;
054 }
055
056 public int getTotal() {
057 return _total;
058 }
059
060 public List<AssetVocabulary> getVocabularies() {
061 return _vocabularies;
062 }
063
064 public void setEnd(int end) {
065 _end = end;
066 }
067
068 public void setStart(int start) {
069 _start = start;
070 }
071
072 public void setTotal(int total) {
073 _total = total;
074 }
075
076 public void setVocabularies(List<AssetVocabulary> vocabularies) {
077 _vocabularies = vocabularies;
078 }
079
080 private int _end;
081 private int _start;
082 private int _total;
083
084 @JSON
085 private List<AssetVocabulary> _vocabularies;
086
087 }