/** * Evaluates the given expression. The given variables will be substituted * in the expression. * * @param expression the expression. * @param vars the variables, can be null. * @return the result of the evaluation. */ public static Object evaluate( String expression, Map<String, Object> vars ) { return evaluate( expression, vars, false ); }
/** * Gets part of an object identifier which may be composite. * * @param id The identifier to parse. * @param index Index of the part to return. * @return The identifier part. */ private String getIdPart( String id, int index ) { return splitSafe( id, COMPOSITE_DIM_OBJECT_ESCAPED_SEP, index ); }
@Override public Future<?> vacuumTablesAsync( ConcurrentLinkedQueue<AnalyticsTablePartition> partitions ) { return ConcurrentUtils.getImmediateFuture(); } }
private String getFilterQuery( SqlHelper sqlHelper, String columnName, String operator, String value ) { String query = StringUtils.EMPTY; query += sqlHelper.whereAnd() + " " + columnName + " " + QueryUtils.parseFilterOperator( operator, value ); return query; }
/** * Performs the htmlNewline(String) and htmlLinks(String) methods against * the given text. * * @param text the text to substitute. * @return the substituted text. */ public static String htmlify( String text ) { text = htmlLinks( text ); text = htmlNewline( text ); return text; }
@Override public void setFollowup( Boolean followup ) { values.add( valueOf( followup ) ); }
private String emailNameEncode( String name ) { return name != null ? TextUtils.removeNewlines( name ) : null; }
/** * Functions which will return the true value if the condition is true, false * value if not. * * @param condititon the condition. * @param trueValue the true value. * @param falseValue the false value. * @return a String. */ public static Object condition( String condititon, Object trueValue, Object falseValue ) { return ExpressionUtils.isTrue( condititon, null ) ? trueValue : falseValue; }
private CategoryOptionCombo getAttributeOptionCombo( CategoryCombo categoryCombo, String cp, String attributeOptionCombo, IdScheme idScheme ) { Set<String> opts = TextUtils.splitToArray( cp, TextUtils.SEMICOLON ); return getAttributeOptionCombo( categoryCombo, opts, attributeOptionCombo, idScheme ); }
public static Object evaluate( String expression ) { return evaluate( expression, null ); } }
@Override public Future<?> applyAggregationLevels( ConcurrentLinkedQueue<AnalyticsTablePartition> partitions, Collection<String> dataElements, int aggregationLevel ) { return ConcurrentUtils.getImmediateFuture(); }
@Override public void setDeleted( Boolean deleted ) { values.add( valueOf( deleted ) ); }
/** * Evaluates the given expression to true or false. The given variables will * be substituted in the expression. * * @param expression the expression. * @param vars the variables, can be null. * @return true or false. */ public static boolean isTrue( String expression, Map<String, Object> vars ) { Object result = evaluate( expression, vars ); return ( result != null && result instanceof Boolean ) ? (Boolean) result : false; }
@Override @Async public Future<?> vacuumTablesAsync( ConcurrentLinkedQueue<AnalyticsTablePartition> tables ) { return ConcurrentUtils.getImmediateFuture(); }
@Override public void setDeleted( Boolean deleted ) { writer.writeAttribute( FIELD_DELETED, valueOf( deleted ) ); }
@Override @Async public Future<?> applyAggregationLevels( ConcurrentLinkedQueue<AnalyticsTablePartition> partitions, Collection<String> dataElements, int aggregationLevel ) { return ConcurrentUtils.getImmediateFuture(); }
@Override public Boolean getFollowup() { return followup = followup == null ? valueOf( getValue( 9 ) ) : followup; }
@Override @Async public Future<?> applyAggregationLevels( ConcurrentLinkedQueue<AnalyticsTablePartition> partitions, Collection<String> dataElements, int aggregationLevel ) { return ConcurrentUtils.getImmediateFuture(); }
@Override public Boolean getDeleted() { return deleted = deleted == null ? valueOf( reader.getAttributeValue( FIELD_DELETED ) ) : deleted; }
@Override @Async public Future<?> applyAggregationLevels( ConcurrentLinkedQueue<AnalyticsTablePartition> partitions, Collection<String> dataElements, int aggregationLevel ) { return ConcurrentUtils.getImmediateFuture(); }