Interface ModelManagement<T>


  • public interface ModelManagement<T>
    Functions related to model processing functionality. This functionality is generated as static functions in the model class, but as it is not possible to have static functions implementing an interface, there is and additional static function management() that will return an instance of this interface which is simple a facade to the static functions. The point of doing this is to allow generic code that processes multiple models to be written more easily.
    Since:
    6 Oct 2022
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      jakarta.xml.bind.JAXBContext contextFactory()
      The context factory that can be used for full XML serialization.
      java.util.List<java.lang.Object> getContent()
      return the content to the model.
      boolean hasReferences()
      Utility method for discovering if model has referenced types.
      com.fasterxml.jackson.databind.ObjectMapper jsonMapper()
      Return a Jackson objectMapper suitable for JSON serialization.
      java.lang.String pu_name()
      the persistence unit name used by the model.
      T theModel()
      Get the model itself
      void writeXMLSchema()
      Deprecated.
      - should only use the schema generated by the top level tooling.
    • Method Detail

      • theModel

        T theModel()
        Get the model itself
        Returns:
        the top level model object.
      • getContent

        java.util.List<java.lang.Object> getContent()
        return the content to the model.
        Returns:
        the model content
      • pu_name

        java.lang.String pu_name()
        the persistence unit name used by the model.
        Returns:
        the name
      • writeXMLSchema

        void writeXMLSchema()
        Deprecated.
        - should only use the schema generated by the top level tooling.
        Write XML schema for the model. Note that these schema are internally generated by JAXB, and as such should not be regarded as the definitive schema to be published - they are used mainly in automated testing.
      • contextFactory

        jakarta.xml.bind.JAXBContext contextFactory()
                                             throws jakarta.xml.bind.JAXBException
        The context factory that can be used for full XML serialization.
        Returns:
        the context factory.
        Throws:
        jakarta.xml.bind.JAXBException - if something goes wrong with the creation of the context.
      • hasReferences

        boolean hasReferences()
        Utility method for discovering if model has referenced types.
        Returns:
        true if the model has references.
      • jsonMapper

        com.fasterxml.jackson.databind.ObjectMapper jsonMapper()
        Return a Jackson objectMapper suitable for JSON serialization.
        Returns:
        the objectmapper.