package org.whole.lang.rdb.codebase;
import org.whole.lang.builders.IBuilderOperation;
import org.whole.lang.templates.AbstractTemplateFactory;
public class SampleDatabase 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("http://rdb.lang.whole.org");
b0.Namespace("org.whole.lang.rdb");
b0.Schemas_(1);
b0.Schema_();
b0.StringData("SampleDB");
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_(3);
b0.Column_();
b0.StringData("author_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("first_name");
b1.Resolver();
b1.Resolver();
b0.Type("VARCHAR");
b0.IntData(128);
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("last_name");
b1.Resolver();
b1.Resolver();
b0.Type("VARCHAR");
b0.IntData(128);
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0._Columns();
b0.PrimaryKey_();
b0.StringData("author_pkey");
b0.IdMethod("IDENTITY");
b0.ColumnNames_(1);
b0.StringData("author_id");
b0._ColumnNames();
b0._PrimaryKey();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0._Table();
b0.Table_();
b0.StringData("Book");
b1.Resolver();
b0.Columns_(6);
b0.Column_();
b0.StringData("book_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("title");
b1.Resolver();
b1.Resolver();
b0.Type("VARCHAR");
b0.IntData(255);
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("isbn");
b1.Resolver();
b1.Resolver();
b0.Type("VARCHAR");
b0.IntData(24);
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("mypublisher_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("mypubsecond_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("author_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0._Columns();
b0.PrimaryKey_();
b0.StringData("book_pkey");
b0.IdMethod("IDENTITY");
b0.ColumnNames_(1);
b0.StringData("book_id");
b0._ColumnNames();
b0._PrimaryKey();
b0.ForeignKeys_(2);
b0.ForeignKey_();
b1.Resolver();
b0.StringData("Author");
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0.ColumnReferences_(1);
b0.ColumnReference_();
b0.StringData("author_id");
b0.StringData("author_id");
b0._ColumnReference();
b0._ColumnReferences();
b0._ForeignKey();
b0.ForeignKey_();
b1.Resolver();
b0.StringData("Publisher");
b1.Resolver();
b1.Resolver();
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.Resolver();
b1.Resolver();
b0._Table();
b0.Table_();
b0.StringData("Publisher");
b1.Resolver();
b0.Columns_(3);
b0.Column_();
b0.StringData("publisher_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("pubsecond_id");
b1.Resolver();
b1.Resolver();
b0.Type("INTEGER");
b1.Resolver();
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0.Column_();
b0.StringData("name");
b1.Resolver();
b1.Resolver();
b0.Type("VARCHAR");
b0.IntData(120);
b1.Resolver();
b0.BooleanData(false);
b1.Resolver();
b1.Resolver();
b0._Column();
b0._Columns();
b0.PrimaryKey_();
b0.StringData("publisher_pkey");
b0.IdMethod("IDENTITY");
b0.ColumnNames_(2);
b0.StringData("publisher_id");
b0.StringData("pubsecond_id");
b0._ColumnNames();
b0._PrimaryKey();
b1.Resolver();
b1.Resolver();
b1.Resolver();
b0._Table();
b0._Tables();
b0._Schema();
b0._Schemas();
b0._Database();
}
}