Examples of endBatch()


Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        batch.startBatch();

        batch.batchNativeStatement(statement);

        batch.endBatch();

        //When
        final CompleteBean found = manager.find(CompleteBean.class, id);

        //Then
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        batch.batchNativeStatement(statement);

        ValuelessEntity entity = new ValuelessEntity(123L);
        batch.insert(entity);

        batch.endBatch();
    }

}
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        entity.setName("name3");
        batch.insert(entity);
        entity.setName("name1");
        batch.insert(entity);

        batch.endBatch();
        //Then

        CompleteBean actual = manager.find(CompleteBean.class, entity.getId());

        assertThat(actual.getName()).isEqualTo("name3");
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        managed.setName("name3");
        batch.update(managed);
        managed.setName("name1");
        batch.update(managed);

        batch.endBatch();

        //Then
        manager.refresh(managed);

        assertThat(managed.getName()).isEqualTo("name3");
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        result = manager.nativeQuery(selectCounter).first();
        assertThat(result).isNull();

        // Flush
        batch.endBatch();

        Row row = manager.getNativeSession().execute(selectLabel).one();
        assertThat(row.getString("label")).isEqualTo("label");

        result = manager.nativeQuery(selectCounter).first();
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        assertThat(foundTweet1).isNull();
        assertThat(foundTweet2).isNull();
        assertThat(foundUser).isNull();

        // Flush
        batch.endBatch();

        final ResultSet resultSet = manager.getNativeSession().execute("SELECT id,favoriteTweets,followers,friends,age_in_years,name,welcomeTweet,label,preferences FROM CompleteBean WHERE id=:id", bean.getId());
        assertThat(resultSet.all()).hasSize(1);

        foundBean = manager.find(CompleteBean.class, bean.getId());
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

            assertThat(manager.find(Tweet.class, tweet.getId())).isNull();
        }

        // batch should reinit batch context
        batch.insertOrUpdate(user);
        batch.endBatch();

        User foundUser = manager.find(User.class, user.getId());
        assertThat(foundUser.getFirstname()).isEqualTo("firstname");
        assertThat(foundUser.getLastname()).isEqualTo("lastname");
View Full Code Here

Examples of info.archinnov.achilles.persistence.Batch.endBatch()

        User foundUser = manager.find(User.class, user.getId());
        assertThat(foundUser.getFirstname()).isEqualTo("firstname");
        assertThat(foundUser.getLastname()).isEqualTo("lastname");

        batch.insert(tweet);
        batch.endBatch();

        Tweet foundTweet = manager.find(Tweet.class, tweet.getId());
        assertThat(foundTweet.getContent()).isEqualTo("simple_tweet");
        assertThat(foundTweet.getCreator().getId()).isEqualTo(foundUser.getId());
        assertThat(foundTweet.getCreator().getFirstname()).isEqualTo("firstname");
View Full Code Here

Examples of org.cometd.server.ServerSessionImpl.endBatch()

            } catch (ParseException x) {
                handleJSONParseException(request, response, x.getMessage(), x.getCause());
            } finally {
                // If we started a batch, end it now
                if (batch) {
                    boolean ended = session.endBatch();

                    // Flush session if not done by the batch, since some browser order <script> requests
                    if (!ended && isAlwaysFlushingAfterHandle())
                        session.flush();
                } else if (session != null && !connect && isAlwaysFlushingAfterHandle()) {
View Full Code Here

Examples of org.cometd.server.ServerSessionImpl.endBatch()

                    if (disconnected)
                    {
                        if (batch)
                        {
                            batch = false;
                            session.endBatch();
                        }
                        session = null;
                    }
                    else
                    {
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.