Examples of Reference


Examples of org.apache.ddlutils.model.Reference

    {
        Identity identity = new Identity(fk.getForeignTable(), getFKName(owningTable, fk));

        for (int idx = 0; idx < fk.getReferenceCount(); idx++)
        {
            Reference reference = (Reference)fk.getReference(idx);
            Object    value     = bean.get(reference.getLocalColumnName());

            if (value == null)
            {
                return null;
            }
            identity.setColumnValue(reference.getForeignColumnName(), value);
        }
        return identity;
    }

Examples of org.apache.geronimo.jee.deployment.Reference

        case REFERENCE:
            if (isEmpty(textList.get(0).getText()) || isEmpty(textList.get(1).getText()) ||
                    isEmpty(textList.get(2).getText())) {
                return false;
            }
            Reference reference = (Reference)eObject;
            if (reference == null) {
                reference = (Reference)getEFactory().create(Reference.class);
                gbean = (Gbean)section.getSelectedObject();

                // add the JAXBElement of a Dependency, not the Dependency
                ObjectFactory objectFactory = new ObjectFactory();
                gbean.getAttributeOrXmlAttributeOrReference().add(objectFactory.createGbeanReference(reference));
            }
            reference.setName(textList.get(0).getText());
            reference.setGroupId(textList.get(1).getText());
            reference.setArtifactId(textList.get(2).getText());
            reference.setVersion(textList.get(3).getText());
            reference.setModule(textList.get(4).getText());
            reference.setType(textList.get(5).getText());
            reference.setCustomFoo(textList.get(6).getText());
            break;
        }
        return true;
    }

Examples of org.apache.hadoop.hbase.io.Reference

                    final StoreFile f,
                    final byte [] splitRow,
                    final Reference.Range range)
      throws IOException {
    // A reference to the bottom half of the hsf store file.
    Reference r = new Reference(splitRow, range);
    // Add the referred-to regions name as a dot separated suffix.
    // See REF_NAME_REGEX regex above.  The referred-to regions name is
    // up in the path of the passed in <code>f</code> -- parentdir is family,
    // then the directory above is the region name.
    String parentRegionName = f.getPath().getParent().getParent().getName();
    // Write reference with same file id only with the other region name as
    // suffix and into the new region location (under same family).
    Path p = new Path(splitDir, f.getPath().getName() + "." + parentRegionName);
    return r.write(fs, p);
  }

Examples of org.apache.hadoop.hbase.migration.nineteen.io.Reference

   */
  static Reference readSplitInfo(final Path p, final FileSystem fs)
  throws IOException {
    FSDataInputStream in = fs.open(p);
    try {
      Reference r = new Reference();
      r.readFields(in);
      return r;
    } finally {
      in.close();
    }
  }

Examples of org.apache.harmony.pack200.NewAttributeBands.Reference

        assertEquals(5, replicatedElements.size());
        Integral firstElement = (Integral) replicatedElements.get(0);
        assertEquals("PH", firstElement.getTag());
        Integral secondElement = (Integral) replicatedElements.get(1);
        assertEquals("OH", secondElement.getTag());
        Reference thirdElement = (Reference) replicatedElements.get(2);
        assertEquals("RUH", thirdElement.getTag());
        Reference fourthElement = (Reference) replicatedElements.get(3);
        assertEquals("RSH", fourthElement.getTag());
        Integral fifthElement = (Integral) replicatedElements.get(4);
        assertEquals("H", fifthElement.getTag());
    }

