/** * {@inheritDoc} */ public Calendar getDate() throws RepositoryException { setValueConsumed(); return qvalue.getCalendar(); }
/** * {@inheritDoc} */ public double getDouble() throws RepositoryException { setValueConsumed(); return qvalue.getDouble(); }
/** * {@inheritDoc} */ public long getLong() throws RepositoryException { setValueConsumed(); return qvalue.getLong(); }
/** * {@inheritDoc} */ public boolean getBoolean() throws RepositoryException { setValueConsumed(); if (getType() == PropertyType.STRING || getType() == PropertyType.BINARY || getType() == PropertyType.BOOLEAN) { return Boolean.valueOf(qvalue.getString()).booleanValue(); } else { throw new ValueFormatException("incompatible type " + PropertyType.nameFromValue(qvalue.getType())); } }
/** * {@inheritDoc} */ public String getString() throws RepositoryException { setValueConsumed(); if (getType() == PropertyType.NAME) { // needs formatting return resolver.getJCRName(qvalue.getName()); } else if (getType() == PropertyType.PATH) { // needs formatting return resolver.getJCRPath(qvalue.getPath()); } else { return qvalue.getString(); } }