|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: Nested | Field | Constructor | Method | Details: Field | Constructor | Method |
java.lang.Objectjp.terasoluna.fw.service.thin.BLogicResult
public class BLogicResult
Business logic output information class.
Perform data mapping into Web tier such as form and session.
Coding is not necessary since the BLogicMapper
itself performs the mapping process. For each action,
the contents of data to be mapped and the mapping destination into Web tier should be specified in blogic-io.xml.
For these settings, refer to
BLogicIOPlugIn
The information which should be set in this class is as follows.
public BLogicResult execute(ParamsBean params) {
// Perform new in BLogic and generate BLogicResult.
BLogicResult result = new BLogicResult();
...
//Business logic
...
//Error result
if (// Error condition ) {
// Set the information that should be mapped into form and session.
ResultBean bean = new ResultBean();
bean.setUserId(userId);
result.setResultObject(bean);
// Specify "success" in the execution result
result.setResultString("success");
return result;
} else {
// Error occurs in business logic
// For error,setBLogicMessages in BLogicResult
result.setErrors(errorMessages);
// Specify "failure" in execution result
result.setResultString("failure");
return result;
}
}
BLogicIOPlugIn
,
AbstractBLogicMapper
,
BLogicMapper
,
BLogicIO
,
BLogicProperty
,
BLogicResources
,
AbstractBLogicAction
,
BLogicAction
,
Serialized formField Summary | |
---|---|
private BLogicMessages |
errors
BLogicMessages for errors generated in business logic. |
private BLogicMessages |
messages
BLogicMessages used for messages and generated in business logic. |
private java.lang.Object |
resultObject
JavaBean wherein execution result of business logic is stored. |
private java.lang.String |
resultString
String that displays the execution result of business logic. |
private static long |
serialVersionUID
Serial version ID |
Constructor Summary | |
---|---|
BLogicResult()
|
Method Summary | |
---|---|
BLogicMessages |
getErrors()
Fetch the BLogicMessages for errors generated in business logic. |
BLogicMessages |
getMessages()
Fetch the BLogicMessages used for messages and generated in business logic. |
java.lang.Object |
getResultObject()
Fetch JavaBean wherein execution result of business logic is stored. |
java.lang.String |
getResultString()
Fetch the string that displays the execution result of business logic. |
void |
setErrors(BLogicMessages paramErrors)
Set BLogicMessages for the errros generated in business logic. |
void |
setMessages(BLogicMessages paramMessages)
Set BLogicMessages used for messages and generated in business logic. |
void |
setResultObject(java.lang.Object resultObject)
Set JavaBean wherein execution result of business logic is stored. |
void |
setResultString(java.lang.String resultString)
Set the string that displays the execution result of business logic. |
Method inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Details |
---|
private static final long serialVersionUID
private java.lang.Object resultObject
private java.lang.String resultString
private BLogicMessages errors
private BLogicMessages messages
Constructor Details |
---|
public BLogicResult()
Method Details |
---|
public BLogicMessages getErrors()
public BLogicMessages getMessages()
public void setErrors(BLogicMessages paramErrors)
paramErrors
- BLogicMessages for errors generated in business logicpublic void setMessages(BLogicMessages paramMessages)
paramMessages
- BLogicMessages used for messages and generated in business logicpublic java.lang.String getResultString()
public void setResultString(java.lang.String resultString)
resultString
- String that displays the execution result of business logicpublic java.lang.Object getResultObject()
public void setResultObject(java.lang.Object resultObject)
resultObject
- JavaBean wherein execution result of business logic is stored
|
||||||||||
Previous class Subsequent class | Frames No frames | |||||||||
Overview: Nested | Field | Constructor | Method | Details: Field | Constructor | Method |