Examples of findByPrimaryKey()


Examples of org.jboss.test.web.interfaces.EntityHome.findByPrimaryKey()

            Context enc = (Context) ctx.lookup("java:comp/env");
            EntityHome home = (EntityHome) enc.lookup("ejb/Entity");
            try
            {
               //Remove old entity beans from previous test runs
               Entity existing = home.findByPrimaryKey(new EntityPK(12345));
               if(existing != null)
               {
                  existing.remove();
               }
            }
View Full Code Here

Examples of org.jboss.test.web.interfaces.InternalEntityHome.findByPrimaryKey()

            bean = home.create(value, value);
         }
         else
         {
            Integer pk = new Integer(value);
            bean = home.findByPrimaryKey(pk);
         }
         bean.setValue(value);
         if( create == false )
         {
            bean.remove();
View Full Code Here

Examples of org.ofbiz.entity.Delegator.findByPrimaryKey()

        GenericValue routing = null;
        GenericValue product = null;
        List<GenericValue> routingTaskAssocs = null;
        try {
            // Find the product
            product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId));
            if (product == null) {
                return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductNotExist", locale));
            }
        } catch (GenericEntityException e) {
            Debug.logWarning(e.getMessage(), module);
View Full Code Here

Examples of org.ofbiz.entity.GenericDelegator.findByPrimaryKey()

        String productStoreShipMethId = (String)context.get("productStoreShipMethId");

        GenericValue productStoreShipMeth = null;
        try {
            productStoreShipMeth = delegator.findByPrimaryKey("ProductStoreShipmentMeth", UtilMisc.toMap("productStoreShipMethId", productStoreShipMethId));
        } catch (GenericEntityException e) {
            return ServiceUtil.returnError("Problem retrieving ProductStoreShipmentMeth entry with id [" + productStoreShipMethId + "]: " + e.toString());
        }

View Full Code Here

Examples of org.ofbiz.entity.datasource.GenericHelper.findByPrimaryKey()

                // see if this was caused by an existing record before resetting the sequencer and trying again
                // NOTE: use the helper directly so ECA rules, etc won't be run

                GenericValue existingValue = null;
                try {
                    existingValue = helper.findByPrimaryKey(value.getPrimaryKey());
                } catch (GenericEntityException e1) {
                    // ignore this error, if not found it'll probably be a GenericEntityNotFoundException
                    // it is important to not let this get thrown because it will mask the original exception
                }
                if (existingValue == null) {
View Full Code Here

Examples of org.uengine.persistence.processdefinition.ProcessDefinitionRepositoryHomeLocal.findByPrimaryKey()

     
      ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryLocal pdvlr = pdvhr.findByPrimaryKey(new Long(pdvid));
     
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByPrimaryKey(pdvlr.getDefId());
     
      pdlr.setProdVer(pdvlr.getVer().intValue());
      pdlr.setProdVerId(new Long(pdvid));
     
      if(pdlr.getObjType()==null){
View Full Code Here

Examples of org.uengine.persistence.processdefinitionversion.ProcessDefinitionVersionRepositoryHomeLocal.findByPrimaryKey()

      if(pdvid.indexOf("@")>-1){
        pdvid = ProcessDefinition.splitDefinitionAndVersionId(pdvid)[1];
      }
     
      ProcessDefinitionVersionRepositoryHomeLocal pdvhr = GlobalContext.createProcessDefinitionVersionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionVersionRepositoryLocal pdvlr = pdvhr.findByPrimaryKey(new Long(pdvid));
     
      ProcessDefinitionRepositoryHomeLocal pdhr = GlobalContext.createProcessDefinitionRepositoryHomeLocal(getTransactionContext());
      ProcessDefinitionRepositoryLocal pdlr = pdhr.findByPrimaryKey(pdvlr.getDefId());
     
      pdlr.setProdVer(pdvlr.getVer().intValue());
View Full Code Here

Examples of org.uengine.persistence.processinstance.ProcessInstanceDAOType.findByPrimaryKey()

  ProcessInstanceDAO processInstanceDAO;
  public ProcessInstanceDAO getProcessInstanceDAO() throws Exception{
    if(processInstanceDAO == null){
      ProcessInstanceDAOType pidt = ProcessInstanceDAOType.getInstance(getProcessTransactionContext());
      processInstanceDAO = pidt.findByPrimaryKey(new Long(getInstanceId()));
      processInstanceDAO.getImplementationObject().setTableName("BPM_PROCINST");
      processInstanceDAO.getImplementationObject().setKeyField("INSTID");
      processInstanceDAO.getImplementationObject().createUpdateSql();
    }
   
View Full Code Here

Examples of xpetstore.domain.catalog.interfaces.ItemLocalHome.findByPrimaryKey()

            {
                String  key = ( String ) it.next(  );
                Integer value = ( Integer ) _details.get( key );
                try
                {
                    ItemLocal    ilocal = ihome.findByPrimaryKey( key );
                    ItemValue    item = ilocal.getItemValue(  );
                    ProductValue prod = ilocal.getProduct(  ).getProductValue(  );

                    CartItem     ci = new CartItem( item.getItemId(  ), prod.getProductId(  ), prod.getName(  ), item.getDescription(  ), value.intValue(  ), item.getListPrice(  ) );
View Full Code Here

Examples of xpetstore.util.uidgen.interfaces.CounterLocalHome.findByPrimaryKey()

      CounterLocalHome home = null;
            CounterLocal counter = null;
            try
            {
              home = CounterUtil.getLocalHome();
                counter = home.findByPrimaryKey( name );
            }
            catch ( FinderException fe )
            {
                counter = home.create( name );
            }
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.