Interface DataAssociationHandler<T,A>

Type Parameters:
T - The type to get the associations from.
A - The type of the associations.
All Superinterfaces:
Plugin, Public

public interface DataAssociationHandler<T,A> extends Plugin
Handler for element associations.
Since:
5.2.101
  • Method Details

    • getType

      @NotNull @NotNull DataAssociationHandler.Type<? extends DataAssociationHandler<T,A>> getType()
      Returns the type token of this handler.
      Returns:
      The handler type.
      Since:
      5.2.101
    • associate

      @Nullable @Nullable Set<A> associate(@NotNull T object)
      Returns a set of objects the given object is associated with.
      Parameters:
      object - The object to get the associations from.
      Returns:
      The associated objects.
      Since:
      5.2.101
    • getId

      @NotNull @NotNull String getId(@NotNull A association)
      Returns the identifier of the given association. This identifier might be used in getAssociation(String) to get the association later again.
      Parameters:
      association - The association to get the identifier from.
      Returns:
      The identifier.
      Since:
      5.2.101
    • getAssociation

      @Nullable A getAssociation(@NotNull @NotNull String id)
      Gets the association belonging to the specified identifier, or null if the identifier is invalid or unknown.
      Parameters:
      id - The identifier of an assocation.
      Returns:
      The association belonging to the given id.
      Since:
      5.2.101