List of usage examples for javax.persistence.metamodel SingularAttribute toString
public String toString()
From source file:org.easy.criteria.CriteriaComposer.java
/** * @param function/*from w ww . ja v a 2s . com*/ * @param attribute * @param alias * @return */ public <V> CriteriaComposer<E> select(AggregateFunction function, SingularAttribute<? super E, V> attribute, String alias) { Preconditions.checkNotNull(function); Preconditions.checkNotNull(attribute); if (alias == null || alias.trim().length() == 0) alias = function.toString().toLowerCase() + "." + this._entityClass.getSimpleName() + "." + attribute.getName(); SelectContainer<E> selectContainer = new SelectContainer<E>(function, attribute, alias); int index = _selects.indexOf(selectContainer); if (index >= 0) _selects.add(index, selectContainer); else _selects.add(selectContainer); log.debug("Added select " + attribute.toString()); return this; }