home | career | drupal | java | mac | mysql | perl | scala | uml | unix

Groovy example source code file (CreateData.groovy)

This example Groovy source code file (CreateData.groovy) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

char, char, create, create, dain, groovy, increment, int, int, key, ok, primary, primary, table

The Groovy CreateData.groovy source code

println("Called with context: " + context)

db = context.lookup("/client/tools/DatabaseHome").create()

println("About to do queries on: " + db)

queries = [
        "CREATE TABLE account ( ssn CHAR(11) PRIMARY KEY, first_name CHAR(20), last_name CHAR(20), balance INT)",
        "CREATE TABLE entity ( id INT PRIMARY KEY AUTO INCREMENT, first_name CHAR(20), last_name CHAR(20) )"

for (sql in queries) {
    println("evaluating: " + sql)

println("creating entity bean")

context.lookup("/client/tests/entity/bmp/BasicBmpHome").create("Groovy Dain")



Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy CreateData.groovy source code file:

new blog posts


Copyright 1998-2014 Alvin Alexander, alvinalexander.com
All Rights Reserved.