Search in sources :

Example 1 with DatatableDeleteValue

use of io.clownfish.clownfish.jdbc.DatatableDeleteValue in project Clownfish by rawdog71.

the class ClownfishUtil method getDatatabledeleteproperties.

/*
        getDatatabledeleteproperties
        Setzt die Properties für ein DB DELETE Aufruf
    */
public HashMap<String, DatatableDeleteProperties> getDatatabledeleteproperties(List<JsonFormParameter> postmap) {
    HashMap<String, DatatableDeleteProperties> datatabledeleteproperties = new HashMap<>();
    if (postmap != null) {
        postmap.stream().map((jfp) -> {
            // Datenbank DELETE Parameter
            if (jfp.getName().compareToIgnoreCase("db$tabledelete") == 0) {
                DatatableDeleteProperties dtdp = new DatatableDeleteProperties();
                dtdp.setTablename(jfp.getValue());
                datatabledeleteproperties.put(jfp.getValue(), dtdp);
            }
            return jfp;
        }).filter((jfp) -> (jfp.getName().startsWith("db$tabledelete$"))).forEach((jfp) -> {
            String rest = jfp.getName().substring(15);
            String[] values = rest.split("\\$");
            DatatableDeleteValue dtdv = new DatatableDeleteValue();
            dtdv.setField(values[1]);
            dtdv.setValue(jfp.getValue());
            datatabledeleteproperties.get(values[0]).getValuelist().add(dtdv);
        });
    }
    return datatabledeleteproperties;
}
Also used : Setter(lombok.Setter) Accessors(lombok.experimental.Accessors) Getter(lombok.Getter) EmailProperties(io.clownfish.clownfish.mail.EmailProperties) HashMap(java.util.HashMap) DatatableNewValue(io.clownfish.clownfish.jdbc.DatatableNewValue) ArrayList(java.util.ArrayList) DatatableDeleteValue(io.clownfish.clownfish.jdbc.DatatableDeleteValue) DatatableUpdateProperties(io.clownfish.clownfish.jdbc.DatatableUpdateProperties) DatatableCondition(io.clownfish.clownfish.jdbc.DatatableCondition) DatatableProperties(io.clownfish.clownfish.jdbc.DatatableProperties) List(java.util.List) Component(org.springframework.stereotype.Component) RfcFunctionParam(io.clownfish.clownfish.sap.models.RfcFunctionParam) Map(java.util.Map) JsonFormParameter(io.clownfish.clownfish.beans.JsonFormParameter) RFC_GET_FUNCTION_INTERFACE(io.clownfish.clownfish.sap.RFC_GET_FUNCTION_INTERFACE) CfSitesaprfc(io.clownfish.clownfish.dbentities.CfSitesaprfc) DatatableNewProperties(io.clownfish.clownfish.jdbc.DatatableNewProperties) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) DatatableDeleteProperties(io.clownfish.clownfish.jdbc.DatatableDeleteProperties) HashMap(java.util.HashMap) DatatableDeleteValue(io.clownfish.clownfish.jdbc.DatatableDeleteValue)

Aggregations

JsonFormParameter (io.clownfish.clownfish.beans.JsonFormParameter)1 CfSitesaprfc (io.clownfish.clownfish.dbentities.CfSitesaprfc)1 DatatableCondition (io.clownfish.clownfish.jdbc.DatatableCondition)1 DatatableDeleteProperties (io.clownfish.clownfish.jdbc.DatatableDeleteProperties)1 DatatableDeleteValue (io.clownfish.clownfish.jdbc.DatatableDeleteValue)1 DatatableNewProperties (io.clownfish.clownfish.jdbc.DatatableNewProperties)1 DatatableNewValue (io.clownfish.clownfish.jdbc.DatatableNewValue)1 DatatableProperties (io.clownfish.clownfish.jdbc.DatatableProperties)1 DatatableUpdateProperties (io.clownfish.clownfish.jdbc.DatatableUpdateProperties)1 EmailProperties (io.clownfish.clownfish.mail.EmailProperties)1 RFC_GET_FUNCTION_INTERFACE (io.clownfish.clownfish.sap.RFC_GET_FUNCTION_INTERFACE)1 RfcFunctionParam (io.clownfish.clownfish.sap.models.RfcFunctionParam)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 Getter (lombok.Getter)1 Setter (lombok.Setter)1 Accessors (lombok.experimental.Accessors)1 Component (org.springframework.stereotype.Component)1