Package com.axelor.rpc
Class Request
- java.lang.Object
-
- com.axelor.rpc.Request
-
- Direct Known Subclasses:
ActionRequest
public class Request extends Object
-
-
Constructor Summary
Constructors Constructor Description Request()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Requestcurrent()Class<?>getBeanClass()Get the entity class on which the operation is being performed.ContextgetContext()Get the domain object context.CriteriagetCriteria()Map<String,Object>getData()List<String>getFields()intgetLimit()StringgetModel()intgetOffset()Map<String,Object>getRawContext()Get the raw context.List<Object>getRecords()Map<String,List<String>>getRelated()ScriptHelpergetScriptHelper()Get aScriptHelperto evaluate expressions with current context.Map<String,Object>getSelect()List<String>getSortBy()UsergetUser()Get the current session user.booleanisTranslate()voidsetData(Map<String,Object> data)voidsetFields(List<String> fields)voidsetLimit(int limit)voidsetModel(String model)Set the model class that represents the requestdata.voidsetOffset(int offset)voidsetRecords(List<Object> records)voidsetRelated(Map<String,List<String>> related)voidsetSelect(Map<String,Object> select)voidsetSortBy(List<String> sortBy)voidsetTranslate(boolean translate)
-
-
-
Method Detail
-
current
public static Request current()
-
getModel
public String getModel()
-
setModel
public void setModel(String model)
Set the model class that represents the requestdata.- Parameters:
model- the model class
-
getBeanClass
public Class<?> getBeanClass()
Get the entity class on which the operation is being performed.- Returns:
- bean class
-
getLimit
public int getLimit()
-
setLimit
public void setLimit(int limit)
-
getOffset
public int getOffset()
-
setOffset
public void setOffset(int offset)
-
getCriteria
public Criteria getCriteria()
-
getRawContext
public Map<String,Object> 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
public ScriptHelper getScriptHelper()
Get aScriptHelperto evaluate expressions with current context.- Returns:
- an instance of
ScriptHelperfor current context
-
getContext
public Context getContext()
Get the domain object context.- Returns:
- an instance of
Context
-
isTranslate
public boolean isTranslate()
-
setTranslate
public void setTranslate(boolean translate)
-
-