|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--kiurubeans.KiuruHandler
|
+--kiurubeans.SearchHandler
|
+--kiurubeans.SpaceSearch
Implement space searching, ordering & filtering
| Field Summary | |
static int |
ADD_RECORD
Adds new space. |
static int |
DELETE_SPACES
Deletes selected spaces. clears search field |
| Fields inherited from class kiurubeans.SearchHandler |
RESET_SEARCH, SUBMIT_SEARCH |
| Fields inherited from class kiurubeans.KiuruHandler |
NO_ACTION |
| Constructor Summary | |
SpaceSearch()
Constructs a new instance of SpaceSearch. |
|
| Method Summary | |
protected void |
defaultAction()
Performs action based on actionType. |
protected void |
doClearActionState(javax.servlet.http.HttpServletRequest request)
Default implementation of clearing action state. |
protected void |
doClearEmptyParameters(javax.servlet.http.HttpServletRequest request)
Ensures empty request parameters are clearer when entity is posted. |
java.lang.String |
getCode()
Getter for attribute code. |
static RS2 |
getFavoriteSpaces(int userId)
Returns favorite spaces of user with given id, null if not exists. |
static java.lang.String |
getFavoriteSpacesWithDelims(int userId,
java.lang.String delim)
Returns user's favorite space ids in a single delimited string, null if not exists |
protected int |
getMaxState()
Returns current max state value. |
boolean |
getOfficialOnly()
Getter for attribute officialOnly |
static java.lang.String |
getOfficialSqlClause(java.lang.String spacealias,
boolean officialOnly)
Returns SQL clause for getting only official spaces. |
static RS2 |
getPlainSpaceGroupSpaces(int spacegroupid)
Returns all spaces (code, spaceid) of a given spacegroup |
static RS2 |
getPlainSpaceGroupSpaces(java.lang.String[] spacegroupids,
java.lang.String[] spaceids)
Returns all spaces of given spacegroups + additional spaces in alphabethical order if no spacegroupids or spaceids are given, retuns NULL |
java.lang.String[] |
getSelectedSpaces()
Getter for attribute selectedSpaces |
java.lang.String |
getSelectedSpaces(int i)
Returns the ith selected space |
static RS2 |
getSpaceCodes(java.lang.String[] spaceids)
Returns space codes for spaces with given ids |
static RS2 |
getSpaceGroupSpaceIds(int spacegroupid)
Returns all spaceids of a given spacegroup |
static RS2 |
getSpaceGroupSpaces(int spacegroupid)
Returns all spaces (code, spaceid, spacetypename) of a given spacegroup |
static RS2 |
getSpaceGroupSpaces(java.lang.String[] spacegroupids,
java.lang.String[] spaceids)
Returns all spaces of given spacegroups + additional spaces in alphabethical order if no spacegroupids or spaceids are given, retuns NULL |
RS2 |
getSpaces()
Returns all spaces with code match. |
static RS2 |
getSpacesCode(int spaceId)
Gets code of given space. |
void |
resetSearch()
Implementation for RESET_SEARCH |
void |
setCode(java.lang.String code)
Setter for attribute code. |
void |
setOfficialOnly(boolean b)
Setter for attribute officialOnly |
void |
setSelectedSpaces(int i,
java.lang.String s)
Sets the ith selected space |
void |
setSelectedSpaces(java.lang.String[] s)
Setter for attribute selectedSpaces |
void |
setSubmitAdd(java.lang.String s)
Sets bean state to ADD_RECORD. |
void |
setSubmitDelete(java.lang.String s)
Sets bean state to DELETE_SPACES. |
void |
submitSearch()
Implementation for SUBMIT_SEARCH |
| Methods inherited from class kiurubeans.SearchHandler |
assignDefaultOrder, clearEmptyParameters, fieldIndexOf, getOrder, getOrderClause, getVisibleFields, getVisibleFields, setContinueSearch, setOrder, setSubmitSearch, setVisibleFields, setVisibleFields |
| Methods inherited from class kiurubeans.KiuruHandler |
addError, addNotice, getEnumState, getError, getLangId, getOk, getUser, performAction, resetActionState, resetErrorState, setEnumState, setError, setOk, setUser |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ADD_RECORD
public static final int DELETE_SPACES
| Constructor Detail |
public SpaceSearch()
| Method Detail |
protected int getMaxState()
getMaxState in class SearchHandlerpublic java.lang.String[] getSelectedSpaces()
public void setSelectedSpaces(java.lang.String[] s)
s - spaces selected by user
public void setSelectedSpaces(int i,
java.lang.String s)
i - Which space is going to be sets - The id of the selected spacepublic java.lang.String getSelectedSpaces(int i)
i - Which space is given
public boolean getOfficialOnly()
public void setOfficialOnly(boolean b)
b - determines if only official spaces are retrieved
public static java.lang.String getOfficialSqlClause(java.lang.String spacealias,
boolean officialOnly)
spacealias - space table alias used in sqlofficialOnly - if true, only official spaces are returned
public java.lang.String getCode()
public void setCode(java.lang.String code)
code - user's query stringpublic void setSubmitDelete(java.lang.String s)
s - any nonempty string.DELETE_SPACESpublic void setSubmitAdd(java.lang.String s)
s - any nonempty string.ADD_RECORDprotected void doClearEmptyParameters(javax.servlet.http.HttpServletRequest request)
If bean is used in a JSP, this should be called in the beginning of page. If form content is "" or null it is not sent via HTTP, so those fields must be cleared manually.
doClearEmptyParameters in class SearchHandlerrequest - HTTP request with parametersSearchHandler.clearEmptyParameters(HttpServletRequest)
public static RS2 getSpaceGroupSpaces(int spacegroupid)
throws java.lang.Exception
spacegroupid - spacegroup where spaces should be located
java.lang.Exception - if problems with db connection
public static RS2 getPlainSpaceGroupSpaces(int spacegroupid)
throws java.lang.Exception
spacegroupid - spacegroup where spaces should be located
java.lang.Exception - if problems with db connection
public static RS2 getSpaceGroupSpaceIds(int spacegroupid)
throws java.lang.Exception
spacegroupid - spacegroup where spaces should be located
java.lang.Exception - if problems with db connection
public static RS2 getSpaceCodes(java.lang.String[] spaceids)
throws java.lang.Exception
spaceids - ids for spaces to be retrieved
java.lang.Exception - if problems with db connection
public static RS2 getSpaceGroupSpaces(java.lang.String[] spacegroupids,
java.lang.String[] spaceids)
throws java.lang.Exception
spacegroupids - input spacegroupidsspaceids - inputspaceids
java.lang.Exception - if problems with db connetions
public static RS2 getPlainSpaceGroupSpaces(java.lang.String[] spacegroupids,
java.lang.String[] spaceids)
throws java.lang.Exception
spacegroupids - input spacegroupidsspaceids - inputspaceids
java.lang.Exception - if problems with db connetions
public RS2 getSpaces()
throws java.lang.Exception
java.lang.Exception - if problems with db connectionprotected void doClearActionState(javax.servlet.http.HttpServletRequest request)
doClearActionState in class SearchHandlerrequest - The request-object of the JSP.SearchHandler.doClearActionState(HttpServletRequest)
protected void defaultAction()
throws java.lang.Exception
defaultAction in class SearchHandlerjava.lang.Exception - If something went wrong during actual executed action.KiuruHandler.performAction()public void submitSearch()
submitSearch in class SearchHandlerpublic void resetSearch()
resetSearch in class SearchHandler
public static RS2 getFavoriteSpaces(int userId)
throws java.lang.Exception
userId - user whose favorites we are getting
java.lang.Exception - if problems with db connection
public static java.lang.String getFavoriteSpacesWithDelims(int userId,
java.lang.String delim)
throws java.lang.Exception
userId - user whose favorites we are gettingdelim - string delimiter
java.lang.Exception - if problems with db connection
public static RS2 getSpacesCode(int spaceId)
throws java.lang.Exception
spaceId - Id of given space.
java.lang.Exception - if problems with db connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||