Configurations - mhewedy/spwrap GitHub Wiki
You can configure spwrap when creating an instance of the DAO class by passing an instance of Config class to the DAO.Builder class.
DAO dao = new DAO.Builder(dataSource)
.config(new Config().useStatusFields(false)
// other configurations here
)
.build();
List of properties:
useStatusFields
Default value:
true
Description: Every Stored procedure that is being invoked byspwrapby default need to have the last 2 parameters as output parameters of typeSMALLINTandVARCHARto represent the stored procedure status code and message respectively. You can turn this feature off by setting this property value tofalse. (You never deal with these two parameters when implementingTypedOutputParamMapper).
successCode
Default value:
0
Description: As mentioned in the description ofuseStatusFields, that every stored procedure by default need to provide 2 additional output parameters at the last of parameter list to represent stored procedure status code and optional message. by default thecode0means success, so if your stored procedure returns values other than0, then aCallExceptionwill be thrown byspwrap, however if you just want to change the success value, then use this propertysuccessCode.