Class PsaRstApiEvtHdlIn

    • Constructor Detail

      • PsaRstApiEvtHdlIn

        public PsaRstApiEvtHdlIn​(PsaRstApiEvtHdlDat data)
        Constructor
        Parameters:
        data - event data
    • Method Detail

      • insertRecord

        protected de.pisa.psc.srv.dto.PscDto insertRecord()
                                                   throws java.lang.Exception
        create a new data object and insert one record
        Returns:
        the new data object with one row
        Throws:
        java.lang.Exception
      • insertRecord

        protected de.pisa.psc.srv.dto.PscDto insertRecord​(java.lang.Class<? extends PsaRstApiObjBas> object_class)
                                                   throws java.lang.Exception
        insert a record in a data object
        Parameters:
        object_class - class of the JSON object
        Returns:
        data object with the new row
        Throws:
        java.lang.Exception
      • updateRecord

        protected de.pisa.psc.srv.dto.PscDto updateRecord​(java.lang.Class<? extends PsaRstApiObjBas> object_class)
                                                   throws java.lang.Exception
        update a record in a data object
        Parameters:
        object_class - class of the JSON object
        Returns:
        data object with the new data
        Throws:
        java.lang.Exception
      • json2object

        protected <T extends PsaRstApiObjBas> T json2object​(java.lang.String json,
                                                            java.lang.Class<T> object_class)
        convert a JSON to an REST API object
        Type Parameters:
        T - type of the object
        Parameters:
        json - JSON
        object_class - class of the object
        Returns:
        object
      • getUsedFields

        protected java.util.List<java.lang.String> getUsedFields​(java.lang.Class<?> object_class)
        Get all data object fields that are mapped declared by the PsaRstApiMapFld or annotation
        Parameters:
        object_class - object class
        Returns:
        list of field names