Package org.glassfish.ejb.deployment.descriptor

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


  Result result = getInitializedResult();
        if (descriptor instanceof EjbEntityDescriptor) {
      String persistentType =
    ((EjbEntityDescriptor)descriptor).getPersistenceType();
      if (EjbEntityDescriptor.CONTAINER_PERSISTENCE.equals(persistentType)) {
                EjbCMPEntityDescriptor cmpDesc = (EjbCMPEntityDescriptor) descriptor;
                PersistenceDescriptor persDesc = cmpDesc.getPersistenceDescriptor();
                if (persDesc.getCMPFields().size()==0) {
                    result.failed(smh.getLocalString
                                           (getClass().getName()+"failed",
                                            "For CMP entity bean [ {0} ], no cmp field are defined",
                                            new Object[] {descriptor.getName()}));
View Full Code Here


        // 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

        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

      (EjbCMPEntityDescriptor)descriptor : null);
  }

  private IASEjbCMPEntityDescriptor getIASDescriptorForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

    return (((descriptor != null) &&
      (descriptor instanceof IASEjbCMPEntityDescriptor)) ?
      (IASEjbCMPEntityDescriptor)descriptor : null);
  }
View Full Code Here

   * @param name the name of the ejb
   * @return the name of the abstract bean for the specified ejb
   */
  public String getAbstractBeanClassForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

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

   * @param name the name of the ejb
   * @return the name of the key class for the ejb
   */
  public String getKeyClassForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

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

   * @param name the name of the ejb
   * @return the name of the abstract schema for the specified ejb
   */
  public String getAbstractSchemaForEjbName (String name)
  {
    EjbCMPEntityDescriptor descriptor = getDescriptorForEjbName(name);

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

   * @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

   * @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

   * @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

TOP

Related Classes of org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor

Copyright © 2018 www.massapicom. 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.