fluid-api/src/main/java/com/fluidbpm/program/api/vo/sqlutil/sqlnative/NativeSQLQuery.java
@Override
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //Datasource Name...
        if(this.getDatasourceName() != null) {
            
            returnVal.put(JSONMapping.DATASOURCE_NAME,
                    this.getDatasourceName());
        }

        //Query...
        if(this.getQuery() != null) {

            returnVal.put(JSONMapping.QUERY, this.getQuery());
        }

        //Stored Procedure...
        if(this.getStoredProcedure() != null) {

            returnVal.put(
                    JSONMapping.STORED_PROCEDURE,
                    this.getStoredProcedure());
        }

        //Inputs...
        if(this.getSqlInputs() != null)
        {
            JSONArray jsonArray = new JSONArray();

            for(SQLColumn toAdd : this.getSqlInputs())
            {
                jsonArray.put(toAdd.toJsonObject());
            }

            returnVal.put(JSONMapping.SQL_INPUTS, jsonArray);
        }
        
        return returnVal;
    }
@Override
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //Datasource Name...
        if(this.getDatasourceName() != null) {
            
            returnVal.put(JSONMapping.DATASOURCE_NAME,
                    this.getDatasourceName());
        }

        //Query...
        if(this.getQuery() != null) {

            returnVal.put(JSONMapping.QUERY, this.getQuery());
        }

        //Stored Procedure...
        if(this.getStoredProcedure() != null) {

            returnVal.put(
                    JSONMapping.STORED_PROCEDURE,
                    this.getStoredProcedure());
        }

        //Inputs...
        if(this.getSqlInputs() != null)
        {
            JSONArray jsonArray = new JSONArray();

            for(SQLColumn toAdd : this.getSqlInputs())
            {
                jsonArray.put(toAdd.toJsonObject());
            }

            returnVal.put(JSONMapping.SQL_INPUTS, jsonArray);
        }
        
        return returnVal;
    }
@ Override public JSONObject toJsonObject ( ) throws JSONException { JSONObject returnVal = super . toJsonObject ( ) ; //Datasource Name... if ( this . getDatasourceName ( ) != null ) { returnVal . put ( JSONMapping . DATASOURCE_NAME , this . getDatasourceName ( ) ) ; } //Query... if ( this . getQuery ( ) != null ) { returnVal . put ( JSONMapping . QUERY , this . getQuery ( ) ) ; } //Stored Procedure... if ( this . getStoredProcedure ( ) != null ) { returnVal . put ( JSONMapping . STORED_PROCEDURE , this . getStoredProcedure ( ) ) ; } //Inputs... if ( this . getSqlInputs ( ) != null ) { JSONArray jsonArray = new JSONArray ( ) ; for ( SQLColumn toAdd : this . getSqlInputs ( ) ) { jsonArray . put ( toAdd . toJsonObject ( ) ) ; } returnVal . put ( JSONMapping . SQL_INPUTS , jsonArray ) ; } return returnVal ; }
Conversion to {@code JSONObject} from Java Object.

@return {@code JSONObject} representation of {@code UserQuery}
@throws JSONException If there is a problem with the JSON Body.

@see ABaseFluidJSONObject#toJsonObject()
Conversion to { @code JSONObject } from Java Object .