Interface ForeignKeyConditionModel

All Superinterfaces:
AttributeConditionModel<Entity>, ConditionModel<Entity>

public interface ForeignKeyConditionModel extends AttributeConditionModel<Entity>
A foreign key condition model, the operands being entities of the referenced type.

The operand components are based on the models provided by models(), a combo box model and a search model per operand, each created on first access. The operands are plain values, independent of these models, a component based on one must be linked to the operand it edits, ConditionModel.Operands.equal() or ConditionModel.Operands.in(). Entities of the referenced type updated or deleted are replaced in, or removed from, the operands, via PersistenceEvents.

See Also:
  • Method Details

    • attribute

      ForeignKey attribute()
      Specified by:
      attribute in interface AttributeConditionModel<Entity>
      Returns:
      the attribute
    • models

      Returns:
      the models the operand components are based on
    • link

      Links this condition to the given master condition, the referenced entities offered by the models() restricted to those referring, via the given foreign key of the referenced entity, to the entities the master condition refers to, the EQUAL operand or the IN operands, none when the master condition is disabled or its operator negated. The operands of this condition no longer referred to are dropped.
      Parameters:
      master - the master condition
      foreignKey - the foreign key of the referenced entity, referencing the referenced entity type of the master condition
      Returns:
      the link, controlling the strictness of the filtering
      Throws:
      IllegalArgumentException - in case the given foreign key is not one of the referenced entity or does not reference the referenced entity type of the master condition, or the master condition is this condition
      IllegalStateException - in case this condition is already linked on the given foreign key
      See Also:
    • link

      Links this condition to the given master condition, the referenced entity having exactly one foreign key referencing the referenced entity type of the master condition.
      Parameters:
      master - the master condition
      Returns:
      the link, controlling the strictness of the filtering
      Throws:
      IllegalArgumentException - in case the referenced entity has none or several foreign keys referencing the referenced entity type of the master condition, or the master condition is this condition
      IllegalStateException - in case this condition is already linked on the foreign key
      See Also: