Examples of beginTransaction()


Examples of com.xiaoleilu.hutool.db.Session.beginTransaction()

    Entity entity = Entity.create(TABLE_NAME).set("字段1", "值").set("字段2", 2);
    Entity where = Entity.create(TABLE_NAME).set("条件1", "条件值");

    Session session = Session.create(ds);
    try {
      session.beginTransaction();

      // 增,生成SQL为 INSERT INTO `table_name` SET(`字段1`, `字段2`) VALUES(?,?)
      session.insert(entity);

      // 删,生成SQL为 DELETE FROM `table_name` WHERE `条件1` = ?
View Full Code Here

Examples of com.yahoo.omid.client.TransactionManager.beginTransaction()

   @Test public void runTestSimple() throws Exception {
      try {
         TransactionManager tm = new TransactionManager(conf);
         TransactionalTable tt = new TransactionalTable(conf, TEST_TABLE);
        
         TransactionState t1 = tm.beginTransaction();
         LOG.info("Transaction created " + t1);
        
         byte[] row = Bytes.toBytes("test-simple");
         byte[] fam = Bytes.toBytes(TEST_FAMILY);
         byte[] col = Bytes.toBytes("testdata");
View Full Code Here

Examples of er.neo4jadaptor.Neo4JContext.beginTransaction()

 
  public static void cleanup() {
    Neo4JContext context = context();
    EOModel model = ERXModelGroup.globalModelGroup().modelNamed(MODEL_NAME);
   
    context.beginTransaction();
    try {
      for (EOEntity e : model.entities()) {
        Store<?, Neo4JErsatz> store = context.entityStoreForEntity(e);
       
        Cursor<Neo4JErsatz> cursor = store.query(null);
View Full Code Here

Examples of in.partake.model.dao.PartakeConnection.beginTransaction()

    public final T execute() throws DAOException, PartakeException {
        IDBService dbService = PartakeApp.getDBService();

        PartakeConnection con = dbService.getConnection();
        try {
            con.beginTransaction();
            T result = doExecute(con, dbService.getDAOs());

            if (con.isInTransaction()) {
                con.commit();
            }
View Full Code Here

Examples of jodd.db.DbSession.beginTransaction()

  public DbSession beginTransaction(JtxTransactionMode jtxMode, boolean active) {
    DbSession session = new DbSession(connectionProvider);
    if (active) {
      log.debug("begin jtx");

      session.beginTransaction(JtxDbUtil.convertToDbMode(jtxMode));
    }
    return session;
  }

  /**
 
View Full Code Here

Examples of mireka.pop.store.Maildrop.beginTransaction()

                        .lookupMaildropName(userPrincipal);
        Maildrop maildrop =
                session.getServer().getMaildropRepository()
                        .borrowMaildrop(maildropName);
        try {
            maildrop.beginTransaction();
        } catch (MaildropLockedException e) {
            session.setSessionState(AUTHORIZATION);
            session.getServer().getMaildropRepository()
                    .releaseMaildrop(maildrop);
            session.getThread().sendResponse(e.toResponse());
View Full Code Here

Examples of net.sf.archimede.model.DatabaseUtil.beginTransaction()

        ThesisMetadata thesisMetadata = ThesisMetadata.createInstanceFromFile(metadataFile);
       
        DatabaseUtil dbUtil = DatabaseUtil.getSingleton();
        try {
            //FIXME Do not hardcode
            dbUtil.beginTransaction(new CredentialsWrapper(username, password));
           
            Collection folderCollection = this.createOrGetThesisCollection(thesisMetadata);
            if (folderCollection.getFolders() == null) {
                folderCollection.setFolders( new ArrayList() );
            }
View Full Code Here

Examples of net.sf.hibernate.Session.beginTransaction()

    }

    private void doPersistAction(Object obj, int operation) throws YPersistenceException {
        try {
            Session session = _factory.openSession();
            Transaction tx = session.beginTransaction();
            if (UPDATE_OPERATION == operation) {
                session.update(obj);
            } else if (DELETE_OPERATION == operation) {
                session.delete(obj);
            } else if (SAVE_OPERATION == operation) {
View Full Code Here

Examples of net.sourceforge.wampum.system.data.DAOFactory.beginTransaction()

      System.out.println(name + "  " + amount + "  " + dateFormat.format(datePosted.getTime()));
      Transaction trans = null;
      DAOFactory factory = new DAOFactory();
     
      try {
        factory.beginTransaction();
        // Look for fitID
        if (this.fitID != null) {
          RegisterDAO registerDAO = (RegisterDAO)factory.getDAO("register");
          trans = registerDAO.loadTransactionByFitID(this.fitID);
          System.out.println("Transaction found!");
View Full Code Here

Examples of nexj.core.runtime.InvocationContext.beginTransaction()

            List sendList = null;

         loop:
            for (;;)
            {
               context.beginTransaction();
               context.getUnitOfWork().setRaw(true);

               long lCurrentTime = System.currentTimeMillis();
               InstanceList list = Query.createRead(timerClass, attributes,
                  (m_bDistributed) ? Pair.attribute("next").le(new Timestamp(lCurrentTime + m_lInterval)) : null,
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.