Interface DatabaseInstruction


public interface DatabaseInstruction
Represents a migration instruction set for the nitrite database.
Since:
4.0
Author:
Anindya Chatterjee
  • Method Details

    • addUser

      default DatabaseInstruction addUser(String username, String password)
      Adds an instruction to set a user authentication to the database.
      Parameters:
      username - the username
      password - the password
      Returns:
      the database instruction
    • changePassword

      default DatabaseInstruction changePassword(String username, String oldPassword, String newPassword)
      Adds an instruction to change the password for the user authentication to the database.
      Parameters:
      username - the username
      oldPassword - the old password
      newPassword - the new password
      Returns:
      the database instruction
    • dropCollection

      default DatabaseInstruction dropCollection(String collectionName)
      Adds an instruction to drop a NitriteCollection from the database.
      Parameters:
      collectionName - the collection name
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(Class<?> type)
      Adds an instruction to drop an ObjectRepository from the database.
      Parameters:
      type - the type
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(Class<?> type, String key)
      Adds an instruction to drop a keyed ObjectRepository from the database.
      Parameters:
      type - the type
      key - the key
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(EntityDecorator<?> entityDecorator)
      Adds an instruction to drop an ObjectRepository from the database.
      Parameters:
      entityDecorator - the entityDecorator
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(EntityDecorator<?> entityDecorator, String key)
      Adds an instruction to drop an ObjectRepository from the database.
      Parameters:
      entityDecorator - the entityDecorator
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(String typeName)
      Adds an instruction to drop an ObjectRepository from the database.
      Parameters:
      typeName - the type name
      Returns:
      the database instruction
    • dropRepository

      default DatabaseInstruction dropRepository(String typeName, String key)
      Adds an instruction to drop a keyed ObjectRepository from the database.
      Parameters:
      typeName - the type name
      key - the key
      Returns:
      the database instruction
    • customInstruction

      default DatabaseInstruction customInstruction(CustomInstruction instruction)
      Adds a custom instruction to perform a user defined operation on the database.
      Parameters:
      instruction - the instruction
      Returns:
      the database instruction
    • addStep

      void addStep(MigrationStep step)
      Adds a migration step to the instruction set.
      Parameters:
      step - the step