public class GetModelTask extends Task
It is used as a data transfer object and hold the model name with its getter and setter method.
_isUpdateTask
Constructor and Description |
---|
GetModelTask(java.lang.String modelName)
Construct an instance of the object and set the model name to be fetched
from the database.
|
GetModelTask(java.lang.String modelName,
java.lang.String modelId)
Construct an instance of the object and set the model id to be fetched
from the database.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getModelId()
Return the model Id.
|
java.lang.String |
getModelName()
Return the model name that is needed to be fetched from the database.
|
boolean |
isModelFromCache()
Return if the model is to be read from cache or not.
|
void |
setModelFromCache(boolean isModelFromCache)
Set if the model is being retrieved from cache.
|
void |
setModelId(java.lang.String modelId)
Set the model Id.
|
void |
setModelName(java.lang.String modelName)
Set the model name to be fetched from the database.
|
isUpdateTask, setIsUpdateTask
public GetModelTask(java.lang.String modelName)
modelName
- the model name to be fetched from the database.public GetModelTask(java.lang.String modelName, java.lang.String modelId)
modelId
- the model id to be fetched from the database.modelName
- the model name to be fetched from the database.public java.lang.String getModelId()
setModelId(java.lang.String)
public java.lang.String getModelName()
setModelName(java.lang.String)
public boolean isModelFromCache()
public void setModelId(java.lang.String modelId)
modelId
- The model Id to be set.getModelId()
public void setModelName(java.lang.String modelName)
modelName
- the name of the model to be fetched from the database.getModelName()
public void setModelFromCache(boolean isModelFromCache)
isModelFromCache
- Boolean to indicate whether the model is being
retrieved from cache.