Examples of errorCode()


Examples of com.foundationdb.ais.model.validation.AISValidationFailure.errorCode()

        }
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.JOIN_TO_MULTIPLE_PARENTS, fail.errorCode());
    }

    @Test
    public void testInitialAutoInc()
    {
View Full Code Here

Examples of com.knowgate.sms.SMSResponse.errorCode()

    JDCConnection oCon = getDataBaseBind().getConnection("SMSSender");
    oCon.setAutoCommit (true);
  PreparedStatement oStm = oCon.prepareStatement("INSERT INTO "+DB.k_sms_audit+" (id_sms,gu_workarea,pg_part,nu_msisdn,id_msg,gu_batch,bo_success,nu_error,id_status,dt_sent,gu_writer,gu_address,gu_contact,gu_company,tx_msg,tx_err) "+
                                               "VALUES ('"+oRsp.messageId()+"','"+getString(DB.gu_workarea)+"',1,'"+oAtm.getString(DB.mov_phone)+"',NULL,'"+getString(DB.gu_job)+"',?,?,?,?,'"+getString(DB.gu_writer)+"',?,?,?,?,?)");

  oStm.setShort(1, (short) (oRsp.errorCode()==SMSResponse.ErrorCode.NONE ? 1 : 0));
  oStm.setInt(2, (int) oRsp.errorCode().intValue());
  oStm.setInt(3, (int) oRsp.notificationStatusCode().intValue());
  oStm.setTimestamp(4, new Timestamp(oRsp.dateStamp().getTime()));
    oStm.setNull(5, Types.CHAR);
  if (oAtm.isNull(DB.gu_contact))
View Full Code Here

Examples of com.knowgate.sms.SMSResponse.errorCode()

    oCon.setAutoCommit (true);
  PreparedStatement oStm = oCon.prepareStatement("INSERT INTO "+DB.k_sms_audit+" (id_sms,gu_workarea,pg_part,nu_msisdn,id_msg,gu_batch,bo_success,nu_error,id_status,dt_sent,gu_writer,gu_address,gu_contact,gu_company,tx_msg,tx_err) "+
                                               "VALUES ('"+oRsp.messageId()+"','"+getString(DB.gu_workarea)+"',1,'"+oAtm.getString(DB.mov_phone)+"',NULL,'"+getString(DB.gu_job)+"',?,?,?,?,'"+getString(DB.gu_writer)+"',?,?,?,?,?)");

  oStm.setShort(1, (short) (oRsp.errorCode()==SMSResponse.ErrorCode.NONE ? 1 : 0));
  oStm.setInt(2, (int) oRsp.errorCode().intValue());
  oStm.setInt(3, (int) oRsp.notificationStatusCode().intValue());
  oStm.setTimestamp(4, new Timestamp(oRsp.dateStamp().getTime()));
    oStm.setNull(5, Types.CHAR);
  if (oAtm.isNull(DB.gu_contact))
      oStm.setNull(6, Types.CHAR);
View Full Code Here

Examples of com.knowgate.sms.SMSResponse.errorCode()

  if (oAtm.isNull(DB.gu_company))
      oStm.setNull(7, Types.CHAR);
    else
    oStm.setString(7, oAtm.getString(DB.gu_company));
    oStm.setString(8, getParameter("txt"));
    if (oRsp.errorCode()==SMSResponse.ErrorCode.NONE)
      oStm.setNull(9, Types.VARCHAR);
    else
      oStm.setString(9, Gadgets.left(oRsp.errorMessage(),254));
    oStm.executeUpdate();
    oStm.close();
View Full Code Here

Examples of com.mysql.clusterj.core.store.IndexOperation.errorCode()

                            domainTypeHandler.getStoreTable());
                    // set the keys of the indexName into the operation
                    where.operationEqual(context, op);
                    // execute the delete operation
                    session.executeNoCommit(false, true);
                    errorCode = op.errorCode();
                    // a non-zero result means the row was not deleted
                    result = (errorCode == 0?1:0);
                    break;
                }
View Full Code Here

Examples of com.mysql.clusterj.core.store.Operation.errorCode()

                    Operation op = session.getDeleteOperation(domainTypeHandler.getStoreTable());
                    // set key values into the operation
                    index.operationSetKeys(context, op);
                    // execute the delete operation
                    session.executeNoCommit(false, true);
                    errorCode = op.errorCode();
                    // a non-zero result means the row was not deleted
                    result = (errorCode == 0?1:0);
                    break;
                }
View Full Code Here

Examples of com.mysql.clusterj.core.store.Operation.errorCode()

                            domainTypeHandler.getStoreTable());
                    // set the keys of the indexName into the operation
                    where.operationEqual(context, op);
                    // execute the delete operation
                    session.executeNoCommit(false, true);
                    errorCode = op.errorCode();
                    // a non-zero result means the row was not deleted
                    result = (errorCode == 0?1:0);
                    break;
                }
View Full Code Here

Examples of com.sonian.elasticsearch.http.jetty.HttpClientResponse.errorCode()

    @SuppressWarnings({"unchecked"})
    @Test
    public void testErrorHandler() throws Exception {
        HttpClientResponse resp = httpClient("server1").request("PUT", "foo/bar/bizzle");
        assertThat(resp.errorCode(), equalTo(HttpURLConnection.HTTP_UNAUTHORIZED));
        assertThat("response body should be error message",
                   resp.get("body").equals("401 Unauthorized /foo/bar/bizzle"));
    }

}
View Full Code Here

Examples of com.sonian.elasticsearch.http.jetty.HttpClientResponse.errorCode()

        publishAuth("server1", "foo", "MD5:37b51d194a7513e45b56f6524f2d51f2", "pray:readwrite:love"); // password bar
        HttpClient http = httpClient("server1", "foo", "bar");
        String data;
        data = jsonBuilder().startObject().field("blip", 1).endObject().string();
        HttpClientResponse resp = http.request("PUT", "/foo/bar/1", data.getBytes());
        assertThat(resp.errorCode(), equalTo(201));
    }

    @Test
    public void testFail()  throws Exception {
        publishAuth("server1", "foo", "MD5:37b51d194a7513e45b56f6524f2d51f2", "readwrite"); // password bar
View Full Code Here

Examples of com.sonian.elasticsearch.http.jetty.HttpClientResponse.errorCode()

        publishAuth("server1", "foo", "MD5:37b51d194a7513e45b56f6524f2d51f2", "readwrite"); // password bar
        HttpClient http = httpClient("server1", "foo", "WRONG");
        String data;
        data = jsonBuilder().startObject().field("blip", 1).endObject().string();
        HttpClientResponse resp = http.request("PUT", "/foo/bar/1", data.getBytes());
        assertThat(resp.errorCode(), equalTo(401));
    }

    @Test
    public void testTwoUsers()  throws Exception {
        publishAuth("server1", "john", "password1", "readwrite");
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.