org.broadleafcommerce.openadmin.client.translation
Class AdvancedCriteriaToMVELTranslator

java.lang.Object
  extended by org.broadleafcommerce.openadmin.client.translation.AdvancedCriteriaToMVELTranslator

public class AdvancedCriteriaToMVELTranslator
extends Object

Author:
jfischer

Constructor Summary
AdvancedCriteriaToMVELTranslator()
           
 
Method Summary
protected  void buildExpression(com.smartgwt.client.data.Criteria criteria, StringBuffer sb, String entityKey, com.smartgwt.client.types.OperatorId operator, com.smartgwt.client.data.DataSource dataSource)
           
protected  void buildExpression(StringBuffer sb, String entityKey, String field, Object[] value, SupportedFieldType type, SupportedFieldType secondaryType, String operator, boolean includeParenthesis, boolean isFieldComparison, boolean ignoreCase, boolean isNegation, boolean ignoreQuotes)
           
protected  void buildMVEL(com.smartgwt.client.data.Criteria criteria, StringBuffer sb, String entityKey, com.smartgwt.client.data.DataSource dataSource, com.smartgwt.client.types.OperatorId groupOperator)
           
 String createMVEL(String entityKey, com.smartgwt.client.data.AdvancedCriteria criteria, com.smartgwt.client.data.DataSource dataSource)
           
protected  Object[] extractBasicValues(Object value)
           
protected  Object[] extractDate(com.smartgwt.client.data.Criteria criteria, com.smartgwt.client.types.OperatorId operator, Map values, String key)
           
protected  String formatField(String entityKey, SupportedFieldType type, String field, boolean ignoreCase, boolean isNegation)
           
protected  String formatValue(String fieldName, String entityKey, SupportedFieldType type, SupportedFieldType secondaryType, Object[] value, boolean isFieldComparison, boolean ignoreCase, boolean ignoreQuotes)
           
 boolean isProjection(Object value)
           
protected  Date parseRelativeDate(Map<String,String> dateItems)
           
 void translateCriteriaToMVEL(com.smartgwt.client.data.Record record, String fieldName, com.smartgwt.client.widgets.form.FilterBuilder filterBuilder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdvancedCriteriaToMVELTranslator

public AdvancedCriteriaToMVELTranslator()
Method Detail

createMVEL

public String createMVEL(String entityKey,
                         com.smartgwt.client.data.AdvancedCriteria criteria,
                         com.smartgwt.client.data.DataSource dataSource)
                  throws IncompatibleMVELTranslationException
Throws:
IncompatibleMVELTranslationException

buildMVEL

protected void buildMVEL(com.smartgwt.client.data.Criteria criteria,
                         StringBuffer sb,
                         String entityKey,
                         com.smartgwt.client.data.DataSource dataSource,
                         com.smartgwt.client.types.OperatorId groupOperator)
                  throws IncompatibleMVELTranslationException
Throws:
IncompatibleMVELTranslationException

parseRelativeDate

protected Date parseRelativeDate(Map<String,String> dateItems)

buildExpression

protected void buildExpression(com.smartgwt.client.data.Criteria criteria,
                               StringBuffer sb,
                               String entityKey,
                               com.smartgwt.client.types.OperatorId operator,
                               com.smartgwt.client.data.DataSource dataSource)
                        throws IncompatibleMVELTranslationException
Throws:
IncompatibleMVELTranslationException

extractDate

protected Object[] extractDate(com.smartgwt.client.data.Criteria criteria,
                               com.smartgwt.client.types.OperatorId operator,
                               Map values,
                               String key)

extractBasicValues

protected Object[] extractBasicValues(Object value)

isProjection

public boolean isProjection(Object value)

buildExpression

protected void buildExpression(StringBuffer sb,
                               String entityKey,
                               String field,
                               Object[] value,
                               SupportedFieldType type,
                               SupportedFieldType secondaryType,
                               String operator,
                               boolean includeParenthesis,
                               boolean isFieldComparison,
                               boolean ignoreCase,
                               boolean isNegation,
                               boolean ignoreQuotes)
                        throws IncompatibleMVELTranslationException
Throws:
IncompatibleMVELTranslationException

formatField

protected String formatField(String entityKey,
                             SupportedFieldType type,
                             String field,
                             boolean ignoreCase,
                             boolean isNegation)

formatValue

protected String formatValue(String fieldName,
                             String entityKey,
                             SupportedFieldType type,
                             SupportedFieldType secondaryType,
                             Object[] value,
                             boolean isFieldComparison,
                             boolean ignoreCase,
                             boolean ignoreQuotes)
                      throws IncompatibleMVELTranslationException
Throws:
IncompatibleMVELTranslationException

translateCriteriaToMVEL

public void translateCriteriaToMVEL(com.smartgwt.client.data.Record record,
                                    String fieldName,
                                    com.smartgwt.client.widgets.form.FilterBuilder filterBuilder)


Copyright © 2013. All Rights Reserved.