Tabnine Logo
Pageable.getOrderDirection
Code IndexAdd Tabnine to your IDE (free)

How to use
getOrderDirection
method
in
com.haoxuer.discover.data.page.Pageable

Best Java code snippets using com.haoxuer.discover.data.page.Pageable.getOrderDirection (Showing top 4 results out of 315)

origin: com.haoxuer.discover/discover-common-hibernate

/**
 * 获取排序方向
 *
 * @return 排序方向
 */
public Direction getOrderDirection() {
 return pageable.getOrderDirection();
}
origin: com.haoxuer.discover/discover-common-hibernate

@Override
public int hashCode() {
 return new HashCodeBuilder(17, 37).append(getPageNumber()).append(getPageSize()).append(getSearchProperty()).append(getSearchValue()).append(getOrderProperty()).append(getOrderDirection()).append(getFilters()).append(getOrders()).toHashCode();
}
origin: com.haoxuer.discover/discover-common-hibernate

@Override
public boolean equals(Object obj) {
 if (obj == null) {
  return false;
 }
 if (getClass() != obj.getClass()) {
  return false;
 }
 if (this == obj) {
  return true;
 }
 Pageable other = (Pageable) obj;
 return new EqualsBuilder().append(getPageNumber(), other.getPageNumber()).append(getPageSize(), other.getPageSize()).append(getSearchProperty(), other.getSearchProperty()).append(getSearchValue(), other.getSearchValue()).append(getOrderProperty(), other.getOrderProperty()).append(getOrderDirection(), other.getOrderDirection()).append(getFilters(), other.getFilters())
   .append(getOrders(), other.getOrders()).isEquals();
}
origin: com.haoxuer.discover/discover-common-hibernate

private void addOrders(Criteria criteriaQuery, Pageable pageable) {
 if (criteriaQuery == null || pageable == null) {
  return;
 }
 if (StringUtils.isNotEmpty(pageable.getOrderProperty()) && pageable.getOrderDirection() != null) {
  if (pageable.getOrderDirection() == Direction.asc) {
   criteriaQuery.addOrder(org.hibernate.criterion.Order.asc(pageable.getOrderProperty()));
  } else if (pageable.getOrderDirection() == Direction.desc) {
   criteriaQuery.addOrder(org.hibernate.criterion.Order.desc(pageable.getOrderProperty()));
  }
 }
 if (pageable.getOrders() != null) {
  for (Order order : pageable.getOrders()) {
   if (order.getDirection() == Direction.asc) {
    criteriaQuery.addOrder(org.hibernate.criterion.Order.asc(order.getProperty()));
   } else if (order.getDirection() == Direction.desc) {
    criteriaQuery.addOrder(org.hibernate.criterion.Order.desc(order.getProperty()));
   }
  }
 }
}
 
com.haoxuer.discover.data.pagePageablegetOrderDirection

Javadoc

获取排序方向

Popular methods of Pageable

  • getFilters
    获取筛选
  • getOrders
    获取排序
  • getPageNumber
    获取页码
  • <init>
    初始化一个新创建的Pageable对象
  • setPageNumber
    设置页码
  • setPageSize
    设置每页记录数
  • getOrderProperty
    获取排序属性
  • getPageNo
    获取页码
  • getPageSize
    获取每页记录数
  • getSearchAliasProperty
    获取别名属性
  • getSearchAliasValue
    获取别名值 搜索别名值
  • getSearchProperty
    获取搜索属性
  • getSearchAliasValue,
  • getSearchProperty,
  • getSearchValue,
  • setPageNo

Popular in Java

  • Making http post requests using okhttp
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • IsNull (org.hamcrest.core)
    Is the value null?
  • From CI to AI: The AI layer in your organization
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