Class SimpleRepositoryMethodDeleteHandler

java.lang.Object
io.github.blyznytsiaorg.bibernate.dao.method.handler.SimpleRepositoryMethodDeleteHandler
All Implemented Interfaces:
SimpleRepositoryMethodHandler

public class SimpleRepositoryMethodDeleteHandler extends Object implements SimpleRepositoryMethodHandler
Handler for executing the delete method in a simple repository. Implements the SimpleRepositoryMethodHandler interface.
Since:
1.0
Author:
Blyzhnytsia Team
  • Field Details

  • Constructor Details

    • SimpleRepositoryMethodDeleteHandler

      public SimpleRepositoryMethodDeleteHandler()
  • Method Details

    • isMethodHandle

      public boolean isMethodHandle(Method method)
      Checks if the given method is the delete method.
      Specified by:
      isMethodHandle in interface SimpleRepositoryMethodHandler
      Parameters:
      method - The method to check.
      Returns:
      true if the method is delete, false otherwise.
    • execute

      public Object execute(Method method, Object[] parameters, RepositoryDetails repositoryDetails, MethodMetadata methodMetadata)
      Executes the delete method in the simple repository.
      Specified by:
      execute in interface SimpleRepositoryMethodHandler
      Parameters:
      method - The delete method to execute.
      parameters - The parameters for the delete method invocation.
      repositoryDetails - Details about the repository, including its name, primary key type, entity type, etc.
      methodMetadata - Metadata for the repository method, including its name, return type, and parameters.
      Returns:
      The result of the delete method execution, which is always Void.TYPE.