Changeset 5424
- Timestamp:
- Sep 23, 2010, 3:09:12 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/Base.java
r5384 r5424 678 678 } 679 679 if ("".equals(value)) value = null; 680 if (valueType == Type.DATE&& value != null)680 if (valueType.isTemporal() && value != null) 681 681 { 682 // Dates are stored as long timevalues to avoid problems if user682 // Temporal values are stored as long timevalues to avoid problems if user 683 683 // changes the date format. The date is converted back when displayed 684 684 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); … … 793 793 Operator op = filter.getOperator(); 794 794 String value = filter.getValue(); 795 if (filter.getValueType() == Type.DATE&& value != null)795 if (filter.getValueType().isTemporal() && value != null) 796 796 { 797 797 try -
trunk/src/clients/web/net/sf/basedb/clients/web/DynamicUtil.java
r4917 r5424 136 136 Formatter<String> stringFormatter = FormatterFactory.getStringFormatter(sc); 137 137 Formatter<Date> dateFormatter = FormatterFactory.getDateFormatter(sc); 138 Formatter<Date> dateTimeFormatter = FormatterFactory.getDateTimeFormatter(sc); 138 139 columns.add(new TableColumn(idPrefix + "id", propertyPrefix+"id", "rep('id')", 139 140 Type.INT, titlePrefix + "Internal ID", "Reporter internal ID", "auto", true, true, true, … … 155 156 Formula.AverageMethod.NONE, dateFormatter)); 156 157 columns.add(new TableColumn(idPrefix + "lastUpdate", propertyPrefix+"lastUpdate", "rep('lastUpdate')", 157 Type. DATE, titlePrefix + "Last update", "Last updateded", "auto", true, true, true,158 Formula.AverageMethod.NONE, date Formatter));158 Type.TIMESTAMP, titlePrefix + "Last update", "Last updateded", "auto", true, true, true, 159 Formula.AverageMethod.NONE, dateTimeFormatter)); 159 160 160 161 List<ExtendedProperty> extended = ExtendedProperties.getProperties("ReporterData"); -
trunk/src/core/net/sf/basedb/core/DateUtil.java
r5422 r5424 171 171 catch (Exception ex2) 172 172 { 173 throw new InvalidDataException("The value "+value+" is not a valid date.");173 throw new InvalidDataException("The value "+value+" is not a valid timestamp."); 174 174 } 175 175 } -
trunk/src/core/net/sf/basedb/core/PropertyFilter.java
r5384 r5424 689 689 { 690 690 Expression propertyExpression = Hql.property(alias, property); 691 if (getValueType() == Type.DATE&& getValue() != null)691 if (getValueType().isTemporal() && getValue() != null) 692 692 { 693 693 if (!operator.isListOperator()) … … 695 695 // To use ==, != and <= filter on dates we must add 24 hours to it 696 696 // and use different restrictions 697 Date filter = (Date)getValueAsObject();697 Date filter = DateUtil.truncate((Date)getValueAsObject()); 698 698 Date filterPlus24H = new Date(filter.getTime()+24*3600*1000); 699 699 Expression parameterPlus24H = … … 726 726 for (Object obj : objects) 727 727 { 728 Date filter = (Date)obj;728 Date filter = DateUtil.truncate((Date)obj); 729 729 Date filterPlus24H = new Date(filter.getTime()+24*3600*1000); 730 730 parameterName = "p" + System.identityHashCode(obj); -
trunk/src/plugins/core/net/sf/basedb/plugins/BaseFileExporterPlugin.java
r5384 r5424 608 608 items.add(reporterField("symbol", "Gene symbol", Type.STRING, MAX)); 609 609 items.add(reporterField("description", "Description", Type.TEXT, MAX)); 610 items.add(reporterField("lastUpdate", "Last updated", Type. DATE, MAX));610 items.add(reporterField("lastUpdate", "Last updated", Type.TIMESTAMP, MAX)); 611 611 612 612 for (ExtendedProperty ep : ExtendedProperties.getProperties("ReporterData")) -
trunk/src/plugins/core/net/sf/basedb/plugins/BfsExporterPlugin.java
r5384 r5424 631 631 items.add(reporterField("symbol", "Gene symbol", Type.STRING, MAX)); 632 632 items.add(reporterField("description", "Description", Type.TEXT, MAX)); 633 items.add(reporterField("lastUpdate", "Last updated", Type. DATE, MAX));633 items.add(reporterField("lastUpdate", "Last updated", Type.TIMESTAMP, MAX)); 634 634 635 635 for (ExtendedProperty ep : ExtendedProperties.getProperties("ReporterData")) -
trunk/www/common/history/list_history.jsp
r5061 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 5 5 This file is part of BASE - BioArray Software Environment. … … 176 176 property="$hst.time" 177 177 exportproperty="changeHistory.time" 178 datatype=" date"178 datatype="timestamp" 179 179 title="Time" 180 180 sortable="true" -
trunk/www/filemanager/files/list_files.jsp
r5361 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell, Nicklas Nordborg, Martin Svensson 5 5 … … 677 677 id="lastUpdate" 678 678 property="lastUpdate" 679 datatype=" date"679 datatype="timestamp" 680 680 title="Last update" 681 681 sortable="true" -
trunk/www/lims/arraydesigns/features/list_features.jsp
r5062 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Johan Enell, Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Johan Enell, Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell, Nicklas Nordborg 5 5 … … 380 380 <tbl:columndef 381 381 id="reporterList" 382 property="$rpt. £reporterListScores"382 property="$rpt.�reporterListScores" 383 383 datatype="int" 384 384 title="[Rep] Reporter list" … … 437 437 id="reporter.lastUpdate" 438 438 property="reporter.lastUpdate" 439 datatype=" date"439 datatype="timestamp" 440 440 title="[Rep] Last update" 441 441 sortable="true" -
trunk/www/lims/plates/wells/list_wells.jsp
r5062 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Johan Enell, Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Johan Enell, Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell, Nicklas Nordborg 5 5 … … 276 276 <tbl:columndef 277 277 id="reporterList" 278 property="$rpt. £reporterListScores"278 property="$rpt.�reporterListScores" 279 279 datatype="int" 280 280 title="[Rep] Reporter list" … … 333 333 id="reporter.lastUpdate" 334 334 property="reporter.lastUpdate" 335 datatype=" date"335 datatype="timestamp" 336 336 title="[Rep] Last update" 337 337 sortable="true" -
trunk/www/my_base/messages/list_messages.jsp
r4889 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell 5 5 … … 234 234 id="timeSent" 235 235 property="timeSent" 236 datatype=" date"236 datatype="timestamp" 237 237 title="Time sent" 238 238 sortable="true" -
trunk/www/views/jobs/list_jobs.jsp
r5406 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell, Nicklas Nordborg 5 5 … … 343 343 id="created" 344 344 property="created" 345 datatype=" date"345 datatype="timestamp" 346 346 title="Created" 347 347 sortable="true" … … 353 353 id="scheduled" 354 354 property="scheduled" 355 datatype=" date"355 datatype="timestamp" 356 356 title="Scheduled" 357 357 sortable="true" … … 363 363 id="started" 364 364 property="started" 365 datatype=" date"365 datatype="timestamp" 366 366 title="Started" 367 367 sortable="true" … … 373 373 id="ended" 374 374 property="ended" 375 datatype=" date"375 datatype="timestamp" 376 376 title="Ended" 377 377 sortable="true" -
trunk/www/views/rawbioassays/rawdata/list_rawdata.jsp
r5064 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Johan Enell, Jari H äkkinen, Nicklas Nordborg3 Copyright (C) 2006 Johan Enell, Jari H�kkinen, Nicklas Nordborg 4 4 Copyright (C) 2007 Johan Enell, Nicklas Nordborg 5 5 … … 350 350 <tbl:columndef 351 351 id="reporterList" 352 property="$r. £reporterListScores"352 property="$r.�reporterListScores" 353 353 datatype="int" 354 354 title="[Rep] Reporter list" … … 397 397 id="reporter.lastUpdate" 398 398 property="reporter.lastUpdate" 399 datatype=" date"399 datatype="timestamp" 400 400 title="[Rep] Last update" 401 401 sortable="true" -
trunk/www/views/reporterlists/reporters/list_reporters.jsp
r5319 r5424 294 294 <tbl:columndef 295 295 id="reporterList" 296 property="$rpt. £reporterListScores"296 property="$rpt.�reporterListScores" 297 297 datatype="int" 298 298 title="Reporter list" … … 314 314 id="lastUpdate" 315 315 property="reporter.lastUpdate" 316 datatype=" date"316 datatype="timestamp" 317 317 title="Last update" 318 318 sortable="true" -
trunk/www/views/reporters/list_reporters.jsp
r4889 r5424 2 2 ------------------------------------------------------------------ 3 3 Copyright (C) 2005 Nicklas Nordborg 4 Copyright (C) 2006 Johan Enell, Jari H äkkinen, Nicklas Nordborg, Martin Svensson4 Copyright (C) 2006 Johan Enell, Jari H�kkinen, Nicklas Nordborg, Martin Svensson 5 5 Copyright (C) 2007 Johan Enell, Nicklas Nordborg 6 6 … … 257 257 <tbl:columndef 258 258 id="reporterList" 259 property=" £reporterListScores"259 property="�reporterListScores" 260 260 datatype="int" 261 261 title="Reporter list" … … 277 277 id="lastUpdate" 278 278 property="lastUpdate" 279 datatype=" date"279 datatype="timestamp" 280 280 title="Last update" 281 281 sortable="true" -
trunk/www/views/sessions/list_sessions.jsp
r4889 r5424 1 1 <%-- $Id$ 2 2 ------------------------------------------------------------------ 3 Copyright (C) 2006 Jari H äkkinen, Nicklas Nordborg, Martin Svensson3 Copyright (C) 2006 Jari H�kkinen, Nicklas Nordborg, Martin Svensson 4 4 Copyright (C) 2007 Johan Enell 5 5 … … 176 176 id="loginTime" 177 177 property="loginTime" 178 datatype=" date"178 datatype="timestamp" 179 179 title="Login time" 180 180 sortable="true" … … 186 186 id="logoutTime" 187 187 property="logoutTime" 188 datatype=" date"188 datatype="timestamp" 189 189 title="Logout time" 190 190 sortable="true"
Note: See TracChangeset
for help on using the changeset viewer.