org.shept.org.springframework.web.servlet.mvc.delegation.component
Class AbstractPersistenceComponent
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.support.WebContentGenerator
org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractComponent
org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractPersistenceComponent
- All Implemented Interfaces:
- WebComponent, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware
- Direct Known Subclasses:
- AbstractEditingComponent
public abstract class AbstractPersistenceComponent
- extends AbstractComponent
- implements org.springframework.beans.factory.InitializingBean, WebComponent
- Version:
- $$Id: AbstractPersistenceComponent.java 90 2010-11-30 14:31:06Z aha $$
- Author:
- Andi
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
logger |
| Methods inherited from class org.shept.org.springframework.web.servlet.mvc.delegation.component.AbstractComponent |
getAnchorPrefix, getDefaultMappings, getMappings, getResources, hasErrorsInPath, initApplicationContext, isCopyResources, modelRedirect, modelRedirect, modelRedirectClip, modelUnhandled, modelWithErrors, setAnchorPrefix, setCopyResources, setMappings, setResources, supportedActions, supportsAction |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPTIMISTIC_LOCKING_ERROR
public static final String OPTIMISTIC_LOCKING_ERROR
- See Also:
- Constant Field Values
DATA_INTEGRITY_ERROR
public static final String DATA_INTEGRITY_ERROR
- See Also:
- Constant Field Values
DATA_ACCESS_ERROR
public static final String DATA_ACCESS_ERROR
- See Also:
- Constant Field Values
enableSave
protected boolean enableSave
enableDelete
protected boolean enableDelete
reloadOnCancel
protected boolean reloadOnCancel
enableDaoTransactions
protected boolean enableDaoTransactions
transactionManager
protected org.springframework.transaction.PlatformTransactionManager transactionManager
dao
protected org.springframework.dao.support.DaoSupport dao
AbstractPersistenceComponent
public AbstractPersistenceComponent()
excecuteAction
public org.springframework.web.servlet.ModelAndView excecuteAction(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
ComponentToken token)
throws Exception
- Specified by:
excecuteAction in interface WebComponent
- Throws:
Exception
doActionInternal
protected abstract org.springframework.web.servlet.ModelAndView doActionInternal(javax.servlet.http.HttpServletRequest request,
ComponentToken token)
throws Exception
- Throws:
Exception
doInTransactionIfAvailable
protected void doInTransactionIfAvailable(org.springframework.transaction.support.TransactionCallback<Object> transactionCallback)
throws Exception
- Throws:
Exception
doSaveModel
protected void doSaveModel(Object modelObject)
doSaveModel
protected void doSaveModel(Object rowObject,
ModelCreation modelCreation)
doFlushSession
protected void doFlushSession()
doDeleteModel
protected boolean doDeleteModel(Object rowObject)
- Parameters:
- rowObject -
- Returns:
- true if the model is physically removed
getWrappedModel
protected Object getWrappedModel(Object model)
throws UnsupportedModelTransformation
- Throws:
UnsupportedModelTransformation
getDao
public org.springframework.dao.support.DaoSupport getDao()
- Returns:
- the dao
setDao
public void setDao(org.springframework.dao.support.DaoSupport dao)
- Parameters:
dao - the dao to set
setEnableSave
public void setEnableSave(boolean enableSave)
- Parameters:
enableUpdate - the enableUpdate to set
setEnableDelete
public void setEnableDelete(boolean enableDelete)
- Parameters:
enableDelete - the enableDelete to set
setTransactionManager
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
- Parameters:
transactionManager - the transactionManager to set
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
setReloadOnCancel
public void setReloadOnCancel(boolean reloadOnCancel)
- Parameters:
reloadOnCancel - the reloadOnCancel to set
isEnableSave
public boolean isEnableSave()
- Returns:
- the enableSave
isEnableDelete
public boolean isEnableDelete()
- Returns:
- the enableDelete
isReloadOnCancel
public boolean isReloadOnCancel()
- Returns:
- the reloadOnCancel
isEnableDaoTransactions
public boolean isEnableDaoTransactions()
- Returns:
- the enableDaoTransactions
setEnableDaoTransactions
public void setEnableDaoTransactions(boolean enableDaoTransactions)
- Parameters:
enableDaoTransactions - the enableDaoTransactions to set
Copyright © 2011. All Rights Reserved.