Examples of DiscoveryLifeCycle


Examples of models.DiscoveryLifeCycle

import play.mvc.Controller;


public class Lifecycle extends Controller {
  public static void index() {
    DiscoveryLifeCycle d = new DiscoveryLifeCycle("name1");
   
    d.insert();
    d.name = "name2";
    d.update();
    d.name = "name3";
    d.save();
    d.get();
    d.delete();
   
    render();
  }
View Full Code Here

Examples of siena.base.test.model.DiscoveryLifeCycle

  }
 
  public void testLifeCycleGet(){
    PersistenceManagerLifeCycleWrapper pml = new PersistenceManagerLifeCycleWrapper(pm);
   
    DiscoveryLifeCycle before = new DiscoveryLifeCycle("Radioactivity", LongAutoID_CURIE);
    pm.insert(before);
   
    lifeCyclePhase = "";
    DiscoveryLifeCycle after = new DiscoveryLifeCycle();
    after.id = before.id;
    pml.get(after);
   
    assertEquals(LifeCyclePhase.PRE_FETCH.toString()+" "+LifeCyclePhase.POST_FETCH.toString()+" ", lifeCyclePhase);
  }
View Full Code Here

Examples of siena.base.test.model.DiscoveryLifeCycle

 
  public void testLifeCycleInsert(){
    PersistenceManagerLifeCycleWrapper pml = new PersistenceManagerLifeCycleWrapper(pm);
   
    lifeCyclePhase = "";
    DiscoveryLifeCycle before = new DiscoveryLifeCycle("Radioactivity", LongAutoID_CURIE);
    pml.insert(before);
   
    assertEquals(LifeCyclePhase.PRE_INSERT.toString()+" "+LifeCyclePhase.POST_INSERT.toString()+" ", lifeCyclePhase);
  }
View Full Code Here

Examples of siena.base.test.model.DiscoveryLifeCycle

 
  public void testLifeCycleDelete(){
    PersistenceManagerLifeCycleWrapper pml = new PersistenceManagerLifeCycleWrapper(pm);
   
    lifeCyclePhase = "";
    DiscoveryLifeCycle before = new DiscoveryLifeCycle("Radioactivity", LongAutoID_CURIE);
    pm.insert(before);
   
    pml.delete(before);
   
    assertEquals(LifeCyclePhase.PRE_DELETE.toString()+" "+LifeCyclePhase.POST_DELETE.toString()+" ", lifeCyclePhase);
View Full Code Here

Examples of siena.base.test.model.DiscoveryLifeCycle

  }
 
  public void testLifeCycleUpdate(){
    PersistenceManagerLifeCycleWrapper pml = new PersistenceManagerLifeCycleWrapper(pm);
   
    DiscoveryLifeCycle before = new DiscoveryLifeCycle("Radioactivity", LongAutoID_CURIE);
    pm.insert(before);
   
    lifeCyclePhase = "";
    before.name = "Radioactivity_UPD";
    pml.update(before);
View Full Code Here

Examples of siena.base.test.model.DiscoveryLifeCycle

 
  public void testLifeCycleSave(){
    PersistenceManagerLifeCycleWrapper pml = new PersistenceManagerLifeCycleWrapper(pm);
   
    lifeCyclePhase = "";
    DiscoveryLifeCycle before = new DiscoveryLifeCycle("Radioactivity", LongAutoID_CURIE);
    pml.save(before);
   
    assertEquals(LifeCyclePhase.PRE_SAVE.toString()+" "+LifeCyclePhase.POST_SAVE.toString()+" ", lifeCyclePhase);
  }
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.