Class PersonsFilter

Object
PersonsFilter
All Implemented Interfaces:
DescriptorCustomizer
Direct Known Subclasses:
PersonsFilterForGuild, PersonsFilterForRoom

public abstract class PersonsFilter extends Object implements DescriptorCustomizer
This class is customizing the collection of Persons in an entity to only contain active persons. In other words, it is a kind of filter. This is typically EclipseLink and is not provided by JPA.
Author:
maartenl
See Also:
  • Constructor Details

    • PersonsFilter

      public PersonsFilter()
  • Method Details

    • getCollectionName

      protected abstract String getCollectionName()
      Returns:
      the name of the field in the entity that is the collection of Persons.
    • getFieldName

      protected abstract String getFieldName()
      Returns:
      the name of the field in the
      invalid reference
      Person
      Entity referring to the Entity that has the Customizer annotation.
    • getIdentifier

      protected abstract String getIdentifier()
      Returns:
      the identifier of the Entity that has the Customizer annotation.
    • customize

      public void customize(ClassDescriptor descriptor) throws Exception
      Adds the "active person" check to specific collections, as a filter.
      Specified by:
      customize in interface DescriptorCustomizer
      Parameters:
      descriptor - the class descriptor
      Throws:
      Exception - in case things go wrong.