Class HibernateUtil.FilterConfigurator

  • Enclosing class:
    HibernateUtil

    static class HibernateUtil.FilterConfigurator
    extends Object
    Helper class for defining filters at runtime.
    Since:
    3.8
    • Constructor Detail

      • FilterConfigurator

        FilterConfigurator()
    • Method Detail

      • createItemSpecificFilterDef

        void createItemSpecificFilterDef​(String name,
                                         Item itemType,
                                         Element classTag)
        Clone the <filter-def> with the given name and insert a new item-specific <filter-def> definition into the document given by the <class> element.
      • createGenericFilter

        void createGenericFilter​(String name,
                                 String condition,
                                 Element classTag)
        Generic filters can be added as <filter< elements in the mapping file.
      • createItemSpecificFilter

        void createItemSpecificFilter​(String name,
                                      Item itemType,
                                      String condition,
                                      Element classTag)
        Item-specific filters are stored internally and registered later by registerDelayedFilters(org.hibernate.boot.Metadata). We need to do this since a <filter> tag is not allowed for items defined with <subclass>. Programmatically we can add the filter later but not until the configuration process has gone far enough so that we have access to PersistentClass instances.