org.paneris.jal.controller
Class Admin
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.webmacro.servlet.PanerisPage
org.paneris.jal.controller.Admin
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, org.webmacro.WebMacro
public class Admin
- extends PanerisPage
Handle edit, display, multiple edit of DB tables.
- See Also:
- Serialized Form
Fields inherited from interface org.webmacro.WebMacro |
BUILD_DATE, VERSION |
Constructor Summary |
Admin()
|
Method Summary |
java.lang.String |
buildQuery(org.webmacro.servlet.WebContext context,
DDRecord tableRS,
java.lang.String table,
java.lang.String orderby,
java.lang.String ascdesc,
java.lang.String db,
java.lang.String selectExpression)
Find out if any other record in the database has the relevant field set
to this value. |
org.webmacro.Template |
handle(org.webmacro.servlet.WebContext context)
Handle this request to administer the database |
Methods inherited from class org.webmacro.servlet.PanerisPage |
destroy, destroyContext, doGet, doPost, error, execute, getBroker, getConfig, getConfig, getContext, getErrorTemplate, getErrorTemplateName, getErrorVariableName, getFastWriter, getLog, getLog, getTemplate, getURL, getWebContext, init, init, initWebContext, initWebMacro, newContext, newWebContext, setLocale, start, stop, writeTemplate, writeTemplate |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Admin
public Admin()
handle
public org.webmacro.Template handle(org.webmacro.servlet.WebContext context)
throws org.webmacro.servlet.HandlerException
- Handle this request to administer the database
- Specified by:
handle
in class PanerisPage
- Parameters:
context
- the WebContext
- Returns:
- a Template to be expanded
- Throws:
org.webmacro.servlet.HandlerException
- Cannot Connect to DB
org.webmacro.servlet.HandlerException
- Cannot find templates
HandlerException
- throw this to produce vanilla error messages
buildQuery
public java.lang.String buildQuery(org.webmacro.servlet.WebContext context,
DDRecord tableRS,
java.lang.String table,
java.lang.String orderby,
java.lang.String ascdesc,
java.lang.String db,
java.lang.String selectExpression)
throws java.lang.Exception
- Find out if any other record in the database has the relevant field set
to this value.
It is assumed that the id of this DDField is already
set to a value which we are going to use to insert this record into the
DB under (which could be 0)
- Parameters:
field
- the field we want to be uniquevalue
- the value we don't want to already exist for this field
- Returns:
- 'true' if the value already exists for this field,
'false' otherwise
- Throws:
java.lang.Exception
- DB problems
Copyright © 2000-2008 PanEris. All Rights Reserved.