List of usage examples for org.joda.time YearMonthDay toString
public String toString()
From source file:com.moss.jodapersist.YearMonthDayUserType.java
License:Open Source License
public void nullSafeSet(PreparedStatement statement, Object value, int index) throws HibernateException, SQLException { YearMonthDay ymd = (YearMonthDay) value; if (ymd != null) { if (sqltype.equals(this.DB_FORMAT_NUMERIC)) { statement.setLong(index, yearMonthDayToLong(ymd)); } else if (sqltype.equals(this.DB_FORMAT_DATETIME)) { Instant instant = ymd.toDateTimeAtMidnight().toInstant(); if (timeOffset.equals(TIME_OFFSET_NOON)) { instant = instant.toDateTime(DateTimeZone.UTC).plusHours(12).toInstant(); }/* ww w . j av a 2 s.com*/ statement.setTimestamp(index, new Timestamp(instant.getMillis()), storageCalendar); } else if (sqltype.equals(this.DB_FORMAT_STRING)) { statement.setString(index, ymd.toString()); } else throw new Error("No valid sqlType specified!"); } else { statement.setNull(index, getNullType()); } }
From source file:net.sourceforge.fenixedu.domain.reports.TeachersListFromGiafReportFile.java
License:Open Source License
private String writeDate(YearMonthDay yearMonthDay) { return yearMonthDay.toString(); }
From source file:net.sourceforge.fenixedu.domain.space.LessonInstanceSpaceOccupation.java
License:Open Source License
@Override public String getInfo() { Lesson theLesson = getLessonInstancesSet().iterator().next().getLesson(); String asd = theLesson.getShift().getCourseLoadsSet().iterator().next().getType().getFullNameTipoAula(); for (YearMonthDay ymd : theLesson.getAllLessonDates()) { asd += "\n" + ymd.toString(); }/*from w w w . j ava 2 s . c o m*/ return asd; }
From source file:net.sourceforge.fenixedu.domain.space.LessonSpaceOccupation.java
License:Open Source License
@Override public String getInfo() { String asd = getLesson().getShift().getCourseLoadsSet().iterator().next().getType().getFullNameTipoAula(); for (YearMonthDay ymd : getLesson().getAllLessonDates()) { asd += "\n" + ymd.toString(); }// w ww.jav a 2 s . c o m return asd; }
From source file:net.sourceforge.fenixedu.presentationTier.Action.coordinator.AllSummaryBean.java
License:Open Source License
public String getCandidacyPeriod() { Scheduleing scheduling = getExecutionDegree().getScheduling(); final YearMonthDay startOfCandidacyPeriodDateYearMonthDay = scheduling .getStartOfCandidacyPeriodDateYearMonthDay(); final String startDate = startOfCandidacyPeriodDateYearMonthDay == null ? NULL_LABEL : startOfCandidacyPeriodDateYearMonthDay.toString(); final HourMinuteSecond startOfCandidacyPeriodTimeHourMinuteSecond = scheduling .getStartOfCandidacyPeriodTimeHourMinuteSecond(); final String startTime = startOfCandidacyPeriodTimeHourMinuteSecond == null ? NULL_LABEL : startOfCandidacyPeriodTimeHourMinuteSecond.toString(); final YearMonthDay endOfCandidacyPeriodDateYearMonthDay = scheduling .getEndOfCandidacyPeriodDateYearMonthDay(); final String endDate = endOfCandidacyPeriodDateYearMonthDay == null ? NULL_LABEL : endOfCandidacyPeriodDateYearMonthDay.toString(); final HourMinuteSecond endOfCandidacyPeriodTimeHourMinuteSecond = scheduling .getEndOfCandidacyPeriodTimeHourMinuteSecond(); final String endTime = endOfCandidacyPeriodTimeHourMinuteSecond == null ? NULL_LABEL : endOfCandidacyPeriodTimeHourMinuteSecond.toString(); return RenderUtils.getResourceString("APPLICATION_RESOURCES", "label.thesis.period", new Object[] { startDate, startTime, endDate, endTime }); }
From source file:net.sourceforge.fenixedu.presentationTier.Action.coordinator.AllSummaryBean.java
License:Open Source License
public String getProposalsPeriod() { Scheduleing scheduling = getExecutionDegree().getScheduling(); final YearMonthDay startOfProposalPeriodDateYearMonthDay = scheduling .getStartOfProposalPeriodDateYearMonthDay(); final String startDate = startOfProposalPeriodDateYearMonthDay == null ? NULL_LABEL : startOfProposalPeriodDateYearMonthDay.toString(); final HourMinuteSecond startOfProposalPeriodTimeHourMinuteSecond = scheduling .getStartOfProposalPeriodTimeHourMinuteSecond(); final String startTime = startOfProposalPeriodTimeHourMinuteSecond == null ? NULL_LABEL : startOfProposalPeriodTimeHourMinuteSecond.toString(); final YearMonthDay endOfProposalPeriodDateYearMonthDay = scheduling .getEndOfProposalPeriodDateYearMonthDay(); final String endDate = endOfProposalPeriodDateYearMonthDay == null ? NULL_LABEL : endOfProposalPeriodDateYearMonthDay.toString(); final HourMinuteSecond endOfProposalPeriodTimeHourMinuteSecond = scheduling .getEndOfProposalPeriodTimeHourMinuteSecond(); final String endTime = endOfProposalPeriodTimeHourMinuteSecond == null ? NULL_LABEL : endOfProposalPeriodTimeHourMinuteSecond.toString(); return RenderUtils.getResourceString("APPLICATION_RESOURCES", "label.thesis.period", new Object[] { startDate, startTime, endDate, endTime }); }
From source file:org.jadira.usertype.dateandtime.joda.columnmapper.DateColumnYearMonthDayMapper.java
License:Apache License
@Override public String toNonNullString(YearMonthDay value) { return value.toString(); }
From source file:org.jadira.usertype.dateandtime.joda.columnmapper.StringColumnYearMonthDayMapper.java
License:Apache License
@Override public String toNonNullValue(YearMonthDay value) { return value.toString(); }
From source file:pt.ist.fenix.task.BirthDaysCIIST.java
License:Open Source License
private void warnAboutBirthDay(Person personNearBirthDay, YearMonthDay birthDay) { for (Integer employeeToWarnNumber : listOfEmployeesNumberToWarn) { Employee employeeToWarn = Employee.readByNumber(employeeToWarnNumber); if (employeeToWarn != null) { Person personToWarn = employeeToWarn.getPerson(); if (personToWarn != null) { sendMessage(personToWarn.getDefaultEmailAddressValue(), "Aviso de Aniversario CIIST", personNearBirthDay.getFirstAndLastName() + " faz anos dia " + birthDay.toString() + "."); }//from w ww . j a v a 2 s . co m } } }