Package com.axelor.rpc
Class Request
java.lang.Object
com.axelor.rpc.Request
- Direct Known Subclasses:
ActionRequest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Requestcurrent()Class<?> Get the entity class on which the operation is being performed.Get the domain object context.getData()intgetLimit()getModel()intGet the raw context.Get aScriptHelperto evaluate expressions with current context.getUser()Get the current session user.booleanstatic voidRuns the task with the given request current, as during the web call it stands for, then restores the one current before: for code outside a web call that reaches what readscurrent(), such as a view processor.voidvoidvoidsetLimit(int limit) voidSet the model class that represents the requestdata.voidsetOffset(int offset) voidsetRecords(List<Object> records) voidsetRelated(Map<String, List<String>> related) voidvoidvoidsetTranslate(boolean translate)
-
Constructor Details
-
Request
public Request()
-
-
Method Details
-
current
-
runAs
Runs the task with the given request current, as during the web call it stands for, then restores the one current before: for code outside a web call that reaches what readscurrent(), such as a view processor. -
getModel
-
setModel
Set the model class that represents the requestdata.- Parameters:
model- the model class
-
getBeanClass
Get the entity class on which the operation is being performed.- Returns:
- bean class
-
getUser
Get the current session user.- Returns:
- current session
User
-
getLimit
public int getLimit() -
setLimit
public void setLimit(int limit) -
getOffset
public int getOffset() -
setOffset
public void setOffset(int offset) -
getSortBy
-
setSortBy
-
getData
-
setData
-
getRecords
-
setRecords
-
getFields
-
setFields
-
getRelated
-
setRelated
-
getSelect
-
setSelect
-
getCriteria
-
getRawContext
Get the raw context.The returned map is mutable so updating this map may cause some unexpected results. So use this method with care.
- Returns:
- map of context values
-
getScriptHelper
Get aScriptHelperto evaluate expressions with current context.- Returns:
- an instance of
ScriptHelperfor current context
-
getContext
Get the domain object context.- Returns:
- an instance of
Context
-
isTranslate
public boolean isTranslate() -
setTranslate
public void setTranslate(boolean translate)
-