- log()
- show()
- ask()
- getTables()
- getTableWhereNameEquals()
- getTablesWhereNameLike()
- getTablesWhereNameNotLike()
- Table.getColumns()
- Table.getColumnWhereNameEquals()
- Table.getColumnsWhereNameLike()
- Table.getColumnsWhereNameNotLike()
- Table.addColumn()
- Table.dropColumn()
- Table.logProperties()
Writes to the Data Modeler log window.
log(String message)
Name | Description |
---|---|
message | The message that is displayed in the log window |
Displays a message in a dialog box.
show (String message)
Name | Description |
---|---|
message | The message that is displayed in the dialog box |
Displays a message in a dialog box and returns the string that is input.
ask (String question)
Name | Description |
---|---|
question | The message that is displayed in the dialog box |
return | A String object containing the user input |
Returns a list of the table objects found in the current relational model.
getTables()
Name | Description |
---|---|
return | List of Table objects |
Returns the table with the given name (case insensitive) found in the current relational model.
getTableWhereNameEquals(String matcher)
Name | Description |
---|---|
matcher | A String that is the name of the table |
return | A Table object |
Returns a List of Table objects from the current relational model that match the given matcher (case insensitive).
This method compares the table names with the matcher and returns those table objects that match.
The matcher is case insensitive and recognizes wildcards of '*' and '%' at the beginning or end and can take several forms.
- A simple string: 'test'
- A string contining a list of comma-seperated values: 'abc, 123, *test'
- A Groovy List of strings: ['abc', '%123', 'test*']
getTablesWhereNameLike(matcher)
Name | Description |
---|---|
matcher | A String or List |
return | A List of Table objects |
Returns a List of Table objects from the current relational model that do not match the given matcher (case insensitive).
This method compares the table names with the matcher and returns those table objects that match.
The matcher is case insensitive and recognizes wildcards of '*' and '%' at the beginning or end and can take several forms.
- A simple string: 'test'
- A string contining a list of comma-seperated values: 'abc, 123, *test'
- A Groovy List of strings: ['abc', '%123', 'test*']
getTablesWhereNameNotLike(matcher)
Name | Description |
---|---|
matcher | A String or List |
return | A List of Table objects |
Returns all columns of a table.
getColumns()
getTables().each {table ->
log ("Table: ${table.name}")
table.getColumns().each {col ->
log (" ${col.name}")
}
}
// or, using Groovy's "getter as a property" goodness
tables.each {table ->
log ("Table: ${table.name}")
table.columns.each {col ->
log (" ${col.name}")
}
}
Name | Description |
---|---|
return | List of Column objects |
Returns the column of a table with the given name (case insensitive)
getColumnWhereNameEquals(String matcher)
Name | Description |
---|---|
matcher | A String that is the name of the column |
return | A Column object. |
Returns a List of Column objects that match the given matcher (case insensitive).
This method compares the column names with the matcher and returns those column objects that match.
The matcher is case insensitive and recognizes wildcards of '*' and '%' at the beginning or end and can take several forms.
- A simple string: 'test'
- A string contining a list of comma-seperated values: 'abc, 123, *test'
- A Groovy List of strings: ['abc', '%123', 'test*']
Table.getColumnsWhereNameLike(matcher)
Name | Description |
---|---|
matcher | A String or List |
return | A List of Column objects |
Returns a List of Column objects that do not match the given matcher (case insensitive).
This method compares the column names with the matcher and returns those column objects that do not match.
The matcher is case insensitive and recognizes wildcards of '*' and '%' at the beginning or end and can take several forms.
- A simple string: 'test'
- A string contining a list of comma-seperated values: 'abc, 123, *test'
- A Groovy List of strings: ['abc', '%123', 'test*']
Table.getColumnsWhereNameNotLike(matcher)
Name | Description |
---|---|
matcher | A String or List |
return | A List of Column objects |
Creates a column on the table using the provided information.
This method adds a column to the table. Currently Numeric, Varchar and Date data types are supported.
Name | Description |
---|---|
colName | The name of the new column |
datatype | The data type of the new column |
precisionOrSize | The precision of a numeric column, or the size of a varchar. Use '' for date. |
scaleOrType | The scale of a numeric column, or the type, byte or char, for a varchar. Use '' for date. |
Table.addColumn(String colName, String datatype, String precisionOrSize, String scaleOrType)
Removes a column from the table based on the name.
This method drops a column from the table.
Name | Description |
---|---|
colName | The name of the column to be dropped |
Table.dropColumn(String colName)
Outputs a listing of all properties of the table to the system log.
This method outputs all available properties of the given table to the system log.
This method is designed to allow for easier exploration of available properties, and is meant to be used along side of the index.html documentation file.
Some properties can not be displayed due to insufficient documentation of the getter methods, others may display null values for the same reason.
Table.logProperties()
Outputs a listing of all properties of the column to the system log.
This method outputs all available properties of the given column to the system log.
This method is designed to allow for easier exploration of available properties, and is meant to be used along side of the index.html documentation file.
Some properties can not be displayed due to insufficient documentation of the getter methods, others may display null values for the same reason.
Column.logProperties()