Package org.dizitart.no2.migration
Interface DatabaseInstruction
public interface DatabaseInstruction
Represents a migration instruction set for the nitrite database.
- Since:
- 4.0
- Author:
- Anindya Chatterjee
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddStep(MigrationStep step) Adds a migration step to the instruction set.default DatabaseInstructionAdds an instruction to set a user authentication to the database.default DatabaseInstructionchangePassword(String username, String oldPassword, String newPassword) Adds an instruction to change the password for the user authentication to the database.default DatabaseInstructioncustomInstruction(CustomInstruction instruction) Adds a custom instruction to perform a user defined operation on the database.default DatabaseInstructiondropCollection(String collectionName) Adds an instruction to drop aNitriteCollectionfrom the database.default DatabaseInstructiondropRepository(Class<?> type) Adds an instruction to drop anObjectRepositoryfrom the database.default DatabaseInstructiondropRepository(Class<?> type, String key) Adds an instruction to drop a keyedObjectRepositoryfrom the database.default DatabaseInstructiondropRepository(String typeName) Adds an instruction to drop anObjectRepositoryfrom the database.default DatabaseInstructiondropRepository(String typeName, String key) Adds an instruction to drop a keyedObjectRepositoryfrom the database.default DatabaseInstructiondropRepository(EntityDecorator<?> entityDecorator) Adds an instruction to drop anObjectRepositoryfrom the database.default DatabaseInstructiondropRepository(EntityDecorator<?> entityDecorator, String key) Adds an instruction to drop anObjectRepositoryfrom the database.
-
Method Details
-
addUser
Adds an instruction to set a user authentication to the database.- Parameters:
username- the usernamepassword- the password- Returns:
- the database instruction
-
changePassword
Adds an instruction to change the password for the user authentication to the database.- Parameters:
username- the usernameoldPassword- the old passwordnewPassword- the new password- Returns:
- the database instruction
-
dropCollection
Adds an instruction to drop aNitriteCollectionfrom the database.- Parameters:
collectionName- the collection name- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop anObjectRepositoryfrom the database.- Parameters:
type- the type- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop a keyedObjectRepositoryfrom the database.- Parameters:
type- the typekey- the key- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop anObjectRepositoryfrom the database.- Parameters:
entityDecorator- the entityDecorator- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop anObjectRepositoryfrom the database.- Parameters:
entityDecorator- the entityDecorator- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop anObjectRepositoryfrom the database.- Parameters:
typeName- the type name- Returns:
- the database instruction
-
dropRepository
Adds an instruction to drop a keyedObjectRepositoryfrom the database.- Parameters:
typeName- the type namekey- the key- Returns:
- the database instruction
-
customInstruction
Adds a custom instruction to perform a user defined operation on the database.- Parameters:
instruction- the instruction- Returns:
- the database instruction
-
addStep
Adds a migration step to the instruction set.- Parameters:
step- the step
-