protected Serializable[] getParamValues(Serializable[] rawParamValues) throws SQLException
    {
        int nonPositionedParametersCount = 0;
        for (Serializable rawParamValue : rawParamValues)
        {
            if (rawParamValue != null && rawParamValue instanceof NonPositionedParameter) ++nonPositionedParametersCount;
        }
        Serializable[] paramValues = new Serializable[parameterNames.size() + nonPositionedParametersCount];
        Entity entity = (Entity)Optional.ofNullable(getParent()).filter(x -> x instanceof Entity).orElse(null);
        if (entity == null)
        {
            for (int i = 0; i < paramValues.length - nonPositionedParametersCount; ++i)
            {
                paramValues[i] = rawParamValues[paramMapping[i]];
            }
        }
        else
        {
            for (int i = 0; i < paramValues.length - nonPositionedParametersCount; ++i)
            {
                String paramName = parameterNames.get(i);
                paramValues[i] = entity.filterValue(paramName, rawParamValues[paramMapping[i]]);
            }
        }
        // non positioned parameters should always be given last (CB TODO - document)
        for (int i = 0; i < nonPositionedParametersCount; ++i)
        {
            paramValues[paramValues.length - nonPositionedParametersCount + i] = rawParamValues[rawParamValues.length - nonPositionedParametersCount + i];
        }
        return paramValues;
    }
protected Serializable[] getParamValues(Serializable[] rawParamValues) throws SQLException
    {
        int nonPositionedParametersCount = 0;
        for (Serializable rawParamValue : rawParamValues)
        {
            if (rawParamValue != null && rawParamValue instanceof NonPositionedParameter) ++nonPositionedParametersCount;
        }
        Serializable[] paramValues = new Serializable[parameterNames.size() + nonPositionedParametersCount];
        Entity entity = (Entity)Optional.ofNullable(getParent()).filter(x -> x instanceof Entity).orElse(null);
        if (entity == null)
        {
            for (int i = 0; i < paramValues.length - nonPositionedParametersCount; ++i)
            {
                paramValues[i] = rawParamValues[paramMapping[i]];
            }
        }
        else
        {
            for (int i = 0; i < paramValues.length - nonPositionedParametersCount; ++i)
            {
                String paramName = parameterNames.get(i);
                paramValues[i] = entity.filterValue(paramName, rawParamValues[paramMapping[i]]);
            }
        }
       
        for (int i = 0; i < nonPositionedParametersCount; ++i)
        {
            paramValues[paramValues.length - nonPositionedParametersCount + i] = rawParamValues[rawParamValues.length - nonPositionedParametersCount + i];
        }
        return paramValues;
    }
protected serializable[] getparamvalues(serializable[] rawparamvalues) throws sqlexception { int nonpositionedparameterscount = 0; for (serializable rawparamvalue : rawparamvalues) { if (rawparamvalue != null && rawparamvalue instanceof nonpositionedparameter) ++nonpositionedparameterscount; } serializable[] paramvalues = new serializable[parameternames.size() + nonpositionedparameterscount]; entity entity = (entity)optional.ofnullable(getparent()).filter(x -> x instanceof entity).orelse(null); if (entity == null) { for (int i = 0; i < paramvalues.length - nonpositionedparameterscount; ++i) { paramvalues[i] = rawparamvalues[parammapping[i]]; } } else { for (int i = 0; i < paramvalues.length - nonpositionedparameterscount; ++i) { string paramname = parameternames.get(i); paramvalues[i] = entity.filtervalue(paramname, rawparamvalues[parammapping[i]]); } } for (int i = 0; i < nonpositionedparameterscount; ++i) { paramvalues[paramvalues.length - nonpositionedparameterscount + i] = rawparamvalues[rawparamvalues.length - nonpositionedparameterscount + i]; } return paramvalues; }