Package org.ofbiz.entity.condition

Examples of org.ofbiz.entity.condition.EntityConditionList


     
      if ( isOuterJoin )
      {
        queryInfo.addAlias("Address", "isPrimary", "isPrimary");
        queryInfo.addAlias("Address", "addressId", "addressId");
        queryInfo.addCondition( new EntityConditionList( UtilMisc.toList( new EntityExpr("isPrimary", EntityOperator.EQUALS, "Y"),
                      new EntityExpr("addressId", EntityOperator.EQUALS, null)), EntityOperator.OR));
      }
      else
        queryInfo.addCondition("Address", "isPrimary", EntityOperator.EQUALS, "Y");
View Full Code Here


     
      if ( isOuterJoin )
      {
        queryInfo.addAlias("Address", "isPrimary", "isPrimary");
        queryInfo.addAlias("Address", "addressId", "addressId");
        queryInfo.addCondition( new EntityConditionList( UtilMisc.toList( new EntityExpr("isPrimary", EntityOperator.EQUALS, "Y"),
                      new EntityExpr("addressId", EntityOperator.EQUALS, null)), EntityOperator.OR));
      }
      else
        queryInfo.addCondition("Address", "isPrimary", EntityOperator.EQUALS, "Y");
        } else {
View Full Code Here

  public List findMatchingContacts(String leadFirstName, String leadLastName, UserInfo userInfo)
  {

    try {
      List contactList = delegator.findByCondition("Contact", new EntityConditionList(
          UtilMisc.toList(new EntityExpr("lastName", EntityComparisonOperator.LIKE, leadLastName),
                          new EntityExpr("firstName", EntityComparisonOperator.LIKE, leadFirstName + "%")),
                          EntityOperator.AND), null, UtilMisc.toList("lastName"));
         
      return contactList;
View Full Code Here

 
  public List findMatchingContacts(String accountId, String leadFirstName, String leadLastName, UserInfo userInfo)
  {

    try {
      List contactList = delegator.findByCondition("Contact", new EntityConditionList(
          UtilMisc.toList(new EntityExpr("accountId", EntityComparisonOperator.EQUALS, accountId),
                          new EntityExpr("lastName", EntityComparisonOperator.LIKE, leadLastName),
                          new EntityExpr("firstName", EntityComparisonOperator.LIKE, leadFirstName)),
                          EntityOperator.AND), null, UtilMisc.toList("lastName"));
         
View Full Code Here

      List orderBy = UtilMisc.toList("reportName");
       
      List reportList = delegator.findByAnd("UiReport", condition, orderBy);
      if ( !partyId.equals("-1")) {

        EntityCondition c1 = new EntityConditionList( UtilMisc.toList( new EntityExpr("partyId", EntityOperator.EQUALS, partyId),
                                         new EntityExpr("partyId", EntityOperator.EQUALS, companyId)), EntityOperator.OR);
       
          if ( sectionId != null )
          c1 = new EntityConditionList( UtilMisc.toList( c1, new EntityExpr("sectionId", EntityOperator.EQUALS, sectionId)), EntityOperator.AND);

        if ( reportList == null)
          reportList = delegator.findByCondition("UiList", c1, null, orderBy);
        else
          reportList.addAll(delegator.findByCondition("UiList", c1, null, orderBy));
View Full Code Here

        UserInfo userInfo) {

        ArrayList orderBy = new ArrayList();
        orderBy.add("accountName");

    EntityCondition condition = new EntityConditionList( UtilMisc.toList(
      new EntityExpr( "accountTypeId", EntityOperator.NOT_EQUAL, "base"),
      new EntityExpr( searchField, EntityOperator.LIKE, searchValue)), EntityOperator.AND);

        try {
            return SecurityWrapper.findByCondition("Account", condition,
View Full Code Here

     
      if ( isOuterJoin )
      {
        queryInfo.addAlias("Code", "codeTypeId", "codeTypeId");
        queryInfo.addAlias("Code", "codeId", "codeId");
        queryInfo.addCondition( new EntityConditionList( UtilMisc.toList( new EntityExpr("codeTypeId", EntityOperator.EQUALS, "IDENTIFIER_TYPE"),
                      new EntityExpr("codeId", EntityOperator.EQUALS, null)), EntityOperator.OR));
      }
      else
        queryInfo.addCondition("Code", "codeTypeId", EntityOperator.EQUALS, "IDENTIFIER_TYPE");
View Full Code Here

     * @return
     */
    public List getEligibleEntityList(HashMap useQueryParameterValueMap,
        String listedEntityName, UserInfo userInfo, GenericDelegator delegator) {
   
    EntityCondition condition = new EntityConditionList(UtilMisc.toList(
        new EntityExpr("codeTypeId", EntityOperator.EQUALS, "IDENTIFIER_TYPE")),
        EntityOperator.AND);
       
        try {
            return delegator.findByCondition( "Code", condition, null, UtilMisc.toList("codeValue"));
View Full Code Here

      List reportList = delegator.findByAnd("UiReport", condition, orderBy);
      if ( !partyId.equals("-1")) {

        condition = sectionId == null ? UtilMisc.toMap("partyId", partyId) : UtilMisc.toMap("sectionId", sectionId, "partyId", partyId);
       
        EntityCondition c1 = new EntityConditionList( UtilMisc.toList( new EntityExpr("partyId", EntityOperator.EQUALS, partyId),
              new EntityConditionList( UtilMisc.toList( new EntityExpr("partyId", EntityOperator.EQUALS, companyId),
                                                new EntityExpr("publicFlag", EntityOperator.EQUALS, "Y")),
                               EntityOperator.AND)), EntityOperator.OR);
          if ( sectionId != null )
          c1 = new EntityConditionList( UtilMisc.toList( c1, new EntityExpr("sectionId", EntityOperator.EQUALS, sectionId)), EntityOperator.AND);

        if ( reportList == null)
          reportList = delegator.findByCondition("UiReport", c1, null, orderBy);
        else
          reportList.addAll(delegator.findByCondition("UiReport", c1, null, orderBy));
View Full Code Here

    public List getDropDownValues(GenericDelegator delegator,
        UIDisplayObject uiDisplayObject, ArrayList orderDef,
        Vector entityDetailsVector, UIFieldInfo fieldInfo, UserInfo userInfo) {

        try {
          EntityConditionList condition = new EntityConditionList( UtilMisc.toList(new EntityExpr("codeId", EntityOperator.NOT_EQUAL, "base"),
                                         new EntityExpr("codeTypeId", EntityOperator.EQUALS, "ACCOUNT_TYPE")),EntityOperator.AND);
          return delegator.findByCondition("Code", condition, null, UtilMisc.toList("codeValue"));
        } catch (GenericEntityException e) {
            Debug.logError(
                "[UIAccountTypeDropDown.getDropDownValues] Error retrieving the dropdown values: ", module);
View Full Code Here

TOP

Related Classes of org.ofbiz.entity.condition.EntityConditionList

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.