Package org.evolizer.core.hibernate.session.api

Examples of org.evolizer.core.hibernate.session.api.IEvolizerSession.query()


  public void testTransactionReconstruction1(){
    try {
      IEvolizerSession s = fSessionHandler.getCurrentSession(fDBUrl);
      TransactionReconstructor.calculateCouplings(s, 0, 0, null);
     
      List<Transaction> transactions = s.query("from Transaction as ta order by ta.started", Transaction.class);
     
      assertEquals(5, transactions.size());
     
      Transaction ta1 = transactions.get(0);
      Set<Revision> revisions = ta1.getInvolvedRevisions();
View Full Code Here


  public void testTransactionReconstruction2(){
    try {
      IEvolizerSession s = fSessionHandler.getCurrentSession(fDBUrl);
      TransactionReconstructor.calculateCouplings(s, 120000, 120000, null);
     
      List<Transaction> transactions = s.query("from Transaction as ta order by ta.started", Transaction.class);
     
      assertEquals(3, transactions.size());
     
      Transaction ta1 = transactions.get(0);
      Set<Revision> revisions = ta1.getInvolvedRevisions();
View Full Code Here

  public void testTransactionReconstruction3(){
    try {
      IEvolizerSession s = fSessionHandler.getCurrentSession(fDBUrl);
      TransactionReconstructor.calculateCouplings(s, 121000, 120000, null);
     
      List<Transaction> transactions = s.query("from Transaction as ta order by ta.started", Transaction.class);
      assertEquals(2, transactions.size());
     
      Transaction ta1 = transactions.get(0);
      Set<Revision> revisions = ta1.getInvolvedRevisions();
      assertTrue(revisions.contains(rev1));
View Full Code Here

    @Test
    public void addGalaxyClass() throws EvolizerException {
        showClassPlanet();

        IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(project.getProject());
        List<AbstractFamixEntity> queryResult = session.query("from FamixClass as c where c.uniqueName = 'thebigvoid.Galaxy'", AbstractFamixEntity.class, 1);

        AbstractGraphEditCommand command = new AddEntitiesCommand(
                queryResult,
                fGraphPanel.getGraphLoader(),
                fGraphPanel.getEdgeGrouper());
View Full Code Here

                        this.releaseNamesFetched = true;
                        try {
                            EvolizerSessionHandler handler = EvolizerSessionHandler.getHandler();
                            handler.updateSchema(this.project);
                            IEvolizerSession persistenceProvider = handler.getCurrentSession(this.project);
                            for (String r : persistenceProvider.query("select name from Release", String.class)) {
                                this.releasesScrollList.add(r + " ");
                            }

                        } catch (EvolizerException e) {
                            this.releasesScrollList.removeAll();
View Full Code Here

    public List<FamixModel> queryStoredModels(String modelName) {
        List<FamixModel> storedModels = new ArrayList<FamixModel>();
       
        try {
            IEvolizerSession lSession = EvolizerSessionHandler.getHandler().getCurrentSession(fDBUrl);
            storedModels = lSession.query("from FamixModel as fm " +
                    "where fm.name = '" + modelName + "'" +
                    "order by fm.created desc", FamixModel.class);
        } catch (EvolizerRuntimeException ere) {
            sLogger.error("Error while querying Famix-FamixModels" + ere.getMessage(), ere);
        } catch (EvolizerException ee) {
View Full Code Here

      s.startTransaction();
      s.saveObject(entity);
      s.endTransaction();
   

      List<DummyBusinessEntity> lgList = (List<DummyBusinessEntity>) s.query("from " + DummyBusinessEntity.class.getName(), DummyBusinessEntity.class);
   
      assertNotNull(lgList);
      DummyBusinessEntity savedEntity = lgList.get(0);
      assertNotNull(savedEntity);
      assertEquals(new Long(1), savedEntity.getId());
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.