Examples of JPADrift


Examples of org.rhq.core.domain.drift.JPADrift

                            //
                            // jsanda

                            // use a path with only forward slashing to ensure consistent paths across reports
                            String path = FileUtil.useForwardSlash(entry.getFile());
                            JPADrift drift = new JPADrift(driftChangeSet, path, entry.getType(), oldDriftFile,
                                newDriftFile);
                            entityManager.persist(drift);

                            // we are taking advantage of the fact that we know the summary is only used by the server
                            // if the change set is a DRIFT report. If its a coverage report, it is not used (we do
                            // not alert on coverage reports) - so don't waste memory by collecting all the paths
                            // when we know they aren't going to be used anyway.
                            if (category == DriftChangeSetCategory.DRIFT) {
                                summary.addDriftPathname(path);
                            }
                        }
                    } else {
                        summary.setInitialChangeSet(true);
                        JPADriftSet driftSet = new JPADriftSet();
                        for (FileEntry entry : reader) {
                            boolean addToList = storeBinaryContent || !DriftUtil.isBinaryFile(entry.getFile());
                            JPADriftFile newDriftFile = getDriftFile(entry.getNewSHA(), driftFilesToRequest, addToList);
                            String path = FileUtil.useForwardSlash(entry.getFile());
                            // A Drift always has a changeSet. Note that in this code section the changeset is
                            // always going to be set to a DriftDefinition's changeSet. But that is not always the
                            // case, it could also be set to a DriftDefinitionTemplate's changeSet.
                            driftSet.addDrift(new JPADrift(driftChangeSet, path, entry.getType(), null, newDriftFile));
                        }
                        entityManager.persist(driftSet);
                        driftChangeSet.setInitialDriftSet(driftSet);
                        entityManager.merge(driftChangeSet);
                    }
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.