package org.whole.lang.rdb.codebase; import org.whole.lang.builders.IBuilderOperation; import org.whole.lang.templates.AbstractTemplateFactory; public class CycleModel extends AbstractTemplateFactory<org.whole.lang.rdb.model.Database> { public void apply(IBuilderOperation op) { org.whole.lang.rdb.builders.IRDBBuilder b0 = (org.whole.lang.rdb.builders.IRDBBuilder) op.wGetBuilder(org.whole.lang.rdb.reflect.RDBLanguageKit.URI); b0.Database_(); b0.URI("jdbc:h2:mem:DBNAME"); b0.Namespace("org.whole.lang.rdb.generated"); b0.Schemas_(1); b0.Schema_(); b0.StringData("PUBLIC"); org.whole.lang.commons.builders.ICommonsBuilder b1 = (org.whole.lang.commons.builders.ICommonsBuilder) op.wGetBuilder(org.whole.lang.commons.reflect.CommonsLanguageKit.URI); b1.Resolver(); b0.Tables_(3); b0.Table_(); b0.StringData("AUTHOR"); b1.Resolver(); b0.Columns_(4); b0.Column_(); b0.StringData("AUTHOR_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(false); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("FIRST_NAME"); b1.Resolver(); b1.Resolver(); b0.Type("VARCHAR"); b0.IntData(128); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("LAST_NAME"); b1.Resolver(); b1.Resolver(); b0.Type("VARCHAR"); b0.IntData(128); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("BOOK_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0._Columns(); b0.PrimaryKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("p1"); b1.Quantifier("!"); b1._Variable(); b0.IdMethod("IDENTITY"); b0.ColumnNames_(1); b0.StringData("AUTHOR_ID"); b0._ColumnNames(); b0._PrimaryKey(); b0.ForeignKeys_(1); b0.ForeignKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("f1"); b1.Quantifier("!"); b1._Variable(); b0.StringData("BOOK"); b0.Action("RESTRICT"); b0.Action("RESTRICT"); b1.Resolver(); b0.ColumnReferences_(1); b0.ColumnReference_(); b0.StringData("BOOK_ID"); b0.StringData("BOOK_ID"); b0._ColumnReference(); b0._ColumnReferences(); b0._ForeignKey(); b0._ForeignKeys(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#Indices"); b1.VarName("i1"); b1.Quantifier("!"); b1._Variable(); b0.StringData(""); b0._Table(); b0.Table_(); b0.StringData("BOOK"); b1.Resolver(); b0.Columns_(5); b0.Column_(); b0.StringData("BOOK_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(false); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("TITLE"); b1.Resolver(); b1.Resolver(); b0.Type("VARCHAR"); b0.IntData(255); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("ISBN"); b1.Resolver(); b1.Resolver(); b0.Type("VARCHAR"); b0.IntData(24); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("MYPUBLISHER_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("MYPUBSECOND_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0._Columns(); b0.PrimaryKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("p2"); b1.Quantifier("!"); b1._Variable(); b0.IdMethod("IDENTITY"); b0.ColumnNames_(1); b0.StringData("BOOK_ID"); b0._ColumnNames(); b0._PrimaryKey(); b0.ForeignKeys_(1); b0.ForeignKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("f2"); b1.Quantifier("!"); b1._Variable(); b0.StringData("PUBLISHER"); b0.Action("RESTRICT"); b0.Action("RESTRICT"); b1.Resolver(); b0.ColumnReferences_(2); b0.ColumnReference_(); b0.StringData("MYPUBLISHER_ID"); b0.StringData("PUBLISHER_ID"); b0._ColumnReference(); b0.ColumnReference_(); b0.StringData("MYPUBSECOND_ID"); b0.StringData("PUBSECOND_ID"); b0._ColumnReference(); b0._ColumnReferences(); b0._ForeignKey(); b0._ForeignKeys(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#Indices"); b1.VarName("i2"); b1.Quantifier("!"); b1._Variable(); b0.StringData(""); b0._Table(); b0.Table_(); b0.StringData("PUBLISHER"); b1.Resolver(); b0.Columns_(4); b0.Column_(); b0.StringData("PUBLISHER_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(false); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("PUBSECOND_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(false); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("NAME"); b1.Resolver(); b1.Resolver(); b0.Type("VARCHAR"); b0.IntData(120); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0.Column_(); b0.StringData("AUTHOR_ID"); b1.Resolver(); b1.Resolver(); b0.Type("INTEGER"); b1.Resolver(); b1.Resolver(); b0.BooleanData(true); b1.Resolver(); b0.StringData(""); b0._Column(); b0._Columns(); b0.PrimaryKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("p3"); b1.Quantifier("!"); b1._Variable(); b0.IdMethod("IDENTITY"); b0.ColumnNames_(2); b0.StringData("PUBLISHER_ID"); b0.StringData("PUBSECOND_ID"); b0._ColumnNames(); b0._PrimaryKey(); b0.ForeignKeys_(1); b0.ForeignKey_(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#StringData"); b1.VarName("f3"); b1.Quantifier("!"); b1._Variable(); b0.StringData("AUTHOR"); b0.Action("RESTRICT"); b0.Action("RESTRICT"); b1.Resolver(); b0.ColumnReferences_(1); b0.ColumnReference_(); b0.StringData("AUTHOR_ID"); b0.StringData("AUTHOR_ID"); b0._ColumnReference(); b0._ColumnReferences(); b0._ForeignKey(); b0._ForeignKeys(); b1.Variable_(); b1.VarType("http://lang.whole.org/RDB#Indices"); b1.VarName("i3"); b1.Quantifier("!"); b1._Variable(); b0.StringData(""); b0._Table(); b0._Tables(); b0._Schema(); b0._Schemas(); b0._Database(); } }