Examples of findByValue()


Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

        //
        // test findByValue method for IWidget
        //
        String widgetGuid = allWidgets[0].getGuid();
        IWidget [] widgetsByValue = persistenceManager.findByValue(IWidget.class, "guid", widgetGuid);
        assertNotNull(widgetsByValue);
        assertEquals(1, widgetsByValue.length);
        assertEquals(allWidgets[0], widgetsByValue[0]);
       
        //
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

        assertEquals(allWidgets[0], widgetsByValue[0]);
       
        //
        // test findByValue method for IWidgetDefault
        //
        IWidgetDefault [] widgetDefaultsByValue = persistenceManager.findByValue(IWidgetDefault.class, "widget", widgetById);
        assertNotNull(widgetDefaultsByValue);
        assertEquals(1, widgetDefaultsByValue.length);
        assertEquals(allWidgetDefaults[0], widgetDefaultsByValue[0]);
       
        //
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

    String widgetName = widget.getLocalName("en");
   
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
   
    // remove any widget instances for this widget
    IWidgetInstance[] instances = persistenceManager.findByValue(IWidgetInstance.class, "widget", widget)
    for(IWidgetInstance instance : instances){
     
      // Delete all participants and shared data associated with any instances
      //
      // Note that we don't call this within WidgetInstanceFactory.destroy() as
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

    //
    // Locate instances using the old key and migrate to the new key
    //
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    IWidgetInstance[] widgetInstances = persistenceManager.findByValue(IWidgetInstance.class, "sharedDataKey", oldKey);
    for (IWidgetInstance widgetInstance:widgetInstances){
      widgetInstance.setSharedDataKey(newKey);
      persistenceManager.save(widgetInstance);
    }
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

    }

    //
    // locate shared data objects using the old key and migrate to the new key
    //
    ISharedData[] sharedDataItems = persistenceManager.findByValue(ISharedData.class, "sharedDataKey", oldKey);
    for (ISharedData sharedData: sharedDataItems){
      sharedData.setSharedDataKey(newKey);
      persistenceManager.save(sharedData);
    }
   
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

       
        //
        // test findByValue method for IWidget
        //
        String widgetGuid = allWidgets[0].getIdentifier();
        IWidget [] widgetsByValue = persistenceManager.findByValue(IWidget.class, "guid", widgetGuid);
        assertNotNull(widgetsByValue);
        assertEquals(1, widgetsByValue.length);
        assertEquals(allWidgets[0], widgetsByValue[0]);
              
        //
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

  public ISharedData[] getSharedData(){
    //
    // Obtain a persistence manager and return the results of executing a query of SharedData objects matching the sharedDataKey
    //
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    return (ISharedData[]) persistenceManager.findByValue(ISharedData.class, "sharedDataKey", this.sharedDataKey);
  }
 
  /**
   * Find a specific shared data object for a given Widget Instance and object key
   * @param instance the widget instance
View Full Code Here

Examples of org.apache.wookie.beans.util.IPersistenceManager.findByValue()

   * get the participants belonging to this shared context
   * @return an arry of Participant instances, or null if there are no participants
   */
  public IParticipant[] getParticipants(){
    IPersistenceManager persistenceManager = PersistenceManagerFactory.getPersistenceManager();
    return persistenceManager.findByValue(IParticipant.class, "sharedDataKey", this.sharedDataKey);
  }

  /**
   * Add a participant to a shared context
   * @param participantId the id property of the participant to add
View Full Code Here

Examples of org.jboss.as.test.integration.ejb.entity.bmp.BMPLocalHome.findByValue()

    @Test
    public void testSingleResultFinderMethod() throws Exception {
        DataStore.DATA.clear();
        final BMPLocalHome home = getHome();
        DataStore.DATA.put(888, "VALUE888");
        BMPLocalInterface result = home.findByValue("VALUE888");
        Assert.assertEquals("VALUE888", result.getMyField());
        Assert.assertEquals(888, result.getPrimaryKey());
    }

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.