Class EntityConditionModelFactory

java.lang.Object
is.codion.framework.model.EntityConditionModelFactory
All Implemented Interfaces:
Supplier<Map<Attribute<?>,ConditionModel<?>>>
Direct Known Subclasses:
SwingEntityConditionModelFactory

public class EntityConditionModelFactory extends Object implements Supplier<Map<Attribute<?>,ConditionModel<?>>>
A default ConditionModel factory for Entity based condition models.
  • Constructor Details

  • Method Details

    • get

      public final Map<Attribute<?>,ConditionModel<?>> get()
      Specified by:
      get in interface Supplier<Map<Attribute<?>,ConditionModel<?>>>
    • include

      protected boolean include(Column<?> column)
      Parameters:
      column - the column
      Returns:
      true if a condition model should be included for the given column
    • include

      protected boolean include(ForeignKey foreignKey)
      Parameters:
      foreignKey - the foreign key
      Returns:
      true if a condition model should be included for the given foreign key
    • conditionModel

      protected <T> ConditionModel<T> conditionModel(Column<T> column)
      Only called if include(Column) returns true
      Type Parameters:
      T - the column type
      Parameters:
      column - the column
      Returns:
      a ConditionModel based on the given column
    • conditionModel

      protected ForeignKeyConditionModel conditionModel(ForeignKey foreignKey)
      Only called if include(ForeignKey) returns true
      Parameters:
      foreignKey - the foreign key
      Returns:
      a ForeignKeyConditionModel based on the given foreign key
    • createEqualSearchModel

      protected EntitySearchModel createEqualSearchModel(ForeignKey foreignKey)
      Parameters:
      foreignKey - the foreign key
      Returns:
      a search model to use for the equal value
    • createInSearchModel

      protected EntitySearchModel createInSearchModel(ForeignKey foreignKey)
      Parameters:
      foreignKey - the foreign key
      Returns:
      a search model to use for the in values
    • connectionProvider

      protected final EntityConnectionProvider connectionProvider()
      Returns:
      the underlying connection provider
    • definition

      protected final EntityDefinition definition()
      Returns:
      the underlying EntityDefinition
    • definition

      protected final EntityDefinition definition(EntityType entityType)
      Parameters:
      entityType - the entity type
      Returns:
      the definition of the given type