public abstract class ActionBase extends Object implements ActionItemProperty, RequestParamProvider, com.opensymphony.xwork2.LocaleProvider
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
ActionBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addFieldError(String name,
Column column,
ErrorInfo error) |
Object |
getActionBean(Class<?> objClass,
boolean create) |
Object |
getActionBean(Class<?> objClass,
boolean create,
String ownerProperty) |
protected String |
getActionBeanName(com.opensymphony.xwork2.ActionContext context,
Class<?> objClass,
String ownerProperty) |
protected Object |
getActionObject(String name) |
protected String |
getActionObjectName(com.opensymphony.xwork2.ActionContext context,
String name) |
protected abstract Connection |
getConnection() |
abstract int |
getListPageSize() |
protected static DBColumnExpr |
getRecordKeyExpr(DBRowSet rowset,
String aliasName)
returns a DBColumnExpr that assembles a key for the given rowset/ table
this method should be used when selecting the id column of a table whith a non simple primary key
i.e.
|
protected Object[] |
getRecordKeyFromString(String s)
this method parses a key string and returns the result as an object array
|
String |
getRecordKeyString(Object[] key,
boolean isNew)
this method assembles all key values to a combined string
The key parts will be separated by forward slashes (KEY_SEP_CHAR)
thus the key parts must not contain forward slashes.
|
String |
getRecordKeyString(Record record)
this method assembles all key values to a combined string
The key parts will be separated by forward slashes (KEY_SEP_CHAR)
thus the key parts must not contain forward slashes.
|
protected boolean |
getRecordNewFlagFromString(String s)
this method checks a key string for a record new flag which indicates
that the record is transient i.e.
|
void |
putActionBean(Object obj) |
void |
putActionBean(Object obj,
String ownerProperty) |
protected void |
putActionObject(String name,
Object item) |
void |
removeActionBean(Class<?> objClass) |
void |
removeActionBean(Class<?> objClass,
String propertyName) |
protected void |
removeActionObject(String name) |
abstract void |
setActionError(Exception exception) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItemPropertyName
getRequestArrayParam, getRequestParam, getRequestParameters, hasRequestParam
protected abstract Connection getConnection()
public abstract void setActionError(Exception exception)
public abstract int getListPageSize()
protected String getActionObjectName(com.opensymphony.xwork2.ActionContext context, String name)
protected void removeActionObject(String name)
protected String getActionBeanName(com.opensymphony.xwork2.ActionContext context, Class<?> objClass, String ownerProperty)
public void putActionBean(Object obj)
public void removeActionBean(Class<?> objClass)
public String getRecordKeyString(Record record)
record
- the record for which to create a key stringpublic String getRecordKeyString(Object[] key, boolean isNew)
key
- the key values of the recordisNew
- flag indicating wether or not the record is a new recordprotected static DBColumnExpr getRecordKeyExpr(DBRowSet rowset, String aliasName)
rowset
- the table for which go create a record key expressionaliasName
- the name of the key expression in the resultset ( ... AS aliasName)protected Object[] getRecordKeyFromString(String s)
s
- the key string (e.g. taken from the request)protected boolean getRecordNewFlagFromString(String s)
s
- the key string (e.g. taken from the request)Copyright © 2008–2015 Apache Software Foundation. All rights reserved.