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 
      Modifier and Type Method Description
      javax.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 serialzation.
      java.lang.String pu_name()
      the persistence unit name used by the model.
      T theModel()
      Get the model itself
      void writeXMLSchema()
      Write XML schema for the model.
    • 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()
                     throws javax.xml.bind.JAXBException,
                            java.io.IOException
        Write XML schema for the model.
        Throws:
        javax.xml.bind.JAXBException - if something goes wrong with the creation of the context.
        java.io.IOException - if something goes wrong with actually writing the schema files.
      • contextFactory

        javax.xml.bind.JAXBContext contextFactory()
                                           throws javax.xml.bind.JAXBException
        The context factory that can be used for full XML serialization.
        Returns:
        the context factory.
        Throws:
        javax.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 serialzation.
        Returns:
        the objectmapper.