1 53 54 106 107 package com.Yasna.forum; 108 109 import java.util.*; 110 111 114 public class QueryProxy implements Query { 115 116 119 private Query query; 120 private Authorization authorization; 121 private ForumPermissions permissions; 122 123 public QueryProxy(Query query, Authorization authorization, 124 ForumPermissions permissions) 125 { 126 this.query = query; 127 this.authorization = authorization; 128 this.permissions = permissions; 129 } 130 131 public String getQueryString() { 132 return query.getQueryString(); 133 } 134 135 public void setQueryString(String queryString) { 136 query.setQueryString(queryString); 137 } 138 139 public Date getBeforeDate() { 140 return query.getBeforeDate(); 141 } 142 143 public void setBeforeDate(Date beforeDate) { 144 query.setBeforeDate(beforeDate); 145 } 146 147 public Date getAfterDate() { 148 return query.getAfterDate(); 149 } 150 151 public void setAfterDate(Date afterDate) { 152 query.setAfterDate(afterDate); 153 } 154 155 public void filterOnUser(User user) { 156 query.filterOnUser(user); 157 } 158 159 public User getFilteredUser() { 160 return query.getFilteredUser(); 161 } 162 163 public ForumThread getFilteredThread() { 164 return query.getFilteredThread(); 165 } 166 167 public void filterOnThread(ForumThread thread) { 168 query.filterOnThread(thread); 169 } 170 171 public int resultCount() { 172 return query.resultCount(); 173 } 174 175 public Iterator results() { 176 Iterator iterator = query.results(); 177 return new MessageIteratorProxy(iterator, authorization, permissions); 178 } 179 180 public Iterator results(int startIndex, int numResults) { 181 Iterator iterator = query.results(startIndex, numResults); 182 return new MessageIteratorProxy(iterator, authorization, permissions); 183 } 184 } 185 | Popular Tags |