public static GroupSymbol helpExample(String groupName) { return helpExample(groupName, null); }
public static GroupSymbol helpExample(String groupName, String definition) { return helpExample(groupName, definition, null); }
public static NamedTable example(String groupName, String definition) throws Exception { return TstLanguageBridgeFactory.factory.translate(helpExample(groupName, definition)); }
public static org.teiid.query.sql.lang.From helpExampleFrom() { List<UnaryFromClause> clauses = new ArrayList<UnaryFromClause>(); clauses.add(new UnaryFromClause(TestGroupImpl.helpExample("vm1.g1"))); //$NON-NLS-1$ clauses.add(new UnaryFromClause(TestGroupImpl.helpExample("myAlias", "vm1.g2"))); //$NON-NLS-1$ //$NON-NLS-2$ clauses.add(new UnaryFromClause(TestGroupImpl.helpExample("vm1.g3"))); //$NON-NLS-1$ clauses.add(new UnaryFromClause(TestGroupImpl.helpExample("vm1.g4"))); //$NON-NLS-1$ return new org.teiid.query.sql.lang.From(clauses); }
public static NamedTable example(String groupName, String definition, Object metadataID) throws Exception { return TstLanguageBridgeFactory.factory.translate(helpExample(groupName, definition, metadataID)); }
public static org.teiid.query.sql.lang.Insert helpExample2(String groupName) { GroupSymbol group = TestGroupImpl.helpExample(groupName); ArrayList<ElementSymbol> elements = new ArrayList<ElementSymbol>(); elements.add(TestElementImpl.helpExample(groupName, "e1")); //$NON-NLS-1$ ArrayList<org.teiid.query.sql.symbol.Expression> values = new ArrayList<org.teiid.query.sql.symbol.Expression>(); values.add(TestSearchedCaseExpressionImpl.helpExample()); return new org.teiid.query.sql.lang.Insert(group, elements, values); }
public static org.teiid.query.sql.lang.Delete helpExample() { return new org.teiid.query.sql.lang.Delete(TestGroupImpl.helpExample("vm1.g1"), //$NON-NLS-1$ TestCompoundCriteriaImpl.helpExample(CompoundCriteria.AND)); }
public static org.teiid.query.sql.lang.Insert helpExample(String groupName) { GroupSymbol group = TestGroupImpl.helpExample(groupName); ArrayList<ElementSymbol> elements = new ArrayList<ElementSymbol>(); elements.add(TestElementImpl.helpExample(groupName, "e1")); //$NON-NLS-1$ elements.add(TestElementImpl.helpExample(groupName, "e2")); //$NON-NLS-1$ elements.add(TestElementImpl.helpExample(groupName, "e3")); //$NON-NLS-1$ elements.add(TestElementImpl.helpExample(groupName, "e4")); //$NON-NLS-1$ ArrayList<Constant> values = new ArrayList<Constant>(); values.add(TestLiteralImpl.helpExample(1)); values.add(TestLiteralImpl.helpExample(2)); values.add(TestLiteralImpl.helpExample(3)); values.add(TestLiteralImpl.helpExample(4)); return new org.teiid.query.sql.lang.Insert(group, elements, values); }
public static ElementSymbol helpExample(String groupName, String elementName) { ElementSymbol symbol = new ElementSymbol(elementName); symbol.setType(String.class); symbol.setGroupSymbol(TestGroupImpl.helpExample(groupName)); return symbol; }
public static ElementSymbol helpIntExample(String groupName, String elementName) { ElementSymbol symbol = new ElementSymbol(elementName); symbol.setType(Integer.class); symbol.setGroupSymbol(TestGroupImpl.helpExample(groupName)); return symbol; }
public static org.teiid.query.sql.lang.Update helpExample() { GroupSymbol group = TestGroupImpl.helpExample("vm1.g1"); //$NON-NLS-1$ org.teiid.query.sql.lang.Update result = new org.teiid.query.sql.lang.Update(); result.setGroup(group); result.addChange(TestElementImpl.helpExample("vm1.g1", "e1"), new Constant(new Integer(1))); result.addChange(TestElementImpl.helpExample("vm1.g1", "e2"), new Constant(new Integer(1))); result.addChange(TestElementImpl.helpExample("vm1.g1", "e3"), new Constant(new Integer(1))); result.addChange(TestElementImpl.helpExample("vm1.g1", "e4"), new Constant(new Integer(1))); result.setCriteria(new CompareCriteria(new Constant(new Integer(1)), CompareCriteria.EQ, new Constant(new Integer(1)))); return result; }
public static ElementSymbol helpExample(String groupName, String elementName, Object metadataID) { ElementSymbol symbol = new ElementSymbol(elementName); symbol.setGroupSymbol(TestGroupImpl.helpExample(groupName)); symbol.setType(Integer.class); symbol.setMetadataID(metadataID); return symbol; }