Class CacheableFileXmlSource

java.lang.Object
org.hibernate.boot.jaxb.internal.CacheableFileXmlSource

public class CacheableFileXmlSource extends Object
Support for creating a mapping binding from "cached" XML files.

This is a legacy feature, caching a serialized form of the JAXB model into a file for later use. While not deprecated per se, its use is discouraged.

See Also:
  • Constructor Details

    • CacheableFileXmlSource

      public CacheableFileXmlSource()
  • Method Details

    • fromCacheableFile

      public static Binding<? extends JaxbBindableMappingDescriptor> fromCacheableFile(File xmlFile, File serLocation, boolean strict, MappingBinder binder)
    • fromCacheableFile

      public static Binding<? extends JaxbBindableMappingDescriptor> fromCacheableFile(File xmlFile, File serLocation, Origin origin, boolean strict, MappingBinder binder)
    • resolveSerFile

      public static File resolveSerFile(File xmlFile, File serLocation)
      Determine the ser file for a given mapping XML file.
      Parameters:
      xmlFile - The source mapping XML file
      serLocation - The location details about the ser file. Can be one of 3 things:
      • null indicating we should calculate the File reference in the same directory as the xmlFile
      • a directory indicating we should calculate the File reference in the given directory the file to use
      Returns:
      The ser file reference.
    • determineCachedFile

      public static File determineCachedFile(File xmlFile)
    • determineCachedFile

      public static File determineCachedFile(File xmlFile, File serDirectory)
    • createSerFile

      public static void createSerFile(File xmlFile, MappingBinder binder)
    • createSerFile

      public static void createSerFile(File xmlFile, File outputFile, MappingBinder binder)
    • isSerfileObsolete

      public static boolean isSerfileObsolete(File xmlFile, File serFile)