/** * {@inheritDoc} */ @Override public BasicDatePropertyDescriptor clone() { BasicDatePropertyDescriptor clonedDescriptor = (BasicDatePropertyDescriptor) super.clone(); return clonedDescriptor; }
/** * {@inheritDoc} */ public boolean isSecondsAware() { return secondsAware || isMillisecondsAware(); }
/** * {@inheritDoc} */ @Override public BasicPropertyDescriptor createQueryDescriptor() { BasicDurationPropertyDescriptor queryDescriptor = (BasicDurationPropertyDescriptor) super.createQueryDescriptor(); queryDescriptor.setMaxMillis(null); return queryDescriptor; }
/** * Handles max value. * <p/> * {@inheritDoc} */ @Override public void preprocessSetter(final Object component, final Object newValue) { super.preprocessSetter(component, newValue); if (newValue != null && getMaxMillis() != null && (Long) newValue > getMaxMillis()) { IntegrityException ie = new IntegrityException("[" + getName() + "] value is too high on [" + component + "].") { private static final long serialVersionUID = 7459823123892198831L; @Override public String getI18nMessage(ITranslationProvider translationProvider, Locale locale) { StringBuilder boundsSpec = new StringBuilder(); boundsSpec.append("x"); if (getMaxMillis() != null) { boundsSpec.append(" <= ").append(getMaxMillis()); } return translationProvider.getTranslation("integrity.property.toobig", new Object[]{getI18nName(translationProvider, locale), boundsSpec, component}, locale); } }; throw ie; } }
/** * {@inheritDoc} */ @Override public BasicDurationPropertyDescriptor clone() { BasicDurationPropertyDescriptor clonedDescriptor = (BasicDurationPropertyDescriptor) super.clone(); return clonedDescriptor; }
/** * {@inheritDoc} */ @Override public BasicTimePropertyDescriptor clone() { BasicTimePropertyDescriptor clonedDescriptor = (BasicTimePropertyDescriptor) super.clone(); return clonedDescriptor; }