Tabnine Logo
SortConstraint
Code IndexAdd Tabnine to your IDE (free)

How to use
SortConstraint
in
org.apache.tapestry5.grid

Best Java code snippets using org.apache.tapestry5.grid.SortConstraint (Showing top 12 results out of 315)

origin: org.nuiton.web/nuiton-tapestry-extra

protected String resolveOrderBy(SortConstraint orderBy) {
  String filterOrder = null;
  if (orderBy != null) {
    PropertyModel property = orderBy.getPropertyModel();
    filterOrder = property.getPropertyName();
    ColumnSort sort = orderBy.getColumnSort();
    if (sort.equals(ColumnSort.DESCENDING)) {
      filterOrder += " desc";
    }
    if (log.isDebugEnabled()) {
      log.debug("Order : " + filterOrder);
    }
  }
  return filterOrder;
}
origin: org.got5/tapestry5-jquery

public List<SortConstraint> getSortConstraints() {
  if (sortColumnId == null)
    return Collections.emptyList();
  PropertyModel sortModel = getDataModel().getById(sortColumnId);
  SortConstraint constraint = new SortConstraint(sortModel,
      getColumnSort());
  return Collections.singletonList(constraint);
}
origin: org.nuiton.web/nuiton-tapestry-extra

protected SortConstraint getSortConstraint(
    List<SortConstraint> sortConstraints) {
  for (SortConstraint constraint : sortConstraints) {
    final ColumnSort sort = constraint.getColumnSort();
    if (sort != ColumnSort.UNSORTED) {
      return constraint;
    }
  }
  return null;
}
origin: apache/tapestry-5

final ColumnSort sort = constraint.getColumnSort();
final PropertyConduit conduit = constraint.getPropertyModel().getConduit();
origin: apache/tapestry-5

public List<SortConstraint> getSortConstraints()
{
  // In a few limited cases we may not have yet hit the SetupRender phase, and the model may be null.
  if (paginationModel == null || paginationModel.getSortColumnId() == null)
  {
    return Collections.emptyList();
  }
  PropertyModel sortModel = getDataModel().getById(paginationModel.getSortColumnId());
  SortConstraint constraint = new SortConstraint(sortModel, getColumnSort());
  return Collections.singletonList(constraint);
}
origin: org.apache.tapestry/tapestry-jpa

final String propertyName = constraint.getPropertyModel().getPropertyName();
switch (constraint.getColumnSort())
origin: apache/tapestry-5

  private void sort(String propertyName, boolean ascending, int... ids)
  {
    PropertyModel propertyModel = model.get(propertyName);

    int availableRows = source.getAvailableRows();

    SortConstraint constraint = new SortConstraint(propertyModel,
                            ascending ? ColumnSort.ASCENDING : ColumnSort.DESCENDING);
    List<SortConstraint> constraints = Collections.singletonList(constraint);

    source.prepare(0, availableRows - 1, constraints);

    for (int i = 0; i < ids.length; i++)
    {
      Datum row = (Datum) source.getRowValue(i);

      assertEquals(row.getId(), ids[i], "Id for Datum #" + i);
    }
  }
}
origin: apache/tapestry-5

final String propertyName = constraint.getPropertyModel().getPropertyName();
switch (constraint.getColumnSort())
origin: org.got5/tapestry5-jquery

final ColumnSort sort = constraint.getColumnSort();
String name = constraint.getPropertyModel().getPropertyName();
origin: org.apache.tapestry/tapestry-hibernate

String propertyName = constraint.getPropertyModel().getPropertyName();
switch (constraint.getColumnSort())
origin: apache/tapestry-5

String propertyName = constraint.getPropertyModel().getPropertyName();
switch (constraint.getColumnSort())
origin: com.mysema.rdf/rdfbean-tapestry

String propertyName = constraint.getPropertyModel().getPropertyName();
Class<? extends Comparable<?>> propertyType = constraint.getPropertyModel().getPropertyType();
ComparableExpression<?> propertyPath;
if (!caseSensitive && propertyType.equals(String.class)) {
switch (constraint.getColumnSort()) {
case ASCENDING:
  beanQuery.orderBy(propertyPath.asc());
org.apache.tapestry5.gridSortConstraint

Javadoc

Identifies how a single column (identified as a org.apache.tapestry5.beaneditor.PropertyModel) is sorted.

Most used methods

  • getColumnSort
  • getPropertyModel
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Path (java.nio.file)
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Collectors (java.util.stream)
  • ImageIO (javax.imageio)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now