Examples of persist()


Examples of org.internna.ossmoney.model.security.UserDetails.persist()

    user.setPassword(password);
    user.setDashboard(dashboard);
    user.setEnabled(Boolean.TRUE);
    user.getRoles().add(authority);
    authority.getUsers().add(user);
    user.persist();
    adminService.createPayee(user, user.getName());
    createSubcategories(user);
    user.setBudget(createBudget(user));
    if (createBasicSpanishFinancialInstitutions) {
      createBasicSpanishInstitutions(user);
View Full Code Here

Examples of org.jboss.test.hibernate.timers.interfaces.ITimers.persist()

         timer.setInitialDate(now);
         timer.setInstancePK(serialize(key));
         timer.setTimerInterval(interval);
         timer.setInfo(serialize(info));

         bean.persist(timer);
         log.info("Timers created with id = " + id);

         List timers = bean.listTimers();
         assertNotNull(timers);
         assertEquals("Incorrect result size", initialCount + 1, timers.size());
View Full Code Here

Examples of org.jbpm.persistence.ProcessPersistenceContext.persist()

    }

    public void addProcessInstance(ProcessInstance processInstance) {
        ProcessInstanceInfo processInstanceInfo = new ProcessInstanceInfo( processInstance, this.kruntime.getEnvironment() );
        ProcessPersistenceContext context = ((ProcessPersistenceContextManager) this.kruntime.getEnvironment().get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )).getProcessPersistenceContext();
        context.persist( processInstanceInfo );
        //em.refresh( processInstanceInfo  );
//        em.flush();
        //em.getTransaction().commit();
        ((org.jbpm.process.instance.ProcessInstance) processInstance).setId( processInstanceInfo.getId() );
        processInstanceInfo.updateLastReadDate();
View Full Code Here

Examples of org.netbeans.modules.exceptions.utils.PersistenceUtils.persist()

    public static void loadIntoCache(String name) {
        PersistenceUtils pUtils = PersistenceUtils.getInstance();
        Statistic stat = (Statistic) pUtils.getExist("Statistic.findByStatname", name);
        if (stat == null) {
            stat = new Statistic(name);
            pUtils.persist(stat);
        }
        statisticCache.put(name, stat);
    }

    public static Statistic getExists(String statistic) {
View Full Code Here

Examples of org.picketlink.identity.federation.core.saml.v2.metadata.store.FileBasedMetadataConfigurationStore.persist()

        assertNotNull("Inputstream not null", is);

        EntityDescriptorType edt = (EntityDescriptorType) parser.parse(is);
        assertNotNull(edt);
        FileBasedMetadataConfigurationStore fbd = new FileBasedMetadataConfigurationStore();
        fbd.persist(edt, id);

        EntityDescriptorType loaded = fbd.load(id);
        assertNotNull("loaded EntityDescriptorType not null", loaded);
        fbd.delete(id);
View Full Code Here

Examples of org.springframework.data.neo4j.Group.persist()

      Person p = new Person( "David", 27 );
      people.add(p);

        assertEquals( Collections.singleton(p), group.getPersons() );
       
        group.persist();
    assertThat(group.getPersistentState(), hasRelationship("persons", p.getPersistentState()));
    assertThat(p.getPersistentState(), hasRelationship("persons", group.getPersistentState()));
    }

  @Test
View Full Code Here

Examples of org.springframework.data.neo4j.Person.persist()

  public void testCreateOutsideTransaction() {
    Person p = new Person("James", 35);
      p.setProperty("s", "String");
      p.setProperty("x", 100);
      p.setProperty("pi", 3.1415);
    p.persist();
    assertEquals(3, IteratorUtil.count(p.getPersonalProperties().getPropertyKeys()));
    assertProperties(nodeFor(p));
    p.setProperty("s", "String two");
    p.persist();
    assertEquals("String two", nodeFor(p).getProperty("personalProperties-s"))
View Full Code Here

Examples of org.springframework.data.neo4j.aspects.Group.persist()

    }
    @Test
    public void testAccessReadOnlyCollectionMakesEntityDirty() {
      Group g = new Group();
      g.getReadOnlyPersons();
      g.persist();
    }

    @Test @Transactional
    public void testDefaultFailOnDuplicateSetToTrueSavesCorrectlyWhenUpdating() {
        final String UPDATED_NAME = "Mr George - Current Account 2";
View Full Code Here

Examples of org.springframework.data.neo4j.aspects.Person.persist()

        try (Transaction tx = neo4jTemplate.getGraphDatabase().beginTx()) {
            assertEquals( 35, nodeFor( p ).getProperty("age") );
            tx.success();
        }

        p.persist();

        try (Transaction tx = neo4jTemplate.getGraphDatabase().beginTx()) {
            assertEquals( 25, nodeFor( p ).getProperty("age") );
            tx.success();
        }
View Full Code Here

Examples of org.springframework.data.neo4j.aspects.support.domain.Account1.persist()

        Account1 acc1 = new Account1("111-222-333", "Mr George - Current Account 1");
        Account1 acc2 = new Account1("111-222-333", UPDATED_NAME);

        acc1.persist();
        Long acc1NodeId = acc1.getNodeId();
        acc2.persist(); // This should be merged
        Long acc2NodeId = acc2.getNodeId();

        assertEquals("Ids should be the same",acc1NodeId,acc2NodeId);
        Account1 loadedAcc1 = account1Repository.findBySchemaPropertyValue("accountNumber","111-222-333");
        assertNotNull(loadedAcc1);
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.