|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.util.databasechange.GenerateUuid
public class GenerateUuid
Uses Java's UUID
class to generate UUIDs for all rows in all tables in the tableNames
parameter.
This class should only be used if you are not using MySQL, Oracle, MsSql, or some other dbms that
has a UUID-like function.
Expects parameter: "tableNames" : whitespace delimited list of table names to add
Expects parameter: "columnName" : name of the column to change. Default: "uuid"
Expects parameter: "idExceptions" : list of id columns that don't follow the standard naming
convention. Should be a pipe-separated list of key=value, where key is the name an id column would
have by convention, and value is the name it actually has. In this example the id of the field_answer
table is 'field_id' rather than 'field_answer_id', etc:
"field_answer_id=field_id|role_id=role|privilege_id=privilege"
Constructor Summary | |
---|---|
GenerateUuid()
|
Method Summary | |
---|---|
void |
execute(liquibase.database.Database database)
Does the work of adding UUIDs to all rows. |
java.lang.String |
getConfirmationMessage()
|
void |
setColumnName(java.lang.String columnName)
This is called by liquibase to set the parameter "columnName" onto this change. |
void |
setFileOpener(liquibase.FileOpener fileOpener)
|
void |
setIdExceptions(java.lang.String idExceptions)
Way to specify the table id columns that don't follow the table_name.table_name_id pattern |
void |
setTableNames(java.lang.String tableNames)
This is called by liquibase to set the parameter "tableNames" onto this change. |
void |
setUp()
Get the values of the parameters passed in and set them to the local variables on this class. |
void |
validate(liquibase.database.Database database)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenerateUuid()
Method Detail |
---|
public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException, liquibase.exception.UnsupportedChangeException
execute
in interface liquibase.change.custom.CustomTaskChange
liquibase.exception.CustomChangeException
liquibase.exception.UnsupportedChangeException
CustomTaskChange.execute(liquibase.database.Database)
public java.lang.String getConfirmationMessage()
CustomChange.getConfirmationMessage()
public void setFileOpener(liquibase.FileOpener fileOpener)
CustomChange.setFileOpener(liquibase.FileOpener)
public void setUp() throws liquibase.exception.SetupException
liquibase.exception.SetupException
CustomChange.setUp()
public void validate(liquibase.database.Database database) throws liquibase.exception.InvalidChangeDefinitionException
liquibase.exception.InvalidChangeDefinitionException
CustomChange.validate(liquibase.database.Database)
public void setTableNames(java.lang.String tableNames)
tableNames
- the tableNames to setpublic void setColumnName(java.lang.String columnName)
columnName
- the columnName to setpublic void setIdExceptions(java.lang.String idExceptions)
idExceptions
-
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |