Removed a few complile errors
This commit is contained in:
parent
76aa74990e
commit
0997b66c89
14 changed files with 135 additions and 403 deletions
|
|
@ -1,151 +0,0 @@
|
|||
/*
|
||||
* Copyright 2007-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.backend.list;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Holds the state for the backend
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 26, 2009
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class DefaultVascBackendListRequest implements VascBackendListRequest {
|
||||
|
||||
protected Map<String,Object> parameters = null;
|
||||
private int pageIndex = 0;
|
||||
private int pageSize = 0;
|
||||
private int pageSizeMax = 0;
|
||||
private String sortField = null;
|
||||
private String searchString = null;
|
||||
private boolean ascending = true;
|
||||
|
||||
public DefaultVascBackendListRequest() {
|
||||
parameters = new HashMap<String,Object>(10);
|
||||
}
|
||||
|
||||
public void setDataParameter(String key, Object data) {
|
||||
parameters.put(key,data);
|
||||
}
|
||||
|
||||
public void removeDataParameter(String key) {
|
||||
parameters.remove(key);
|
||||
}
|
||||
|
||||
public void removeDataParameterAll() {
|
||||
parameters.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.list.VascBackendListRequest#getDataParameter(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object getDataParameter(String key) {
|
||||
return parameters.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.list.VascBackendListRequest#getDataParameterKeys()
|
||||
*/
|
||||
@Override
|
||||
public Set<String> getDataParameterKeys() {
|
||||
return parameters.keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.crud.VascBackendCrud#getPageIndex()
|
||||
*/
|
||||
@Override
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex=pageIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.crud.VascBackendCrud#getPageSize()
|
||||
*/
|
||||
@Override
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize=pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.crud.VascBackendCrud#getSearchString()
|
||||
*/
|
||||
@Override
|
||||
public String getSearchString() {
|
||||
return searchString;
|
||||
}
|
||||
|
||||
public void setSearchString(String searchString) {
|
||||
this.searchString=searchString;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.crud.VascBackendCrud#isSortAscending()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSortAscending() {
|
||||
return ascending;
|
||||
}
|
||||
|
||||
public void setSortAscending(boolean ascending) {
|
||||
this.ascending=ascending;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see net.forwardfire.vasc.backend.crud.VascBackendCrud#getSortField()
|
||||
*/
|
||||
@Override
|
||||
public String getSortField() {
|
||||
return sortField;
|
||||
}
|
||||
|
||||
public void setSortField(String sortField) {
|
||||
this.sortField=sortField;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pageSizeMax
|
||||
*/
|
||||
@Override
|
||||
public int getPageSizeMax() {
|
||||
return pageSizeMax;
|
||||
}
|
||||
|
||||
public void setPageSizeMax(int pageSizeMax) {
|
||||
this.pageSizeMax = pageSizeMax;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,8 @@
|
|||
package net.forwardfire.vasc.backend.list;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
|
|
@ -31,20 +33,86 @@ import java.util.Set;
|
|||
* @author Willem Cazander
|
||||
* @version 1.0 May 26, 2009
|
||||
*/
|
||||
public interface VascBackendListRequest extends Serializable {
|
||||
public class VascBackendListRequest implements Serializable {
|
||||
|
||||
Object getDataParameter(String key);
|
||||
Set<String> getDataParameterKeys();
|
||||
private static final long serialVersionUID = -2076113513122609253L;
|
||||
protected Map<String,Object> parameters = null;
|
||||
private int pageIndex = 0;
|
||||
private int pageSize = 0;
|
||||
private int pageSizeMax = 0;
|
||||
private String sortField = null;
|
||||
private String searchString = null;
|
||||
private boolean ascending = true;
|
||||
|
||||
String getSortField();
|
||||
public VascBackendListRequest() {
|
||||
parameters = new HashMap<String,Object>(10);
|
||||
}
|
||||
|
||||
boolean isSortAscending();
|
||||
public void setDataParameter(String key, Object data) {
|
||||
parameters.put(key,data);
|
||||
}
|
||||
|
||||
int getPageSize();
|
||||
public void removeDataParameter(String key) {
|
||||
parameters.remove(key);
|
||||
}
|
||||
|
||||
int getPageSizeMax();
|
||||
public void removeDataParameterAll() {
|
||||
parameters.clear();
|
||||
}
|
||||
|
||||
public Object getDataParameter(String key) {
|
||||
return parameters.get(key);
|
||||
}
|
||||
|
||||
public Set<String> getDataParameterKeys() {
|
||||
return parameters.keySet();
|
||||
}
|
||||
|
||||
public int getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
int getPageIndex();
|
||||
public void setPageIndex(int pageIndex) {
|
||||
this.pageIndex=pageIndex;
|
||||
}
|
||||
|
||||
String getSearchString();
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize=pageSize;
|
||||
}
|
||||
|
||||
public String getSearchString() {
|
||||
return searchString;
|
||||
}
|
||||
|
||||
public void setSearchString(String searchString) {
|
||||
this.searchString=searchString;
|
||||
}
|
||||
|
||||
public boolean isSortAscending() {
|
||||
return ascending;
|
||||
}
|
||||
|
||||
public void setSortAscending(boolean ascending) {
|
||||
this.ascending=ascending;
|
||||
}
|
||||
|
||||
public String getSortField() {
|
||||
return sortField;
|
||||
}
|
||||
|
||||
public void setSortField(String sortField) {
|
||||
this.sortField=sortField;
|
||||
}
|
||||
|
||||
public int getPageSizeMax() {
|
||||
return pageSizeMax;
|
||||
}
|
||||
|
||||
public void setPageSizeMax(int pageSizeMax) {
|
||||
this.pageSizeMax = pageSizeMax;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue