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 Request
current()
Class<?>
getBeanClass()
Get the entity class on which the operation is being performed.Context
getContext()
Get the domain object context.Criteria
getCriteria()
Map<String,Object>
getData()
List<String>
getFields()
int
getLimit()
String
getModel()
int
getOffset()
Map<String,Object>
getRawContext()
Get the raw context.List<Object>
getRecords()
Map<String,List<String>>
getRelated()
ScriptHelper
getScriptHelper()
Get aScriptHelper
to evaluate expressions with current context.List<String>
getSortBy()
User
getUser()
Get the current session user.boolean
isTranslate()
void
setData(Map<String,Object> data)
void
setFields(List<String> fields)
void
setLimit(int limit)
void
setModel(String model)
Set the model class that represents the requestdata
.void
setOffset(int offset)
void
setRecords(List<Object> records)
void
setRelated(Map<String,List<String>> related)
void
setSortBy(List<String> sortBy)
-
-
-
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 aScriptHelper
to evaluate expressions with current context.- Returns:
- an instance of
ScriptHelper
for current context
-
getContext
public Context getContext()
Get the domain object context.- Returns:
- an instance of
Context
-
isTranslate
public boolean isTranslate()
-
-