当前位置: 首页>>代码示例>>Java>>正文


Java Ops类代码示例

本文整理汇总了Java中com.mysema.query.types.Ops的典型用法代码示例。如果您正苦于以下问题:Java Ops类的具体用法?Java Ops怎么用?Java Ops使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Ops类属于com.mysema.query.types包,在下文中一共展示了Ops类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: everyPagePredicate

import com.mysema.query.types.Ops; //导入依赖的package包/类
@Test
@Ignore
  public void everyPagePredicate() {
      int pageSize = 25;
      int totalPages = N / 25;
      Stopwatch sw = new Stopwatch();
      for (int pageNumber = 0; pageNumber < N / pageSize; pageNumber++) {
          sw.start();
          Page<PagingAndSortingEntity> page = repository.findAll(
              BooleanOperation.create(
                  Ops.EQ,
                  new ConstantImpl<String>("foo"),
                  new ConstantImpl<String>("foo")),
              new PageableImpl(pageNumber, 25, 0, null));
          Assert.assertEquals(pageNumber, page.getNumber());
          Assert.assertEquals(pageSize, page.getSize());
          Assert.assertEquals(totalPages, page.getTotalPages());
          LOGGER.info("Fetched page {} in {}ms...", pageNumber, sw.elapsed(TimeUnit.MILLISECONDS));
          sw.reset();
      }
  }
 
开发者ID:ceineke,项目名称:astyanax-jpa,代码行数:22,代码来源:AstyanaxCql3PagingAndSortingTest.java

示例2: dayOfMonth

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a day of month expression (range 1-31)
 *
 * @return
 */
public NumberExpression<Integer> dayOfMonth(){
    if (dayOfMonth == null) {
        dayOfMonth = NumberOperation.create(Integer.class, Ops.DateTimeOps.DAY_OF_MONTH, this);
    }
    return dayOfMonth;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例3: dayOfWeek

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a day of week expression (range 1-7 / SUN-SAT)
 * <p>NOT supported in JDOQL and not in Derby</p>
 *
 * @return
 */
public NumberExpression<Integer> dayOfWeek() {
    if (dayOfWeek == null) {
        dayOfWeek = NumberOperation.create(Integer.class, Ops.DateTimeOps.DAY_OF_WEEK, this);
    }
    return dayOfWeek;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:DateTimeExpression.java

示例4: dayOfYear

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a day of year expression (range 1-356)
 * <p>NOT supported in JDOQL and not in Derby</p>
 *
 * @return
 */
public NumberExpression<Integer> dayOfYear() {
    if (dayOfYear == null){
        dayOfYear = NumberOperation.create(Integer.class, Ops.DateTimeOps.DAY_OF_YEAR, this);
    }
    return dayOfYear;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:DateTimeExpression.java

示例5: hour

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a hours expression (range 0-23)
 *
 * @return
 */
public NumberExpression<Integer> hour(){
    if (hour == null) {
        hour = NumberOperation.create(Integer.class, Ops.DateTimeOps.HOUR, this);
    }
    return hour;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例6: max

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get the maximum value of this expression (aggregation)
 *
 * @return max(this)
 */
public DateTimeExpression<T> max(){
    if (max == null) {
        max = DateTimeOperation.<T>create((Class<T>)getType(), Ops.AggOps.MAX_AGG, this);
    }
    return max;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例7: milliSecond

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a milliseconds expression (range 0-999)
 * <p>Is always 0 in HQL and JDOQL modules</p>
 *
 * @return
 */
public NumberExpression<Integer> milliSecond(){
    if (milliSecond == null) {
        milliSecond = NumberOperation.create(Integer.class, Ops.DateTimeOps.MILLISECOND, this);
    }
    return milliSecond;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:DateTimeExpression.java

示例8: min

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get the minimum value of this expression (aggregation)
 *
 * @return min(this)
 */
public DateTimeExpression<T> min(){
    if (min == null) {
        min = DateTimeOperation.<T>create((Class<T>)getType(), Ops.AggOps.MIN_AGG, this);
    }
    return min;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例9: minute

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a minutes expression (range 0-59)
 *
 * @return
 */
public NumberExpression<Integer> minute(){
    if (minute == null) {
        minute = NumberOperation.create(Integer.class, Ops.DateTimeOps.MINUTE, this);
    }
    return minute;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例10: month

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a month expression (range 1-12 / JAN-DEC)
 *
 * @return
 */
public NumberExpression<Integer> month(){
    if (month == null) {
        month = NumberOperation.create(Integer.class, Ops.DateTimeOps.MONTH, this);
    }
    return month;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例11: second

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a seconds expression (range 0-59)
 *
 * @return
 */
public NumberExpression<Integer> second(){
    if (second == null) {
        second = NumberOperation.create(Integer.class, Ops.DateTimeOps.SECOND, this);
    }
    return second;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例12: week

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a week expression
 *
 * @return
 */
public NumberExpression<Integer> week() {
    if (week == null) {
        week = NumberOperation.create(Integer.class, Ops.DateTimeOps.WEEK,  this);
    }
    return week;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例13: year

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a year expression
 *
 * @return
 */
public NumberExpression<Integer> year(){
    if (year == null) {
        year = NumberOperation.create(Integer.class, Ops.DateTimeOps.YEAR, this);
    }
    return year;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例14: yearMonth

import com.mysema.query.types.Ops; //导入依赖的package包/类
/**
 * Get a year / month expression
 *
 * @return
 */
public NumberExpression<Integer> yearMonth(){
    if (yearMonth == null) {
        yearMonth = NumberOperation.create(Integer.class, Ops.DateTimeOps.YEAR_MONTH, this);
    }
    return yearMonth;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:DateTimeExpression.java

示例15: templates

import com.mysema.query.types.Ops; //导入依赖的package包/类
@Bean
public SQLTemplates templates() {
    return new PostgresTemplates() {{
        // https://github.com/mysema/querydsl/pull/280
        setPrintSchema(false);
        add(Ops.DateTimeOps.CURRENT_TIMESTAMP, "current_timestamp");
        add(Ops.DateTimeOps.CURRENT_TIME, "current_time");
        add(Ops.DateTimeOps.CURRENT_DATE, "current_date");
    }};
}
 
开发者ID:solita,项目名称:kansalaisaloite,代码行数:11,代码来源:JdbcConfiguration.java


注:本文中的com.mysema.query.types.Ops类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。