Examples of EjbCMPEntityDescriptor


Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * @param name the name of the ejb
   * @return the name of the persistence-capable for the specified ejb
   */
  public String getPersistenceClassForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

    return ((descriptor != null) ?
      getPersistenceClassForDescriptor(descriptor) : null);
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * @return the name of the ejb for the specified local interface
   */
  public String getEjbNameForLocalInterface (String ejbName,
    String fieldName, String interfaceName)
  {
    EjbCMPEntityDescriptor descriptor =
      getRelatedEjbDescriptor(ejbName, fieldName);

    return (((descriptor != null) && !StringHelper.isEmpty(interfaceName)
      && interfaceName.equals(descriptor.getLocalClassName())) ?
      descriptor.getName() : null);
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * @param name the name of the ejb
   * @return the name of the local interface for the specified ejb
   */
  public String getLocalInterfaceForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

    return ((descriptor != null) ? descriptor.getLocalClassName() : null);
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * @return the name of the ejb for the specified remote interface
   */
  public String getEjbNameForRemoteInterface (String ejbName,
    String fieldName, String interfaceName)
  {
    EjbCMPEntityDescriptor descriptor =
      getRelatedEjbDescriptor(ejbName, fieldName);

    return (((descriptor != null) && !StringHelper.isEmpty(interfaceName)
      && interfaceName.equals(descriptor.getRemoteClassName())) ?
      descriptor.getName() : null);
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * @param name the name of the ejb
   * @return the name of the remote interface for the specified ejb
   */
  public String getRemoteInterfaceForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

    return ((descriptor != null) ? descriptor.getRemoteClassName() : null);
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

  }

  private EjbCMPEntityDescriptor getRelatedEjbDescriptor (
    String ejbName, String ejbFieldName)
  {
    EjbCMPEntityDescriptor descriptor = ((ejbName != null) ?
      getDescriptorForEjbName(ejbName) : null);

    if (descriptor != null)
    {
      PersistenceDescriptor persistenceDescriptor =
        descriptor.getPersistenceDescriptor();
      CMRFieldInfo cmrf =
        persistenceDescriptor.getCMRFieldInfoByName(ejbFieldName);
     
      return cmrf.role.getPartner().getOwner();
    }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

  {
    String keyClass = getKeyClassForEjbName(name);

    if (!"java.lang.Object".equals(keyClass))    // NOI18N
    {
      EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

      return ((descriptor.getPrimaryKeyFieldDesc() != null) ?
        PRIMARY_KEY_FIELD : USER_DEFINED_KEY_CLASS);
    }

    return UNKNOWN_KEY_CLASS;
  }
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

   * Reads all known methods and sorts them by name into specific
   * Collections for further processing.
   */
  protected void categorizeMethods ()
  {
    EjbCMPEntityDescriptor descriptor = getDescriptor();
    Iterator iterator = descriptor.getMethodDescriptors().iterator();

    while (iterator.hasNext())
    {
      MethodDescriptor methodDescriptor =
        (MethodDescriptor)iterator.next();
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

        // For EJB2.0 CMP EntityBeans, container is only required to support
        // REQUIRED/REQUIRES_NEW/MANDATORY, see EJB2.0 section 17.4.1.
        if (((EjbEntityDescriptor)ejbDescriptor).getPersistenceType().
                equals(EjbEntityDescriptor.CONTAINER_PERSISTENCE)) {
            EjbCMPEntityDescriptor e= (EjbCMPEntityDescriptor)ejbDescriptor;
            if ( !e.getIASEjbExtraDescriptors().isIsReadOnlyBean() &&
                     e.isEJB20() ) {
                if ( txAttr != TX_REQUIRED && txAttr != TX_REQUIRES_NEW
                        && txAttr != TX_MANDATORY ) {
                    throw new EJBException(
                            "Transaction attribute for EJB2.0 CMP EntityBeans" +
                            " must be Required/RequiresNew/Mandatory");
View Full Code Here

Examples of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

        for (Iterator itr = serviceRefs.iterator(); itr.hasNext();) {
            accept((ServiceReferenceDescriptor) itr.next());
        }

        if (ejb instanceof EjbCMPEntityDescriptor) {
            EjbCMPEntityDescriptor cmp = (EjbCMPEntityDescriptor)ejb;
            PersistenceDescriptor persistenceDesc = cmp.getPersistenceDescriptor();
            for (Iterator e=persistenceDesc.getCMPFields().iterator();e.hasNext();) {
                FieldDescriptor fd = (FieldDescriptor) e.next();
                accept(fd);
            }
        }
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.