Examples of org.apache.jetspeed.om.profile.Reference

                assertTrue(e3.getId().startsWith("P-"));   
                System.out.println(e3.getId());

                Iterator rv = p.getReferenceIterator();
                assertNotNull(rv);
                Reference ref = (Reference)rv.next();
                assertNotNull(ref);
                assertTrue(ref.getName().equals("ReferenceTest"));
                assertTrue(ref.getId().equals("300"));
                Portlets epr = ref.getPortletsReference();
                assertNotNull(epr);
                assertEquals("group/apache/page/news/media-type/html", ref.getPath());

                /* SHIT
                 
                assertNotNull(epr.getMetaInfo());
                assertNotNull(epr.getMetaInfo().getTitle());

Examples of org.apache.juddi.model.Reference

                String sigMethod = apiSignedInfo.getSignatureMethod().getAlgorithm();
                modelSigMethod.setAlgorithm(sigMethod);
               
                List<org.w3._2000._09.xmldsig_.ReferenceType> apiReferenceList = apiSignedInfo.getReference();
                for (org.w3._2000._09.xmldsig_.ReferenceType apiReference : apiReferenceList) {
                    Reference ref = mapReference(modelSignedInfo, apiReference);
                    modelSignedInfo.getReference().add(ref);
                }
               
                modelSignedInfo.setCanonicalizationMethod(modelCanonMethod);
               

Examples of org.apache.oodt.cas.filemgr.structs.Reference

            conn.setAutoCommit(false);
            statement = conn.createStatement();

            for (Iterator<Reference> i = product.getProductReferences().iterator(); i
                    .hasNext();) {
                Reference r = i.next();

                String addRefSql = "INSERT INTO "
                        + productRefTable
                        + " "
                        + "(product_id, product_orig_reference, product_datastore_reference, product_reference_filesize, product_reference_mimetype) "
                        + "VALUES ("
                        + product.getProductId()
                        + ", '"
                        + r.getOrigReference()
                        + "', '"
                        + r.getDataStoreReference()
                        + "', "
                        + r.getFileSize()
                        + ",'"
                        + ((r.getMimeType() == null) ? "" : r.getMimeType()
                                .getName()) + "')";

                LOG.log(Level.FINE, "addProductReferences: Executing: "
                        + addRefSql);
                statement.execute(addRefSql);

Examples of org.apache.openejb.core.ivm.naming.Reference

            bindings.put("java:comp/UserTransaction", userTransaction);
        }

        for (EjbReferenceInfo referenceInfo : jndiEnc.ejbReferences) {

            Reference reference = null;

            if (referenceInfo.location != null) {
                reference = buildReferenceLocation(referenceInfo.location);
            } else {
                String jndiName = "java:openejb/Deployment/" + referenceInfo.ejbDeploymentId + "/" + referenceInfo.remoteType;
                if (useCrossClassLoaderRef && referenceInfo.externalReference) {
                    reference = new CrossClassLoaderJndiReference(jndiName);
                } else {
                    reference = new IntraVmJndiReference(jndiName);
                }
            }
            bindings.put(normalize(referenceInfo.referenceName), reference);
        }

        for (EjbLocalReferenceInfo referenceInfo : jndiEnc.ejbLocalReferences) {

            Reference reference = null;

            if (referenceInfo.location != null) {
                reference = buildReferenceLocation(referenceInfo.location);
            } else {
                String jndiName = "java:openejb/Deployment/" + referenceInfo.ejbDeploymentId + "/" + referenceInfo.localType;
                reference = new IntraVmJndiReference(jndiName);
            }
            bindings.put(normalize(referenceInfo.referenceName), reference);
        }

        for (EnvEntryInfo entry : jndiEnc.envEntries) {

            if (entry.location != null) {
                Reference reference = buildReferenceLocation(entry.location);
                bindings.put(normalize(entry.name), reference);
                continue;
            }

            try {
                Class type = Class.forName(entry.type.trim());
                Object obj = null;
                if (type == String.class)
                    obj = new String(entry.value);
                else if (type == Double.class) {
                    obj = new Double(entry.value);
                } else if (type == Integer.class) {
                    obj = new Integer(entry.value);
                } else if (type == Long.class) {
                    obj = new Long(entry.value);
                } else if (type == Float.class) {
                    obj = new Float(entry.value);
                } else if (type == Short.class) {
                    obj = new Short(entry.value);
                } else if (type == Boolean.class) {
                    obj = new Boolean(entry.value);
                } else if (type == Byte.class) {
                    obj = new Byte(entry.value);
                } else if (type == Character.class) {
                    StringBuilder sb = new StringBuilder(entry.value + " ");
                    obj = new Character(sb.charAt(0));
                } else if (type == URL.class) {
                    obj = new URL(entry.value);
                } else {
                    throw new IllegalArgumentException("Invalid env-ref-type " + type);
                }

                bindings.put(normalize(entry.name), obj);
            } catch (ClassNotFoundException e) {
                throw new IllegalArgumentException("Invalid environment entry type: " + entry.type.trim() + " for entry: " + entry.name, e);
            } catch (NumberFormatException e) {
                throw new IllegalArgumentException("The env-entry-value for entry " + entry.name + " was not recognizable as type " + entry.type + ". Received Message: " + e.getLocalizedMessage(), e);
            } catch (MalformedURLException e) {
                throw new IllegalArgumentException("URL for reference " + entry.name + " was not a valid URL: " + entry.value, e);
            }
        }

        for (ResourceReferenceInfo referenceInfo : jndiEnc.resourceRefs) {
            Reference reference = null;

            if (referenceInfo.location != null) {
                reference = buildReferenceLocation(referenceInfo.location);
            } else if (referenceInfo.resourceID != null) {
                String jndiName = "java:openejb/Resource/" + referenceInfo.resourceID;
                reference = new IntraVmJndiReference(jndiName);
            } else {
                String jndiName = "java:openejb/Resource/" + referenceInfo.referenceName;
                reference = new IntraVmJndiReference(jndiName);
            }
            bindings.put(normalize(referenceInfo.referenceName), reference);
        }

        for (ResourceEnvReferenceInfo referenceInfo : jndiEnc.resourceEnvRefs) {
            LinkRef linkRef = null;
            try {
                Class<?> type = Class.forName(referenceInfo.resourceEnvRefType, true, EJBContext.class.getClassLoader());
                if (EJBContext.class.isAssignableFrom(type)) {
                    String jndiName = "java:comp/EJBContext";
                    linkRef = new LinkRef(jndiName);
                    bindings.put(normalize(referenceInfo.resourceEnvRefName), linkRef);
                    continue;
                } else if (WebServiceContext.class.equals(type)) {
                    String jndiName = "java:comp/WebServiceContext";
                    linkRef = new LinkRef(jndiName);
                    bindings.put(normalize(referenceInfo.resourceEnvRefName), linkRef);
                    continue;
                }
            } catch (ClassNotFoundException e) {
            }

            Object reference = null;
            if (UserTransaction.class.getName().equals(referenceInfo.resourceEnvRefType)) {
                reference = userTransaction;
            } else if (referenceInfo.location != null){
                reference = buildReferenceLocation(referenceInfo.location);
            } else if (referenceInfo.resourceID != null) {
                String jndiName = "java:openejb/Resource/" + referenceInfo.resourceID;
                reference = new IntraVmJndiReference(jndiName);
            } else {
                String jndiName = "java:openejb/Resource/" + referenceInfo.resourceEnvRefName;
                reference = new IntraVmJndiReference(jndiName);
            }
            if (reference != null) {
                bindings.put(normalize(referenceInfo.resourceEnvRefName), reference);
            }
        }

        if (emfLinkResolver != null) {
            for (PersistenceUnitReferenceInfo referenceInfo : jndiEnc.persistenceUnitRefs) {
                if (referenceInfo.location != null){
                    Reference reference = buildReferenceLocation(referenceInfo.location);
                    bindings.put(normalize(referenceInfo.referenceName), reference);
                    continue;
                }

                EntityManagerFactory factory = emfLinkResolver.resolveLink(referenceInfo.persistenceUnitName, moduleUri);
                if (factory == null) {
                    throw new IllegalArgumentException("Persistence unit " + referenceInfo.persistenceUnitName + " for persistence-unit-ref " +
                            referenceInfo.referenceName + " not found");
                }

                Reference reference = new PersistenceUnitReference(factory);
                bindings.put(normalize(referenceInfo.referenceName), reference);
            }

            for (PersistenceContextReferenceInfo contextInfo : jndiEnc.persistenceContextRefs) {
                if (contextInfo.location != null){
                    Reference reference = buildReferenceLocation(contextInfo.location);
                    bindings.put(normalize(contextInfo.referenceName), reference);
                    continue;
                }

                EntityManagerFactory factory = emfLinkResolver.resolveLink(contextInfo.persistenceUnitName, moduleUri);
                if (factory == null) {
                    throw new IllegalArgumentException("Persistence unit " + contextInfo.persistenceUnitName + " for persistence-context-ref " +
                            contextInfo.referenceName + " not found");
                }

                JtaEntityManager jtaEntityManager = new JtaEntityManager(jtaEntityManagerRegistry, factory, contextInfo.properties, contextInfo.extended);
                Reference reference = new PersistenceContextReference(jtaEntityManager);
                bindings.put(normalize(contextInfo.referenceName), reference);
            }
        }

        for (ServiceReferenceInfo referenceInfo : jndiEnc.serviceRefs) {
            if (referenceInfo.location != null){
                Reference reference = buildReferenceLocation(referenceInfo.location);
                bindings.put(normalize(referenceInfo.referenceName), reference);
            }
        }
        return bindings;
    }

Examples of org.apache.servicemix.nmr.api.Reference

            LOG.info("service for exchange " + serviceName);

            Map<String,Object> refProps = new HashMap<String,Object>();
            refProps.put(Endpoint.INTERFACE_NAME, interfaceName);
            refProps.put(Endpoint.SERVICE_NAME, serviceName);
            Reference ref = channel.getNMR().getEndpointRegistry().lookup(refProps);
            xchng.setTarget(ref);
            xchng.setOperation(bop.getName());
            LOG.info("sending message");
            if (!isOneWay) {
                channel.sendSync(xchng);
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.