Examples of Update


Examples of org.teiid.query.sql.lang.Update

   
    helpTest(update, "UPDATE m.g1 SET e1 = 'abc'"); //$NON-NLS-1$
  }
 
  public void testUpdate2() {
    Update update = new Update();
    update.setGroup(new GroupSymbol("m.g1"));     //$NON-NLS-1$
    update.addChange(new ElementSymbol("e1"), new Constant("abc")); //$NON-NLS-1$ //$NON-NLS-2$
    update.addChange(new ElementSymbol("e2"), new Constant("xyz")); //$NON-NLS-1$ //$NON-NLS-2$
   
    helpTest(update, "UPDATE m.g1 SET e1 = 'abc', e2 = 'xyz'"); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Update

     helpTestGroups(insert, true, groups);
  }

  public void testUpdate() {
    GroupSymbol gs1 = exampleGroupSymbol(1);
     Update update = new Update();
     update.setGroup(gs1);
    
     Set groups = new HashSet();
     groups.add(gs1);
     helpTestGroups(update, true, groups);
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Update

        GroupSymbol g1 = exampleGroupSymbol(1);
        GroupSymbol g2 = exampleGroupSymbol(2);
        GroupSymbol g3 = exampleGroupSymbol(3);
        Insert insert = new Insert();
        insert.setGroup(g1);
        Update update = new Update();
        update.setGroup(g2);
        Delete delete = new Delete();
        delete.setGroup(g3);
       
        List updates = new ArrayList(3);
        updates.add(insert);
View Full Code Here

Examples of org.teiid.query.sql.lang.Update

    UnaryFromClause ufc = new UnaryFromClause(exampleGroup(true, 0));
    helpTest(ufc, getSymbolMap());   
  }
 
  public void testVisitUpdate1() {
    Update update = new Update();
    update.setGroup(exampleGroup(true, 0));
    update.addChange(exampleElement(true, 0), new Constant("abc"));    //$NON-NLS-1$
    update.addChange(exampleElement(true, 1), new Constant("abc"));    //$NON-NLS-1$
    helpTest(update, getSymbolMap());
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Update

    update.addChange(exampleElement(true, 1), new Constant("abc"));    //$NON-NLS-1$
    helpTest(update, getSymbolMap());
  }

  public void testVisitUpdate2() {
    Update update = new Update();
    update.setGroup(exampleGroup(true, 0));
    update.addChange(exampleElement(true, 0), new Constant("abc"));    //$NON-NLS-1$
    update.addChange(exampleElement(true, 1), new Constant("abc"));    //$NON-NLS-1$
    update.setCriteria(new CompareCriteria(exampleElement(true, 2), CompareCriteria.LT, new Constant("xyz"))); //$NON-NLS-1$
    helpTest(update, getSymbolMap());
  }
View Full Code Here

Examples of org.teiid.query.sql.lang.Update

   
    helpTest(update, "UPDATE m.g1 SET e1 = 'abc', e2 = 'xyz'"); //$NON-NLS-1$
  }
 
  public void testUpdate3() {
    Update update = new Update();
    update.setGroup(new GroupSymbol("m.g1"));     //$NON-NLS-1$
    update.addChange(new ElementSymbol("e1"), new Constant("abc")); //$NON-NLS-1$ //$NON-NLS-2$
      update.setCriteria(new CompareCriteria(
            new ElementSymbol("e2"), //$NON-NLS-1$
            CompareCriteria.EQ,
            new Constant("abc")) ); //$NON-NLS-1$
   
   
View Full Code Here

Examples of org.tempuri.Update


public class AllTest extends TestCase {

    public void testAll(){
        Update update = new Update();
        update.setArg0("test");
        update.setArg1(true);
        update.setId(2);


        try {
            OMElement omElement = update.getOMElement(Update.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("om string ==> " + omElementString);
            omElementString = "<ns1:Update xmlns:ns1=\"http://tempuri.org/\"><ns1:arg1>true</ns1:arg1><ns1:id>2</ns1:id><ns1:arg0>test</ns1:arg0></ns1:Update>";
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            Update newUpdate = Update.Factory.parse(xmlReader);
            assertEquals(update.getArg0(),newUpdate.getArg0());
            assertEquals(update.getArg1(),newUpdate.getArg1());
            assertEquals(update.getId(),newUpdate.getId());
        } catch (Exception e) {
            assertFalse(true);
        }
    }
View Full Code Here

Examples of org.topbraid.spin.model.update.Update

  if (ontClass.getPropertyResourceValue(ResourceFactory.createProperty(SPIN.NS, "update")) == null)
      throw new IllegalArgumentException("Resource OntClass must have a SPIN update or template call resource (spin:update)");

  Resource updateOrTemplateCall = ontClass.getPropertyResourceValue(ResourceFactory.createProperty(SPIN.NS, "update"));
 
        Update update = SPINFactory.asUpdate(updateOrTemplateCall);
        if (update != null) return getUpdateRequest(update.toString(), resource);

        TemplateCall templateCall = SPINFactory.asTemplateCall(updateOrTemplateCall);
        if (templateCall != null) return getUpdateRequest(templateCall.getQueryString(), resource);
       
        return null;
View Full Code Here

Examples of org.xbill.DNS.Update

    public void refuseUnimplementedOpcodes() throws Exception {
        final List<Message> replies = new LinkedList<Message>();

        Name zone = Name.fromString("dyn.test.example.");
        Name host = Name.fromString("host", zone);
        Update message = new Update(zone);
        message.replace(host, Type.A, 3600, "1.2.3.4");

        Query query = TestUtils.getQuery(replies, message);
        ResolveTask task = new ResolveTask(query);
        task.setCache(TestUtils.getEhcache());
        task.setBackendStore(new BackendRepository() {
View Full Code Here

Examples of vanilla.java.stages.api.Update

        InProcessChronicleSource source = new InProcessChronicleSource(chronicle, PORT);
        source.busyWaitTimeNS(2 * 1000 * 1000);

        EventsWriter writer = new EventsWriter(source);

        Update update = new Update();
        System.out.println("Allowing connection.");
        Thread.sleep(1000);
        System.out.println("Warming up.");

        for (int i = -WARMUP; i <= MESSAGES; i += RATE) {
            if (i == 0)
                System.out.println("Sending messages.");
            Thread.sleep(1);
            for (int j = 0; j < RATE; j++) {
                update.resetLevels("EUR/USD");
                update.acquireLevel().init(1.3256, 1e6, 1.3257, 2e6);
                update.acquireLevel().init(1.3255, 2e6, 1.3258, 4e6);
                update.acquireLevel().init(1.3254, 3e6, 1.3259, 6e6);
                update.acquireLevel().init(1.3253, 4e6, 1.3260, 8e6);
                update.acquireLevel().init(1.3252, 5e6, 1.3261, 10e6);
                writer.onMarketData(null, update);
                pause(10 * 1000);
            }
        }
        System.out.println("Messages written");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.