Examples of dontPoseAsTransientObjectAnymore()


Examples of org.libreplan.business.labels.entities.Label.dontPoseAsTransientObjectAnymore()

    private Label createAndSaveLabelOrGetFromDatabase(final String labelName,
            final LabelType labelType) {
        Label label;
        try {
            label = saveLabelOnAnotherTransaction(labelName, labelType);
            label.dontPoseAsTransientObjectAnymore();
        } catch (DataIntegrityViolationException e) {
            // Label was already created by another user while editing the order
            label = labelDAO.findByNameAndType(labelName, labelType);
            forceLoad(label);
        }
View Full Code Here

Examples of org.libreplan.business.labels.entities.LabelType.dontPoseAsTransientObjectAnymore()

        labelType.addLabel(label2);

        labelTypeDAO.save(labelType);
        labelTypeDAO.flush();
        sessionFactory.getCurrentSession().evict(labelType);
        labelType.dontPoseAsTransientObjectAnymore();

        return labelType;
    }

    @Test
View Full Code Here

Examples of org.libreplan.business.labels.entities.LabelType.dontPoseAsTransientObjectAnymore()

        labelTypeDAO.save(labelType);
        labelTypeDAO.flush();
        sessionFactory.getCurrentSession().evict(labelType);
        sessionFactory.getCurrentSession().evict(label);

        labelType.dontPoseAsTransientObjectAnymore();
        label.dontPoseAsTransientObjectAnymore();
        return label;
    }

    @Test
View Full Code Here

Examples of org.libreplan.business.materials.entities.Material.dontPoseAsTransientObjectAnymore()

             * "validate" method avoids that "material" goes to the Hibernate's
             * session if "material" is not valid.
             */
            material.validate();
            Registry.getMaterialDAO().save(material);
            material.dontPoseAsTransientObjectAnymore();
        }

        MaterialAssignment materialAssignment = MaterialAssignment
                .create(material);
        materialAssignment
View Full Code Here

Examples of org.libreplan.business.orders.entities.Order.dontPoseAsTransientObjectAnymore()

    private Order givenValidOrderWithValidOrderLinesAlreadyStored() {
        Order order = givenOrder();
        jiraOrderElementSynchronizer.syncOrderElementsWithJiraIssues(issues,
                order);
        order.dontPoseAsTransientObjectAnymore();
        orderDAO.saveWithoutValidating(order);
        orderDAO.flush();
        try {
            return orderDAO.find(order.getId());
        } catch (InstanceNotFoundException e) {
View Full Code Here

Examples of org.libreplan.business.orders.entities.Order.dontPoseAsTransientObjectAnymore()


    private Order givenValidOrderWithValidOrderLinesAlreadyStored() {
        Order order = givenOrder();
        jiraOrderElementSynchronizer.syncOrderElementsWithJiraIssues(issues, order);
        order.dontPoseAsTransientObjectAnymore();
        orderDAO.saveWithoutValidating(order);
        orderDAO.flush();
        try {
            return orderDAO.find(order.getId());
        } catch (InstanceNotFoundException e) {
View Full Code Here

Examples of org.libreplan.business.orders.entities.Order.dontPoseAsTransientObjectAnymore()

        orderLine.setCode(UUID.randomUUID().toString());
        orderLine.setName(randomize("order-line-name"));
        orderDAO.save(order);
        orderDAO.flush();
        sessionFactory.getCurrentSession().evict(order);
        order.dontPoseAsTransientObjectAnymore();

        return order;
    }

    private static String randomize(String name) {
View Full Code Here

Examples of org.libreplan.business.planner.entities.Task.dontPoseAsTransientObjectAnymore()

                .create(new Date(),new Date(), null));
        subcontractedTaskData.setExternalCompany(getSubcontractorExternalCompanySaved());

        task.setSubcontractedTaskData(subcontractedTaskData);
        taskElementDAO.save(task);
        task.dontPoseAsTransientObjectAnymore();
        taskElementDAO.flush();

        subcontractedTaskDataDAO.save(subcontractedTaskData);
        return subcontractedTaskData;
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.Task.dontPoseAsTransientObjectAnymore()

    @Transactional
    public void afterSavingTheVersionIsIncreased() {
        Task task = createValidTask();
        assertNull(task.getVersion());
        taskElementDAO.save(task);
        task.dontPoseAsTransientObjectAnymore();
        assertNotNull(task.getVersion());
    }

    @Test
    @Transactional
View Full Code Here

Examples of org.libreplan.business.planner.entities.Task.dontPoseAsTransientObjectAnymore()

        IOnTransaction<Void> createDependency = new IOnTransaction<Void>() {

            @Override
            public Void execute() {
                child1.dontPoseAsTransientObjectAnymore();
                child2.dontPoseAsTransientObjectAnymore();
                Dependency.create(child1, child2, Type.START_END);
                taskElementDAO.save(child1);
                return 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.