kiurubeans
Class PersonSearch

java.lang.Object
  |
  +--kiurubeans.KiuruHandler
        |
        +--kiurubeans.SearchHandler
              |
              +--kiurubeans.PersonSearch
All Implemented Interfaces:
EnumType

public class PersonSearch
extends SearchHandler

Used for searches on the person table.


Field Summary
 
Fields inherited from class kiurubeans.SearchHandler
RESET_SEARCH, SUBMIT_SEARCH
 
Fields inherited from class kiurubeans.KiuruHandler
NO_ACTION
 
Constructor Summary
PersonSearch()
          Constructs a new instance of PersonSearch.
 
Method Summary
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 cleared when entity is posted.
static RS2 getPersonIdsFromSpaceGroup(int spacegroupid)
          Returns person information for given spacegroup.
 java.lang.String getPersonName()
          Getter for attribute name
 RS2 getPersons()
          Returns all persons with code match.
 RS2 getPersonsFromSpaceGroup(int spacegroupid)
          Returns person information for given spacegroup.
 void resetSearch()
          Implementation for RESET_SEARCH
 void setPersonName(java.lang.String name)
          Setter for attribute name
 void submitSearch()
          Implementation for SUBMIT_SEARCH
 
Methods inherited from class kiurubeans.SearchHandler
assignDefaultOrder, clearEmptyParameters, defaultAction, fieldIndexOf, getMaxState, 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
 

Constructor Detail

PersonSearch

public PersonSearch()
Constructs a new instance of PersonSearch. Defines ordeding.

Method Detail

getPersonName

public java.lang.String getPersonName()
Getter for attribute name

Returns:
person name used in query string

setPersonName

public void setPersonName(java.lang.String name)
Setter for attribute name

Parameters:
name - person name used in query string

submitSearch

public void submitSearch()
Implementation for SUBMIT_SEARCH

Specified by:
submitSearch in class SearchHandler

resetSearch

public void resetSearch()
Implementation for RESET_SEARCH

Specified by:
resetSearch in class SearchHandler

getPersonIdsFromSpaceGroup

public static RS2 getPersonIdsFromSpaceGroup(int spacegroupid)
                                      throws java.lang.Exception
Returns person information for given spacegroup.

Parameters:
spacegroupid - spacegroup to be searched
Returns:
(personid,accesslevel,modifyright)
Throws:
java.lang.Exception - if problems with db connection

getPersonsFromSpaceGroup

public RS2 getPersonsFromSpaceGroup(int spacegroupid)
                             throws java.lang.Exception
Returns person information for given spacegroup.

Parameters:
spacegroupid - spacegroup to be searched
Returns:
(personid,personname,personfirstname,organisationname,accesslevel,modifyright)
Throws:
java.lang.Exception - if problems with db connection

getPersons

public RS2 getPersons()
               throws java.lang.Exception
Returns all persons with code match. Note! This might be called automatically within performaction. Currently must be called manually.

Returns:
matched spaces (code,spaceid,spacetypename)
Throws:
java.lang.Exception - if problems with db connection

doClearActionState

protected void doClearActionState(javax.servlet.http.HttpServletRequest request)
Default implementation of clearing action state. Descendant classes may override this.

Overrides:
doClearActionState in class SearchHandler
Parameters:
request - The request-object of the JSP.
See Also:
SearchHandler.doClearActionState(HttpServletRequest)

doClearEmptyParameters

protected void doClearEmptyParameters(javax.servlet.http.HttpServletRequest request)
Ensures empty request parameters are cleared when entity is posted.

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.

Overrides:
doClearEmptyParameters in class SearchHandler
Parameters:
request - HTTP request with parameters
See Also:
SearchHandler.clearEmptyParameters(HttpServletRequest)