Examples of FetchMode


Examples of org.gatein.portal.controller.resource.script.FetchMode

                resourceScope = ResourceScope.PORTLET;
            } else {
                resourceScope = ResourceScope.PORTAL;
            }
            ResourceId id = new ResourceId(resourceScope, resourceName);
            FetchMode fetchMode;
            String group = null;

            Element resourceElt = XMLTools.getUniqueChild(element, MODULE_TAG, false);
            if (resourceElt != null) {
                fetchMode = FetchMode.ON_LOAD;
                if (XMLTools.getUniqueChild(resourceElt, URL_TAG, false) == null) {
                    group = parseGroup(resourceElt);
                }
            } else {
                resourceElt = XMLTools.getUniqueChild(element, SCRIPTS_TAG, false);
                fetchMode = FetchMode.IMMEDIATE;
            }

            if (resourceElt != null) {
                ScriptResourceDescriptor desc = scripts.get(id);
                if (desc == null) {
                    desc = new ScriptResourceDescriptor(id, fetchMode, parseOptString(element, AS_TAG), group);
                } else {
                    desc.fetchMode = fetchMode;
                }
                parseDesc(resourceElt, desc);
                scripts.put(id, desc);
            }
        } else if (MODULE_TAG.equals(element.getTagName()) || SCRIPTS_TAG.equals(element.getTagName())) {
            String resourceName = XMLTools.asString(XMLTools.getUniqueChild(element, "name", true));
            ResourceId id = new ResourceId(ResourceScope.SHARED, resourceName);
            FetchMode fetchMode;
            String group = null;

            if (MODULE_TAG.equals(element.getTagName())) {
                fetchMode = FetchMode.ON_LOAD;
                if (XMLTools.getUniqueChild(element, URL_TAG, false) == null) {
View Full Code Here

Examples of org.gatein.portal.controller.resource.script.FetchMode

                resourceScope = ResourceScope.PORTLET;
            } else {
                resourceScope = ResourceScope.PORTAL;
            }
            ResourceId id = new ResourceId(resourceScope, resourceName);
            FetchMode fetchMode;
            String group = null;

            Element resourceElt = XMLTools.getUniqueChild(element, MODULE_TAG, false);
            if (resourceElt != null) {
                fetchMode = FetchMode.ON_LOAD;
                if (XMLTools.getUniqueChild(resourceElt, URL_TAG, false) == null) {
                    group = parseGroup(resourceElt);
                }
            } else {
                resourceElt = XMLTools.getUniqueChild(element, SCRIPTS_TAG, false);
                fetchMode = FetchMode.IMMEDIATE;
            }

            if (resourceElt != null) {
                ScriptResourceDescriptor desc = scripts.get(id);
                if (desc == null) {
                    Element nativeAmdTag = XMLTools.getUniqueChild(element, NATIVE_AMD_TAG, false);
                    boolean isNativeAmd = nativeAmdTag != null && Boolean.parseBoolean(XMLTools.asString(nativeAmdTag, true).toLowerCase());
                    desc = new ScriptResourceDescriptor(id, fetchMode, parseOptString(element, AS_TAG), group, isNativeAmd);
                } else {
                    desc.fetchMode = fetchMode;
                }
                parseDesc(resourceElt, desc);
                scripts.put(id, desc);
            }
        } else if (MODULE_TAG.equals(element.getTagName()) || SCRIPTS_TAG.equals(element.getTagName())) {
            String resourceName = XMLTools.asString(XMLTools.getUniqueChild(element, "name", true));
            ResourceId id = new ResourceId(ResourceScope.SHARED, resourceName);
            FetchMode fetchMode;
            String group = null;

            if (MODULE_TAG.equals(element.getTagName())) {
                fetchMode = FetchMode.ON_LOAD;
                if (XMLTools.getUniqueChild(element, URL_TAG, false) == null) {
View Full Code Here

Examples of org.gatein.portal.controller.resource.script.FetchMode

         else
         {
            resourceScope = ResourceScope.PORTAL;
         }
         ResourceId id = new ResourceId(resourceScope, resourceName);
         FetchMode fetchMode;
         String group = null;
        
         Element resourceElt = XMLTools.getUniqueChild(element, MODULE_TAG, false);
         if (resourceElt != null)
         {
            fetchMode = FetchMode.ON_LOAD;
            if (XMLTools.getUniqueChild(resourceElt, URL_TAG, false) == null)
            {
               group = parseGroup(resourceElt);
            }
         }
         else
         {
            resourceElt = XMLTools.getUniqueChild(element, SCRIPTS_TAG, false);
            fetchMode = FetchMode.IMMEDIATE;
         }
        
         if (resourceElt != null)
         {
            ScriptResourceDescriptor desc = scripts.get(id);
            if (desc == null)
            {
               desc = new ScriptResourceDescriptor(id, fetchMode, parseOptString(element, AS_TAG), group);
            }
            else
            {
               desc.fetchMode = fetchMode;
            }
            parseDesc(resourceElt, desc);
            scripts.put(id, desc);
         }
      }
      else if (MODULE_TAG.equals(element.getTagName()) || SCRIPTS_TAG.equals(element.getTagName()))
      {
         String resourceName = XMLTools.asString(XMLTools.getUniqueChild(element, "name", true));
         ResourceId id = new ResourceId(ResourceScope.SHARED, resourceName);        
         FetchMode fetchMode;
         String group = null;
        
         if (MODULE_TAG.equals(element.getTagName()))
         {
            fetchMode = FetchMode.ON_LOAD;
View Full Code Here

Examples of org.hibernate.FetchMode

    else {
      if ( translator.hasProjection() ) {
        return -1;
      }
      else {
        FetchMode fetchMode = translator.getRootCriteria()
          .getFetchMode(path);
        if ( isDefaultFetchMode(fetchMode) ) {
          return super.getJoinType(
              type,
              config,
View Full Code Here

Examples of org.hibernate.FetchMode

    return typeNode.getValue();
  }

  private static void initOuterJoinFetchSetting(Element node, Fetchable model) {
    Attribute fetchNode = node.attribute( "fetch" );
    final FetchMode fetchStyle;
    boolean lazy = true;
    if ( fetchNode == null ) {
      Attribute jfNode = node.attribute( "outer-join" );
      if ( jfNode == null ) {
        if ( "many-to-many".equals( node.getName() ) ) {
View Full Code Here

Examples of org.hibernate.FetchMode

    } else {
      return true;
    }
  }
  public String getFetchMode(Property property) {
    FetchMode fetchMode = property.getValue().getFetchMode();
    return (fetchMode== null) ? null : fetchMode.toString().toLowerCase();
  }
View Full Code Here

Examples of org.hibernate.FetchMode

    else {
      if ( translator.hasProjection() ) {
        return -1;
      }
      else {
        FetchMode fetchMode = translator.getRootCriteria()
          .getFetchMode(path);
        if ( isDefaultFetchMode(fetchMode) ) {
          return super.getJoinType(
              type,
              config,
View Full Code Here

Examples of org.hibernate.FetchMode

    return typeNode.getValue();
  }

  private static void initOuterJoinFetchSetting(Element node, Fetchable model) {
    Attribute fetchNode = node.attribute( "fetch" );
    final FetchMode fetchStyle;
    boolean lazy = true;
    if ( fetchNode == null ) {
      Attribute jfNode = node.attribute( "outer-join" );
      if ( jfNode == null ) {
        if ( "many-to-many".equals( node.getName() ) ) {
View Full Code Here

Examples of org.hibernate.FetchMode

    if ( property.getAttribute().isSingular() ) {
      final SingularAttributeBinding singularAttributeBinding = ( SingularAttributeBinding ) property;
      final CascadeStyle cascadeStyle = singularAttributeBinding.isAssociation()
          ? ( (AssociationAttributeBinding) singularAttributeBinding ).getCascadeStyle()
          : CascadeStyles.NONE;
      final FetchMode fetchMode = singularAttributeBinding.isAssociation()
          ? ( (AssociationAttributeBinding) singularAttributeBinding ).getFetchMode()
          : FetchMode.DEFAULT;

      return new StandardProperty(
          singularAttributeBinding.getAttribute().getName(),
          type,
          lazyAvailable && singularAttributeBinding.isLazy(),
          true, // insertable
          true, // updatable
          null,
          singularAttributeBinding.isNullable(),
          alwaysDirtyCheck || areAllValuesIncludedInUpdate( singularAttributeBinding ),
          singularAttributeBinding.isIncludedInOptimisticLocking(),
          cascadeStyle,
          fetchMode
      );
    }
    else {
      final AbstractPluralAttributeBinding pluralAttributeBinding = (AbstractPluralAttributeBinding) property;
      final CascadeStyle cascadeStyle = pluralAttributeBinding.isAssociation()
          ? pluralAttributeBinding.getCascadeStyle()
          : CascadeStyles.NONE;
      final FetchMode fetchMode = pluralAttributeBinding.isAssociation()
          ? pluralAttributeBinding.getFetchMode()
          : FetchMode.DEFAULT;

      return new StandardProperty(
          pluralAttributeBinding.getAttribute().getName(),
View Full Code Here

Examples of org.hibernate.FetchMode

    return typeNode.getValue();
  }

  private static void initOuterJoinFetchSetting(Element node, Fetchable model) {
    Attribute fetchNode = node.attribute( "fetch" );
    final FetchMode fetchStyle;
    boolean lazy = true;
    if ( fetchNode == null ) {
      Attribute jfNode = node.attribute( "outer-join" );
      if ( jfNode == null ) {
        if ( "many-to-many".equals( node.getName() ) ) {
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.