package org.whole.lang.rdb; import org.whole.lang.builders.IBuilderOperation; import org.whole.lang.templates.AbstractTemplateFactory; public class RDBActions extends AbstractTemplateFactory<org.whole.lang.actions.model.LanguageActionFactory> { public void apply(IBuilderOperation op) { org.whole.lang.actions.builders.IActionsBuilder b0 = (org.whole.lang.actions.builders.IActionsBuilder) op.wGetBuilder(org.whole.lang.actions.reflect.ActionsLanguageKit.URI); b0.LanguageActionFactory_(); b0.URI("whole:org.whole.lang.rdb:RDBActions"); b0.Namespace("org.whole.lang.rdb"); b0.Name("RDBActions"); 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.URI("http://lang.whole.org/RDB"); b0.ToolbarActions_(); b1.Resolver(); b0.SimpleAction_(); b0.Label("Normalize"); org.whole.lang.queries.builders.IQueriesBuilder b2 = (org.whole.lang.queries.builders.IQueriesBuilder) op.wGetBuilder(org.whole.lang.queries.reflect.QueriesLanguageKit.URI); b2.Block_(2); b2.QueryDeclaration_(); b2.Name("removeRedundantIndexQualifiers"); b1.Resolver(); b2.Block_(2); b2.Delete_(); b2.Path_(7); b2.FeatureStep("schemas"); b2.Filter_(); b2.ChildStep(); b2.ExpressionTest_(); b2.Filter_(); b2.FeatureStep("name"); b2.VariableTest("schemaName"); b2._Filter(); b2._ExpressionTest(); b2._Filter(); b2.FeatureStep("tables"); b2.ChildStep(); b2.FeatureStep("indices"); b2.ChildStep(); b2.Filter_(); b2.FeatureStep("qualifier"); b2.VariableTest("schemaName"); b2._Filter(); b2._Path(); b2._Delete(); b2.SelfStep(); b2._Block(); b2._QueryDeclaration(); b2.Sequence_(1); b2.Call_(); b2.Name("removeRedundantIndexQualifiers"); b1.Resolver(); b2._Call(); b2._Sequence(); b2._Block(); b0._SimpleAction(); b1.Resolver(); b0.SimpleAction_(); b0.Label("Interpreter"); b2.Block_(2); b2.Filter_(); b1.SameStageFragment_(); org.whole.lang.workflows.builders.IWorkflowsBuilder b3 = (org.whole.lang.workflows.builders.IWorkflowsBuilder) op.wGetBuilder(org.whole.lang.workflows.reflect.WorkflowsLanguageKit.URI); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(2); b3.CreateJavaClassInstance_(); b3.Text("create a RDBSchemaToSQLStatementsQuery factory"); b3.Variable("rdbSchemaToSQLStatementsQuery"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.RDBSchemaToSQLStatementsQuery"); b3.StringLiteral("RDBSchemaToSQLStatementsQuery()"); b1.Resolver(); b3._CreateJavaClassInstance(); b3.InvokeJavaInstanceMethod_(); b3.Text("create a RDBSchemaToSQLStatementsQuery"); b1.Resolver(); b3.Variable("rdbSchemaToSQLStatementsQuery"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.RDBSchemaToSQLStatementsQuery"); b3.StringLiteral("create()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3._FlowObjects(); b3._Sequence(); b1._SameStageFragment(); b2.VariableTest("rdbSchemaToSQLStatements"); b2._Filter(); b2.For_(); b2.Path_(3); b2.FeatureStep("schemas"); b2.ChildStep(); b2.Call_(); b2.Name("rdbSchemaToSQLStatements"); b1.Resolver(); b2._Call(); b2._Path(); b1.SameStageFragment_(); b3.InvokeOperation_(); b3.Text("interpret sql statements"); b3.Variable("self"); b3.Operation("INTERPRETER"); b1.Resolver(); b3._InvokeOperation(); b1._SameStageFragment(); b2._For(); b2._Block(); b0._SimpleAction(); b0.SimpleAction_(); b0.Label("Artifacts Generator"); b2.Block_(7); b2.QueryDeclaration_(); b2.Name("toSpecificUri"); b2.Names_(3); b2.Name("baseUri"); b2.Name("modelName"); b2.Name("separator"); b2._Names(); b2.Block_(2); b2.Filter_(); b2.Choose_(2); b2.If_(); b2.ExpressionTest_(); b2.Singleton_(); b1.SameStageFragment_(); b3.InvokeJavaInstanceMethod_(); b3.Text("starts with \"urn:\"?"); b1.Resolver(); b3.Variable("baseUri"); b1.Resolver(); b3.StringLiteral("java.lang.String"); b3.StringLiteral("startsWith(java.lang.String)"); b3.Expressions_(1); b3.StringLiteral("urn:"); b3._Expressions(); b3._InvokeJavaInstanceMethod(); b1._SameStageFragment(); b2._Singleton(); b2._ExpressionTest(); b2.StringLiteral(":"); b2._If(); b2.Do_(); b2.StringLiteral("/"); b2._Do(); b2._Choose(); b2.VariableTest("separator"); b2._Filter(); b2.Addition_(); b2.VariableRefStep("baseUri"); b2.Addition_(); b2.VariableRefStep("separator"); b1.SameStageFragment_(); b3.InvokeJavaInstanceMethod_(); b3.Text("modelName to lower case"); b1.Resolver(); b3.Variable("modelName"); b1.Resolver(); b3.StringLiteral("java.lang.String"); b3.StringLiteral("toLowerCase()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b1._SameStageFragment(); b2._Addition(); b2._Addition(); b2._Block(); b2._QueryDeclaration(); b2.QueryDeclaration_(); b2.Name("toSpecificNamespace"); b2.Names_(2); b2.Name("baseNamespace"); b2.Name("modelName"); b2._Names(); b2.Addition_(); b2.VariableRefStep("baseNamespace"); b2.Addition_(); b2.StringLiteral("."); b1.SameStageFragment_(); b3.InvokeJavaInstanceMethod_(); b3.Text("modelName to lower case"); b1.Resolver(); b3.Variable("modelName"); b1.Resolver(); b3.StringLiteral("java.lang.String"); b3.StringLiteral("toLowerCase()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b1._SameStageFragment(); b2._Addition(); b2._Addition(); b2._QueryDeclaration(); b2.QueryDeclaration_(); b2.Name("initDatatypesMap"); b2.Names_(1); b2.Name("datatypesMap"); b2._Names(); b2.Block_(2); b2.QueryDeclaration_(); b2.Name("mapPut"); b2.Names_(2); b2.Name("name"); b2.Name("value"); b2._Names(); b1.SameStageFragment_(); b3.InvokeJavaInstanceMethod_(); b3.Text("put mapping"); b1.Resolver(); b3.Variable("self"); b1.Resolver(); b3.StringLiteral("java.util.Map"); b3.StringLiteral("put(java.lang.Object, java.lang.Object)"); b3.Expressions_(2); b3.Variable("name"); b3.Variable("value"); b3._Expressions(); b3._InvokeJavaInstanceMethod(); b1._SameStageFragment(); b2._QueryDeclaration(); b2.Path_(2); b1.SameStageFragment_(); b3.CreateJavaClassInstance_(); b3.Text("create a new hash map"); b1.Resolver(); b1.Resolver(); b3.StringLiteral("java.util.HashMap"); b3.StringLiteral("HashMap()"); b1.Resolver(); b3._CreateJavaClassInstance(); b1._SameStageFragment(); b2.Block_(27); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("BIT"); b2.StringLiteral("boolean"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("BOOLEAN"); b2.StringLiteral("boolean"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("TINYINT"); b2.StringLiteral("int"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("SMALLINT"); b2.StringLiteral("int"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("INTEGER"); b2.StringLiteral("int"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("BIGINT"); b2.StringLiteral("int"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("REAL"); b2.StringLiteral("float"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("FLOAT"); b2.StringLiteral("double"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("DOUBLE"); b2.StringLiteral("double"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("NUMERIC"); b2.StringLiteral("java.math.BigDecimal"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("DECIMAL"); b2.StringLiteral("java.math.BigDecimal"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("TEXT"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("DATALINK"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("REF"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("DATE"); b2.StringLiteral("java.sql.Date"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("TIME"); b2.StringLiteral("java.sql.Time"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("TIMESTAMP"); b2.StringLiteral("java.sql.Timestamp"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("ARRAY"); b2.StringLiteral("java.sql.Array"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("CHAR"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("VARCHAR"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("LONGVARCHAR"); b2.StringLiteral("String"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("BINARY"); b2.StringLiteral("Object"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("VARBINARY"); b2.StringLiteral("Object"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("LONGVARBINARY"); b2.StringLiteral("Object"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("BLOB"); b2.StringLiteral("java.sql.Blob"); b2._Expressions(); b2._Call(); b2.Call_(); b2.Name("mapPut"); b2.Expressions_(2); b2.StringLiteral("CLOB"); b2.StringLiteral("java.sql.Clob"); b2._Expressions(); b2._Call(); b2.SelfStep(); b2._Block(); b2._Path(); b2._Block(); b2._QueryDeclaration(); b2.QueryDeclaration_(); b2.Name("mapGet"); b2.Names_(2); b2.Name("name"); b2.Name("nameString"); b2._Names(); b1.SameStageFragment_(); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(2); b3.InvokeJavaInstanceMethod_(); b3.Text("convert name to string"); b3.Variable("nameString"); b3.Variable("name"); b1.Resolver(); b3.StringLiteral("org.whole.lang.model.IEntity"); b3.StringLiteral("wStringValue()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.InvokeJavaInstanceMethod_(); b3.Text("get mapping"); b1.Resolver(); b3.Variable("self"); b1.Resolver(); b3.StringLiteral("java.util.Map"); b3.StringLiteral("get(java.lang.Object)"); b3.Expressions_(1); b3.Variable("nameString"); b3._Expressions(); b3._InvokeJavaInstanceMethod(); b3._FlowObjects(); b3._Sequence(); b1._SameStageFragment(); b2._QueryDeclaration(); b2.Filter_(); b2.Call_(); b2.Name("initDatatypesMap"); b1.Resolver(); b2._Call(); b2.VariableTest("datatypesMap"); b2._Filter(); b2.Path_(2); b1.SameStageFragment_(); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(3); b3.CreateJavaClassInstance_(); b3.Text("create a CompleteRDBEntityMappingQuery factory"); b3.Variable("completeRDBEntityMappingQueryFactory"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.CompleteRDBEntityMappingQuery"); b3.StringLiteral("CompleteRDBEntityMappingQuery()"); b1.Resolver(); b3._CreateJavaClassInstance(); b3.InvokeJavaInstanceMethod_(); b3.Text("create a CompleteRDBEntityMappingQuery"); b3.Variable("completeRDBEntityMapping"); b3.Variable("completeRDBEntityMappingQueryFactory"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.CompleteRDBEntityMappingQuery"); b3.StringLiteral("create()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.InvokeJavaClassMethod_(); b3.Text("clone self model"); b1.Resolver(); b1.Resolver(); b3.StringLiteral("org.whole.lang.util.EntityUtils"); b3.StringLiteral("clone(org.whole.lang.model.IEntity)"); b3.Expressions_(1); b3.Variable("self"); b3._Expressions(); b3._InvokeJavaClassMethod(); b3._FlowObjects(); b3._Sequence(); b1._SameStageFragment(); b2.Filter_(); b2.Call_(); b2.Name("completeRDBEntityMapping"); b1.Resolver(); b2._Call(); b2.VariableTest("mappedModel"); b2._Filter(); b2._Path(); b2.Select_(); b1.StageUpFragment_(); org.whole.lang.artifacts.builders.IArtifactsBuilder b4 = (org.whole.lang.artifacts.builders.IArtifactsBuilder) op.wGetBuilder(org.whole.lang.artifacts.reflect.ArtifactsLanguageKit.URI); b4.Workspace_(); b1.Resolver(); b4.Projects_(1); b4.Project_(); b1.Variable_(); b1.VarType("http://lang.whole.org/Artifacts#ProjectName"); b1.VarName("projectName"); b1.Quantifier("!"); b1._Variable(); b4.Natures_(1); b1.Resolver(); b4._Natures(); b1.Resolver(); b4.Artifacts_(1); b4.FolderArtifact_(); b1.Variable_(); b1.VarType("http://lang.whole.org/Artifacts#FolderName"); b1.VarName("sourceFolderName"); b1.Quantifier("!"); b1._Variable(); b1.Resolver(); b4.Artifacts_(1); b4.PackageArtifact_(); b1.Variable_(); b1.VarType("http://lang.whole.org/Artifacts#PackageName"); b1.VarName("packageName"); b1.Quantifier("!"); b1._Variable(); b1.Resolver(); b4.Artifacts_(1); b1.Variable_(); b1.VarType("http://lang.whole.org/Artifacts#Artifact"); b1.VarName("modelArtifact"); b1.Quantifier("*"); b1._Variable(); b4._Artifacts(); b4._PackageArtifact(); b4._Artifacts(); b4._FolderArtifact(); b4._Artifacts(); b1.Resolver(); b4._Project(); b4._Projects(); b4._Workspace(); b1._StageUpFragment(); b2.Path_(1); b2.Filter_(); b2.VariableRefStep("mappedModel"); b2.And_(2); b2.ExpressionTest_(); b2.Filter_(); b2.FeatureStep("uri"); b2.VariableTest("baseUri"); b2._Filter(); b2._ExpressionTest(); b2.ExpressionTest_(); b2.Filter_(); b2.FeatureStep("namespace"); b2.VariableTest("baseNamespace"); b2._Filter(); b2._ExpressionTest(); b2._And(); b2._Filter(); b2._Path(); b2.Select_(); b2.Filter_(); b1.StageUpFragment_(); b4.FileArtifact_(); b4.NameWithExtension_(); b1.Variable_(); b1.VarType("http://lang.whole.org/Artifacts#Name"); b1.VarName("modelArtifactName"); b1.Quantifier("!"); b1._Variable(); b4.Extension("java"); b4._NameWithExtension(); b4.Metadata_(); b1.Resolver(); b1.Resolver(); b1.Resolver(); b1.Resolver(); b4.PersistenceKitId("org.whole.lang.java.codebase.JavaBuilderPersistenceKit"); b4._Metadata(); b1.StageUpFragment_(); org.whole.lang.models.builders.IModelsBuilder b5 = (org.whole.lang.models.builders.IModelsBuilder) op.wGetBuilder(org.whole.lang.models.reflect.ModelsLanguageKit.URI); b5.Model_(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#SimpleName"); b1.VarName("modelName"); b1.Quantifier("!"); b1._Variable(); b5.TypeRelations_(0); b5._TypeRelations(); b5.ModelDeclarations_(2); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#ModelDeclaration"); b1.VarName("simpleEntity"); b1.Quantifier("*"); b1._Variable(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#ModelDeclaration"); b1.VarName("dataEntity"); b1.Quantifier("*"); b1._Variable(); b5._ModelDeclarations(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#Namespace"); b1.VarName("namespace"); b1.Quantifier("!"); b1._Variable(); b1.Resolver(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#URI"); b1.VarName("uri"); b1.Quantifier("!"); b1._Variable(); b5._Model(); b1._StageUpFragment(); b4._FileArtifact(); b1._StageUpFragment(); b2.VariableTest("modelArtifact"); b2._Filter(); b2.Path_(2); b2.FeatureStep("schemas"); b2.ChildStep(); b2._Path(); b2.Sequence_(6); b2.Filter_(); b2.FeatureStep("modelName"); b2.VariableTest("modelName"); b2._Filter(); b2.Filter_(); b2.Call_(); b2.Name("toSpecificUri"); b2.Expressions_(2); b2.VariableRefStep("baseUri"); b2.VariableRefStep("modelName"); b2._Expressions(); b2._Call(); b2.VariableTest("uri"); b2._Filter(); b2.Filter_(); b2.Call_(); b2.Name("toSpecificNamespace"); b2.Expressions_(2); b2.VariableRefStep("baseNamespace"); b2.VariableRefStep("modelName"); b2._Expressions(); b2._Call(); b2.VariableTest("namespace"); b2._Filter(); b2.Filter_(); b2.Addition_(); b2.VariableRefStep("modelName"); b2.StringLiteral("Model"); b2._Addition(); b2.VariableTest("modelArtifactName"); b2._Filter(); b2.Select_(); b2.Filter_(); b1.StageUpFragment_(); b5.SimpleEntity_(); b5.EntityModifiers_(0); b5._EntityModifiers(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#SimpleName"); b1.VarName("entityName"); b1.Quantifier("!"); b1._Variable(); b5.Types_(0); b5._Types(); b5.Features_(1); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#Feature"); b1.VarName("feature"); b1.Quantifier("*"); b1._Variable(); b5._Features(); b5._SimpleEntity(); b1._StageUpFragment(); b2.VariableTest("simpleEntity"); b2._Filter(); b2.Path_(2); b2.FeatureStep("tables"); b2.ChildStep(); b2._Path(); b2.Sequence_(3); b2.Filter_(); b2.FeatureStep("entityName"); b2.VariableTest("entityName"); b2._Filter(); b2.Path_(2); b2.FeatureStep("primaryKey"); b2.Filter_(); b2.FeatureStep("columnNames"); b2.VariableTest("primaryKeyColumnNames"); b2._Filter(); b2._Path(); b2.Select_(); b2.Filter_(); b1.StageUpFragment_(); b5.Feature_(); b5.FeatureModifiers_(1); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#FeatureModifier"); b1.VarName("modifier"); b1.Quantifier("*"); b1._Variable(); b5._FeatureModifiers(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#SimpleName"); b1.VarName("featureType"); b1.Quantifier("!"); b1._Variable(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#SimpleName"); b1.VarName("featureName"); b1.Quantifier("!"); b1._Variable(); b1.Resolver(); b5._Feature(); b1._StageUpFragment(); b2.VariableTest("feature"); b2._Filter(); b2.Path_(2); b2.FeatureStep("columns"); b2.ChildStep(); b2._Path(); b2.Sequence_(4); b2.Filter_(); b2.FeatureStep("featureName"); b2.VariableTest("featureName"); b2._Filter(); b2.Filter_(); b2.FeatureStep("featureType"); b2.VariableTest("featureType"); b2._Filter(); b2.If_(); b2.ExpressionTest_(); b2.CartesianProduct_(2); b2.Path_(2); b2.VariableRefStep("primaryKeyColumnNames"); b2.Filter_(); b2.ChildStep(); b2.VariableTest("primaryKeyColumnName"); b2._Filter(); b2._Path(); b2.Filter_(); b2.FeatureStep("name"); b2.VariableTest("primaryKeyColumnName"); b2._Filter(); b2._CartesianProduct(); b2._ExpressionTest(); b2.Filter_(); b1.StageUpFragment_(); b5.FeatureModifier("id"); b1._StageUpFragment(); b2.VariableTest("modifier"); b2._Filter(); b2._If(); b2.If_(); b2.ExpressionTest_(); b2.Singleton_(); b2.FeatureStep("nullable"); b2._Singleton(); b2._ExpressionTest(); b2.Filter_(); b1.StageUpFragment_(); b5.FeatureModifier("optional"); b1._StageUpFragment(); b2.VariableTest("modifier"); b2._Filter(); b2._If(); b2._Sequence(); b2.TemplateNames(); b2._Select(); b2._Sequence(); b2.TemplateNames(); b2._Select(); b2.Select_(); b2.Filter_(); b1.StageUpFragment_(); b5.DataEntity_(); b5.EntityModifiers_(0); b5._EntityModifiers(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#SimpleName"); b1.VarName("entityName"); b1.Quantifier("!"); b1._Variable(); b5.Types_(0); b5._Types(); b1.Variable_(); b1.VarType("http://lang.whole.org/Models#DataType"); b1.VarName("dataType"); b1.Quantifier("!"); b1._Variable(); b5._DataEntity(); b1._StageUpFragment(); b2.VariableTest("dataEntity"); b2._Filter(); b2.Path_(5); b2.FeatureStep("tables"); b2.ChildStep(); b2.FeatureStep("columns"); b2.Filter_(); b2.ChildStep(); b2.ExpressionTest_(); b2.Filter_(); b2.FeatureStep("type"); b2.VariableTest("type"); b2._Filter(); b2._ExpressionTest(); b2._Filter(); b2.Filter_(); b2.FeatureStep("featureType"); b2.And_(2); b2.DistinctTest_(); b1.Resolver(); b2._DistinctTest(); b2.VariableTest("entityName"); b2._And(); b2._Filter(); b2._Path(); b2.Sequence_(1); b2.Path_(2); b2.VariableRefStep("datatypesMap"); b2.Filter_(); b2.Call_(); b2.Name("mapGet"); b2.Expressions_(1); b2.VariableRefStep("type"); b2._Expressions(); b2._Call(); b2.VariableTest("dataType"); b2._Filter(); b2._Path(); b2._Sequence(); b2.TemplateNames(); b2._Select(); b2._Sequence(); b2.TemplateNames(); b2._Select(); b2.TemplateNames(); b2._Select(); b2._Block(); b0._SimpleAction(); b0._ToolbarActions(); b0.ContextMenuActions_(); b0.MenuActions_(1); b0.GuardedAction_(); b0.Label("Remove Primary Keys Indices"); b2.For_(); b2.Path_(4); b2.FeatureStep("schemas"); b2.ChildStep(); b2.FeatureStep("tables"); b2.ChildStep(); b2._Path(); b2.Sequence_(3); b2.Path_(2); b2.FeatureStep("primaryKey"); b2.Filter_(); b2.FeatureStep("columnNames"); b2.VariableTest("pkColumnNames"); b2._Filter(); b2._Path(); b2.Delete_(); b2.Path_(2); b2.FeatureStep("indices"); b2.Filter_(); b2.ChildStep(); b2.And_(2); b2.ExpressionTest_(); b2.Filter_(); b2.FeatureStep("unique"); b2.ExpressionTest_(); b1.StageUpFragment_(); org.whole.lang.rdb.builders.IRDBBuilder b6 = (org.whole.lang.rdb.builders.IRDBBuilder) op.wGetBuilder(org.whole.lang.rdb.reflect.RDBLanguageKit.URI); b6.BooleanData(true); b1._StageUpFragment(); b2._ExpressionTest(); b2._Filter(); b2._ExpressionTest(); b2.ExpressionTest_(); b2.PointwiseEquals_(); b2.Path_(3); b2.FeatureStep("columnIndices"); b2.ChildStep(); b2.FeatureStep("name"); b2._Path(); b2.Path_(2); b2.VariableRefStep("pkColumnNames"); b2.ChildStep(); b2._Path(); b2._PointwiseEquals(); b2._ExpressionTest(); b2._And(); b2._Filter(); b2._Path(); b2._Delete(); b2.Delete_(); b2.Path_(1); b2.Filter_(); b2.FeatureStep("indices"); b2.Not_(); b2.ExpressionTest_(); b2.ChildStep(); b2._ExpressionTest(); b2._Not(); b2._Filter(); b2._Path(); b2._Delete(); b2._Sequence(); b2._For(); b2.TypeTest("Database"); b0._GuardedAction(); b0._MenuActions(); b0.MenuActions_(0); b0._MenuActions(); b0.MenuActions_(0); b0._MenuActions(); b0.MenuActions_(2); b0.GuardedAction_(); b0.Label("Generate SQL Statements"); b2.Block_(2); b2.Filter_(); b1.SameStageFragment_(); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(2); b3.CreateJavaClassInstance_(); b3.Text("create a RDBSchemaToSQLStatementsQuery factory"); b3.Variable("rdbSchemaToSQLStatementsQuery"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.RDBSchemaToSQLStatementsQuery"); b3.StringLiteral("RDBSchemaToSQLStatementsQuery()"); b1.Resolver(); b3._CreateJavaClassInstance(); b3.InvokeJavaInstanceMethod_(); b3.Text("create a RDBSchemaToSQLStatementsQuery"); b1.Resolver(); b3.Variable("rdbSchemaToSQLStatementsQuery"); b1.Resolver(); b3.StringLiteral("org.whole.lang.rdb.RDBSchemaToSQLStatementsQuery"); b3.StringLiteral("create()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3._FlowObjects(); b3._Sequence(); b1._SameStageFragment(); b2.VariableTest("rdbSchemaToSQLStatements"); b2._Filter(); b2.Path_(4); b2.VariableRefStep("selectedEntities"); b2.Filter_(); b2.ChildStep(); b2.And_(2); b2.IndexTest_(); b2.IntLiteral(0); b2._IndexTest(); b2.Not_(); b2.ExpressionTest_(); b2.Path_(2); b2.VariableRefStep("selectedEntities"); b2.Filter_(); b2.ChildStep(); b2.IndexTest_(); b2.IntLiteral(1); b2._IndexTest(); b2._Filter(); b2._Path(); b2._ExpressionTest(); b2._Not(); b2._And(); b2._Filter(); b2.Filter_(); b2.AncestorOrSelfStep(); b2.TypeTest("Schema"); b2._Filter(); b2.Call_(); b2.Name("rdbSchemaToSQLStatements"); b1.Resolver(); b2._Call(); b2._Path(); b2._Block(); b2.ExpressionTest_(); b2.Path_(2); b2.VariableRefStep("selectedEntities"); b2.Filter_(); b2.ChildStep(); b2.And_(3); b2.IndexTest_(); b2.IntLiteral(0); b2._IndexTest(); b2.Not_(); b2.ExpressionTest_(); b2.Path_(2); b2.VariableRefStep("selectedEntities"); b2.Filter_(); b2.ChildStep(); b2.IndexTest_(); b2.IntLiteral(1); b2._IndexTest(); b2._Filter(); b2._Path(); b2._ExpressionTest(); b2._Not(); b2.ExpressionTest_(); b2.Filter_(); b2.AncestorOrSelfStep(); b2.TypeTest("Schema"); b2._Filter(); b2._ExpressionTest(); b2._And(); b2._Filter(); b2._Path(); b2._ExpressionTest(); b0._GuardedAction(); b0.GuardedAction_(); b0.Label("All Enum Values Of Type"); b2.Block_(2); b2.QueryDeclaration_(); b2.Name("allEnumValues"); b2.Names_(7); b2.Name("edUri"); b2.Name("values"); b2.Name("ed"); b2.Name("enumType"); b2.Name("iterator"); b2.Name("next"); b2.Name("name"); b2._Names(); b2.Block_(3); b2.Filter_(); b2.Union_(); b2.Expressions_(0); b2._Expressions(); b1.Resolver(); b2._Union(); b2.VariableTest("values"); b2._Filter(); b2.Filter_(); b1.SameStageFragment_(); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(4); b3.InvokeJavaClassMethod_(); b3.Text("get entity descriptor"); b3.Variable("ed"); b1.Resolver(); b3.StringLiteral("org.whole.lang.commons.parsers.CommonsDataTypePersistenceParser"); b3.StringLiteral("getEntityDescriptor(java.lang.String)"); b3.Expressions_(1); b3.Variable("edUri"); b3._Expressions(); b3._InvokeJavaClassMethod(); b3.InvokeJavaInstanceMethod_(); b3.Text("get enum type"); b3.Variable("enumType"); b3.Variable("ed"); b1.Resolver(); b3.StringLiteral("org.whole.lang.reflect.EntityDescriptor"); b3.StringLiteral("getDataEnumType()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.InvokeJavaInstanceMethod_(); b3.Text("get values iterator"); b3.Variable("iterator"); b3.Variable("enumType"); b1.Resolver(); b3.StringLiteral("org.whole.lang.model.EnumType"); b3.StringLiteral("iterator()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.WhileLoop_(); b3.Text("whileloop"); b3.TestTime("before"); b1.SameStageFragment_(); b3.InvokeJavaInstanceMethod_(); b3.Text("iterator has next?"); b1.Resolver(); b3.Variable("iterator"); b1.Resolver(); b3.StringLiteral("java.util.Iterator"); b3.StringLiteral("hasNext()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b1._SameStageFragment(); b3.Sequence_(); b3.Text("sequence"); b3.FlowObjects_(3); b3.InvokeJavaInstanceMethod_(); b3.Text("get next value"); b3.Variable("next"); b3.Variable("iterator"); b1.Resolver(); b3.StringLiteral("java.util.Iterator"); b3.StringLiteral("next()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.InvokeJavaInstanceMethod_(); b3.Text("get next value name"); b3.Variable("name"); b3.Variable("next"); b1.Resolver(); b3.StringLiteral("org.whole.lang.model.EnumValue"); b3.StringLiteral("getName()"); b1.Resolver(); b3._InvokeJavaInstanceMethod(); b3.InvokeJavaInstanceMethod_(); b3.Text("add next value name to values"); b1.Resolver(); b3.Variable("values"); b1.Resolver(); b3.StringLiteral("org.whole.lang.model.IEntity"); b3.StringLiteral("wAdd(org.whole.lang.model.IEntity)"); b3.Expressions_(1); b3.Variable("name"); b3._Expressions(); b3._InvokeJavaInstanceMethod(); b3._FlowObjects(); b3._Sequence(); b3._WhileLoop(); b3._FlowObjects(); b3._Sequence(); b1._SameStageFragment(); b2.VariableTest("ed"); b2._Filter(); b2.VariableRefStep("values"); b2._Block(); b2._QueryDeclaration(); b2.Call_(); b2.Name("allEnumValues"); b2.Expressions_(1); b2.StringLiteral("http://lang.whole.org/RDB#Type"); b2._Expressions(); b2._Call(); b2._Block(); b2.TypeTest("Database"); b0._GuardedAction(); b0._MenuActions(); b0.MenuActions_(0); b0._MenuActions(); b1.Resolver(); b0._ContextMenuActions(); b0._LanguageActionFactory(); } }