diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDate.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDate.java index 5aab59815..859d2ba34 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDate.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDate.java @@ -54,7 +54,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getDayOfMonth(){ + public ENumber dayOfMonth(){ if (dayOfMonth == null){ dayOfMonth = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_MONTH, this); } @@ -67,7 +67,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getDayOfWeek() { + public ENumber dayOfWeek() { if (dayOfWeek == null){ dayOfWeek = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_WEEK, this); } @@ -80,7 +80,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getDayOfYear() { + public ENumber dayOfYear() { if (dayOfYear == null){ dayOfYear = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_YEAR, this); } @@ -92,7 +92,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getMonth(){ + public ENumber month(){ if (month == null){ month = ONumber.create(Integer.class, Ops.DateTimeOps.MONTH, this); } @@ -104,7 +104,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getWeek() { + public ENumber week() { if (week == null){ week = ONumber.create(Integer.class, Ops.DateTimeOps.WEEK, this); } @@ -116,7 +116,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getYear(){ + public ENumber year(){ if (year == null){ year = ONumber.create(Integer.class, Ops.DateTimeOps.YEAR, this); } @@ -128,7 +128,7 @@ public abstract class EDate extends EDateOrTime { * * @return */ - public ENumber getYearMonth(){ + public ENumber yearMonth(){ if (yearMonth == null){ yearMonth = ONumber.create(Integer.class, Ops.DateTimeOps.YEAR_MONTH, this); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateConst.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateConst.java index fd4ebd9d2..1539ed1c7 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateConst.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateConst.java @@ -38,37 +38,37 @@ public class EDateConst extends EDate implements Constant getDayOfMonth(){ + public ENumber dayOfMonth(){ return ENumberConst.create(calendar.get(Calendar.DAY_OF_MONTH)); } @Override - public ENumber getMonth(){ + public ENumber month(){ return ENumberConst.create(calendar.get(Calendar.MONTH) + 1); } @Override - public ENumber getYear(){ + public ENumber year(){ return ENumberConst.create(calendar.get(Calendar.YEAR)); } @Override - public ENumber getYearMonth(){ + public ENumber yearMonth(){ return ENumberConst.create(calendar.get(Calendar.YEAR) * 100 + calendar.get(Calendar.MONTH) + 1); } @Override - public ENumber getDayOfWeek() { + public ENumber dayOfWeek() { return ENumberConst.create(calendar.get(Calendar.DAY_OF_WEEK)); } @Override - public ENumber getDayOfYear() { + public ENumber dayOfYear() { return ENumberConst.create(calendar.get(Calendar.DAY_OF_YEAR)); } @Override - public ENumber getWeek() { + public ENumber week() { return ENumberConst.create(calendar.get(Calendar.WEEK_OF_YEAR)); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTime.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTime.java index 87aa9dd20..2ad0ecf7a 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTime.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTime.java @@ -74,7 +74,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getDayOfMonth(){ + public ENumber dayOfMonth(){ if (dayOfMonth == null){ dayOfMonth = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_MONTH, this); } @@ -87,7 +87,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getDayOfWeek() { + public ENumber dayOfWeek() { if (dayOfWeek == null){ dayOfWeek = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_WEEK, this); } @@ -100,7 +100,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getDayOfYear() { + public ENumber dayOfYear() { if (dayOfYear == null){ dayOfYear = ONumber.create(Integer.class, Ops.DateTimeOps.DAY_OF_YEAR, this); } @@ -112,7 +112,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getHour(){ + public ENumber hour(){ if (hours == null){ hours = ONumber.create(Integer.class, Ops.DateTimeOps.HOUR, this); } @@ -125,7 +125,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getMilliSecond(){ + public ENumber milliSecond(){ if (milliseconds == null){ milliseconds = ONumber.create(Integer.class, Ops.DateTimeOps.MILLISECOND, this); } @@ -137,7 +137,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getMinute(){ + public ENumber minute(){ if (minutes == null){ minutes = ONumber.create(Integer.class, Ops.DateTimeOps.MINUTE, this); } @@ -149,7 +149,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getMonth(){ + public ENumber month(){ if (month == null){ month = ONumber.create(Integer.class, Ops.DateTimeOps.MONTH, this); } @@ -161,7 +161,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getSecond(){ + public ENumber second(){ if (seconds == null){ seconds = ONumber.create(Integer.class, Ops.DateTimeOps.SECOND, this); } @@ -174,7 +174,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getWeek() { + public ENumber week() { if (week == null){ week = ONumber.create(Integer.class, Ops.DateTimeOps.WEEK, this); } @@ -186,7 +186,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getYear(){ + public ENumber year(){ if (year == null){ year = ONumber.create(Integer.class, Ops.DateTimeOps.YEAR, this); } @@ -198,7 +198,7 @@ public abstract class EDateTime extends EDateOrTime { * * @return */ - public ENumber getYearMonth(){ + public ENumber yearMonth(){ if (yearMonth == null){ yearMonth = ONumber.create(Integer.class, Ops.DateTimeOps.YEAR_MONTH, this); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTimeConst.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTimeConst.java index c157199bf..435150af3 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTimeConst.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/EDateTimeConst.java @@ -38,57 +38,57 @@ public class EDateTimeConst extends EDateTime implements Constan } @Override - public ENumber getDayOfMonth(){ + public ENumber dayOfMonth(){ return ENumberConst.create(calendar.get(Calendar.DAY_OF_MONTH)); } @Override - public ENumber getMonth(){ + public ENumber month(){ return ENumberConst.create(calendar.get(Calendar.MONTH) + 1); } @Override - public ENumber getYear(){ + public ENumber year(){ return ENumberConst.create(calendar.get(Calendar.YEAR)); } @Override - public ENumber getYearMonth(){ + public ENumber yearMonth(){ return ENumberConst.create(calendar.get(Calendar.YEAR) * 100 + calendar.get(Calendar.MONTH) + 1); } @Override - public ENumber getDayOfWeek() { + public ENumber dayOfWeek() { return ENumberConst.create(calendar.get(Calendar.DAY_OF_WEEK)); } @Override - public ENumber getDayOfYear() { + public ENumber dayOfYear() { return ENumberConst.create(calendar.get(Calendar.DAY_OF_YEAR)); } @Override - public ENumber getWeek() { + public ENumber week() { return ENumberConst.create(calendar.get(Calendar.WEEK_OF_YEAR)); } @Override - public ENumber getHour() { + public ENumber hour() { return ENumberConst.create(calendar.get(Calendar.HOUR_OF_DAY)); } @Override - public ENumber getMinute() { + public ENumber minute() { return ENumberConst.create(calendar.get(Calendar.MINUTE)); } @Override - public ENumber getSecond() { + public ENumber second() { return ENumberConst.create(calendar.get(Calendar.SECOND)); } @Override - public ENumber getMilliSecond() { + public ENumber milliSecond() { return ENumberConst.create(calendar.get(Calendar.MILLISECOND)); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/ETime.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/ETime.java index 1398faf48..1797f160b 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/ETime.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/ETime.java @@ -34,7 +34,7 @@ public abstract class ETime extends EDateOrTime { * * @return */ - public ENumber getHour(){ + public ENumber hour(){ if (hours == null){ hours = ONumber.create(Integer.class, Ops.DateTimeOps.HOUR, this); } @@ -46,7 +46,7 @@ public abstract class ETime extends EDateOrTime { * * @return */ - public ENumber getMinute(){ + public ENumber minute(){ if (minutes == null){ minutes = ONumber.create(Integer.class, Ops.DateTimeOps.MINUTE, this); } @@ -58,7 +58,7 @@ public abstract class ETime extends EDateOrTime { * * @return */ - public ENumber getSecond(){ + public ENumber second(){ if (seconds == null){ seconds = ONumber.create(Integer.class, Ops.DateTimeOps.SECOND, this); } @@ -72,7 +72,7 @@ public abstract class ETime extends EDateOrTime { * * @return */ - public ENumber getMilliSecond(){ + public ENumber milliSecond(){ if (milliseconds == null){ milliseconds = ONumber.create(Integer.class, Ops.DateTimeOps.MILLISECOND, this); } diff --git a/querydsl-core/src/main/java/com/mysema/query/types/expr/ETimeConst.java b/querydsl-core/src/main/java/com/mysema/query/types/expr/ETimeConst.java index ba53ebfd0..d310fca55 100644 --- a/querydsl-core/src/main/java/com/mysema/query/types/expr/ETimeConst.java +++ b/querydsl-core/src/main/java/com/mysema/query/types/expr/ETimeConst.java @@ -38,22 +38,22 @@ public class ETimeConst extends ETime implements Constant getHour() { + public ENumber hour() { return ENumberConst.create(calendar.get(Calendar.HOUR_OF_DAY)); } @Override - public ENumber getMinute() { + public ENumber minute() { return ENumberConst.create(calendar.get(Calendar.MINUTE)); } @Override - public ENumber getSecond() { + public ENumber second() { return ENumberConst.create(calendar.get(Calendar.SECOND)); } @Override - public ENumber getMilliSecond() { + public ENumber milliSecond() { return ENumberConst.create(calendar.get(Calendar.MILLISECOND)); } diff --git a/querydsl-core/src/test/java/com/mysema/query/Filters.java b/querydsl-core/src/test/java/com/mysema/query/Filters.java index d45fb9a73..9eb5169dd 100644 --- a/querydsl-core/src/test/java/com/mysema/query/Filters.java +++ b/querydsl-core/src/test/java/com/mysema/query/Filters.java @@ -88,9 +88,9 @@ public class Filters { Collection date(EDate expr, EDate other, A knownValue){ List rv = new ArrayList(); rv.addAll(comparable(expr, other, knownValue)); - rv.add(expr.getDayOfMonth().eq(other.getDayOfMonth())); - rv.add(expr.getMonth().eq(other.getMonth())); - rv.add(expr.getYear().eq(other.getYear())); + rv.add(expr.dayOfMonth().eq(other.dayOfMonth())); + rv.add(expr.month().eq(other.month())); + rv.add(expr.year().eq(other.year())); return rv; } @@ -99,25 +99,25 @@ public class Filters { Collection dateTime(EDateTime expr, EDateTime other, A knownValue){ List rv = new ArrayList(); rv.addAll(comparable(expr, other, knownValue)); - rv.add(expr.getDayOfMonth().eq(1)); - rv.add(expr.getDayOfMonth().eq(other.getDayOfMonth())); + rv.add(expr.dayOfMonth().eq(1)); + rv.add(expr.dayOfMonth().eq(other.dayOfMonth())); - rv.add(expr.getMonth().eq(1)); - rv.add(expr.getMonth().eq(other.getMonth())); + rv.add(expr.month().eq(1)); + rv.add(expr.month().eq(other.month())); - rv.add(expr.getYear().eq(2000)); - rv.add(expr.getYear().eq(other.getYear())); + rv.add(expr.year().eq(2000)); + rv.add(expr.year().eq(other.year())); - rv.add(expr.getYearMonth().eq(other.getYearMonth())); + rv.add(expr.yearMonth().eq(other.yearMonth())); - rv.add(expr.getHour().eq(1)); - rv.add(expr.getHour().eq(other.getHour())); + rv.add(expr.hour().eq(1)); + rv.add(expr.hour().eq(other.hour())); - rv.add(expr.getMinute().eq(1)); - rv.add(expr.getMinute().eq(other.getMinute())); + rv.add(expr.minute().eq(1)); + rv.add(expr.minute().eq(other.minute())); - rv.add(expr.getSecond().eq(1)); - rv.add(expr.getSecond().eq(other.getSecond())); + rv.add(expr.second().eq(1)); + rv.add(expr.second().eq(other.second())); return rv; } @@ -260,9 +260,9 @@ public class Filters { Collection time(ETime expr, ETime other, A knownValue){ List rv = new ArrayList(); rv.addAll(comparable(expr, other, knownValue)); - rv.add(expr.getHour().eq(other.getHour())); - rv.add(expr.getMinute().eq(other.getMinute())); - rv.add(expr.getSecond().eq(other.getSecond())); + rv.add(expr.hour().eq(other.hour())); + rv.add(expr.minute().eq(other.minute())); + rv.add(expr.second().eq(other.second())); return rv; } diff --git a/querydsl-core/src/test/java/com/mysema/query/MatchingFilters.java b/querydsl-core/src/test/java/com/mysema/query/MatchingFilters.java index 5351535d2..16e209d15 100644 --- a/querydsl-core/src/test/java/com/mysema/query/MatchingFilters.java +++ b/querydsl-core/src/test/java/com/mysema/query/MatchingFilters.java @@ -70,17 +70,17 @@ public class MatchingFilters { Collection date(EDate expr, EDate other){ HashSet rv = new HashSet(); rv.addAll(comparable(expr, other)); - rv.add(expr.getDayOfMonth().eq(other.getDayOfMonth())); + rv.add(expr.dayOfMonth().eq(other.dayOfMonth())); if (!target.equals(Target.DERBY) && !module.equals(Module.JDOQL)){ - rv.add(expr.getDayOfWeek().eq(other.getDayOfWeek ())); - rv.add(expr.getDayOfYear().eq(other.getDayOfYear())); - rv.add(expr.getWeek().eq(other.getWeek())); + rv.add(expr.dayOfWeek().eq(other.dayOfWeek ())); + rv.add(expr.dayOfYear().eq(other.dayOfYear())); + rv.add(expr.week().eq(other.week())); } - rv.add(expr.getMonth().eq(other.getMonth())); - rv.add(expr.getYear().eq(other.getYear())); - rv.add(expr.getYearMonth().eq(other.getYearMonth())); + rv.add(expr.month().eq(other.month())); + rv.add(expr.year().eq(other.year())); + rv.add(expr.yearMonth().eq(other.yearMonth())); return rv; } @@ -94,21 +94,21 @@ public class MatchingFilters { Collection dateTime(EDateTime expr, EDateTime other){ HashSet rv = new HashSet(); rv.addAll(comparable(expr, other)); - rv.add(expr.getMilliSecond().eq(other.getMilliSecond())); - rv.add(expr.getSecond().eq(other.getSecond())); - rv.add(expr.getMinute().eq(other.getMinute())); - rv.add(expr.getHour().eq(other.getHour())); - rv.add(expr.getDayOfMonth().eq(other.getDayOfMonth())); + rv.add(expr.milliSecond().eq(other.milliSecond())); + rv.add(expr.second().eq(other.second())); + rv.add(expr.minute().eq(other.minute())); + rv.add(expr.hour().eq(other.hour())); + rv.add(expr.dayOfMonth().eq(other.dayOfMonth())); if (!target.equals(Target.DERBY) && !module.equals(Module.JDOQL)){ - rv.add(expr.getDayOfWeek().eq(other.getDayOfWeek ())); - rv.add(expr.getDayOfYear().eq(other.getDayOfYear())); - rv.add(expr.getWeek().eq(other.getWeek())); + rv.add(expr.dayOfWeek().eq(other.dayOfWeek ())); + rv.add(expr.dayOfYear().eq(other.dayOfYear())); + rv.add(expr.week().eq(other.week())); } - rv.add(expr.getMonth().eq(other.getMonth())); - rv.add(expr.getYear().eq(other.getYear())); - rv.add(expr.getYearMonth().eq(other.getYearMonth())); + rv.add(expr.month().eq(other.month())); + rv.add(expr.year().eq(other.year())); + rv.add(expr.yearMonth().eq(other.yearMonth())); return rv; } @@ -247,10 +247,10 @@ public class MatchingFilters { Collection time(ETime expr, ETime other){ HashSet rv = new HashSet(); rv.addAll(comparable(expr, other)); - rv.add(expr.getMilliSecond().eq(other.getMilliSecond())); - rv.add(expr.getSecond().eq(other.getSecond())); - rv.add(expr.getMinute().eq(other.getMinute())); - rv.add(expr.getHour().eq(other.getHour())); + rv.add(expr.milliSecond().eq(other.milliSecond())); + rv.add(expr.second().eq(other.second())); + rv.add(expr.minute().eq(other.minute())); + rv.add(expr.hour().eq(other.hour())); return rv; } diff --git a/querydsl-core/src/test/java/com/mysema/query/Projections.java b/querydsl-core/src/test/java/com/mysema/query/Projections.java index a04f9541d..0362109d3 100644 --- a/querydsl-core/src/test/java/com/mysema/query/Projections.java +++ b/querydsl-core/src/test/java/com/mysema/query/Projections.java @@ -54,23 +54,23 @@ public class Projections { @SuppressWarnings("unchecked") Collection> date(EDate expr, EDate other, A knownValue){ HashSet> rv = new HashSet>(); - rv.add(expr.getDayOfMonth()); - rv.add(expr.getMonth()); - rv.add(expr.getYear()); - rv.add(expr.getYearMonth()); + rv.add(expr.dayOfMonth()); + rv.add(expr.month()); + rv.add(expr.year()); + rv.add(expr.yearMonth()); return rv; } @SuppressWarnings("unchecked") Collection> dateTime(EDateTime expr, EDateTime other, A knownValue){ HashSet> rv = new HashSet>(); - rv.add(expr.getDayOfMonth()); - rv.add(expr.getMonth()); - rv.add(expr.getYear()); - rv.add(expr.getYearMonth()); - rv.add(expr.getHour()); - rv.add(expr.getMinute()); - rv.add(expr.getSecond()); + rv.add(expr.dayOfMonth()); + rv.add(expr.month()); + rv.add(expr.year()); + rv.add(expr.yearMonth()); + rv.add(expr.hour()); + rv.add(expr.minute()); + rv.add(expr.second()); return rv; } @@ -191,9 +191,9 @@ public class Projections { @SuppressWarnings("unchecked") Collection> time(ETime expr, ETime other, A knownValue){ HashSet> rv = new HashSet>(); - rv.add(expr.getHour()); - rv.add(expr.getMinute()); - rv.add(expr.getSecond()); + rv.add(expr.hour()); + rv.add(expr.minute()); + rv.add(expr.second()); return rv; } diff --git a/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateConstTest.java b/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateConstTest.java index 6310228e0..fd782fe81 100644 --- a/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateConstTest.java +++ b/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateConstTest.java @@ -24,11 +24,11 @@ public class EDateConstTest { System.out.println(cal.getTime()); EDate date = EDateConst.create(new Date(cal.getTimeInMillis())); - assertEquals("1", date.getDayOfMonth().toString()); - assertEquals("1", date.getMonth().toString()); - assertEquals("2000",date.getYear().toString()); - assertEquals("7", date.getDayOfWeek().toString()); - assertEquals("1", date.getDayOfYear().toString()); + assertEquals("1", date.dayOfMonth().toString()); + assertEquals("1", date.month().toString()); + assertEquals("2000",date.year().toString()); + assertEquals("7", date.dayOfWeek().toString()); + assertEquals("1", date.dayOfYear().toString()); } } diff --git a/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateTimeConstTest.java b/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateTimeConstTest.java index b61848ca1..ff74531c9 100644 --- a/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateTimeConstTest.java +++ b/querydsl-core/src/test/java/com/mysema/query/types/expr/EDateTimeConstTest.java @@ -27,15 +27,15 @@ public class EDateTimeConstTest { System.out.println(cal.getTime()); EDateTime date = EDateTimeConst.create(cal.getTime()); - assertEquals("1", date.getDayOfMonth().toString()); - assertEquals("1", date.getMonth().toString()); - assertEquals("2000", date.getYear().toString()); - assertEquals("7", date.getDayOfWeek().toString()); - assertEquals("1", date.getDayOfYear().toString()); - assertEquals("13", date.getHour().toString()); - assertEquals("30", date.getMinute().toString()); - assertEquals("12", date.getSecond().toString()); - assertEquals("3", date.getMilliSecond().toString()); + assertEquals("1", date.dayOfMonth().toString()); + assertEquals("1", date.month().toString()); + assertEquals("2000", date.year().toString()); + assertEquals("7", date.dayOfWeek().toString()); + assertEquals("1", date.dayOfYear().toString()); + assertEquals("13", date.hour().toString()); + assertEquals("30", date.minute().toString()); + assertEquals("12", date.second().toString()); + assertEquals("3", date.milliSecond().toString()); } } diff --git a/querydsl-core/src/test/java/com/mysema/query/types/expr/ETimeConstTest.java b/querydsl-core/src/test/java/com/mysema/query/types/expr/ETimeConstTest.java index 159e7653c..29c4aa6df 100644 --- a/querydsl-core/src/test/java/com/mysema/query/types/expr/ETimeConstTest.java +++ b/querydsl-core/src/test/java/com/mysema/query/types/expr/ETimeConstTest.java @@ -24,9 +24,9 @@ public class ETimeConstTest { System.out.println(cal.getTime()); ETime