private long getIntegerValue(Object value) {
		if (value instanceof Number) {
			return ((Number) value).longValue();
		}
		else if (value instanceof String) {
			try {
				return Long.parseLong((String) value, 10);
			}
			catch (NumberFormatException x) {}
		}

		throw new StorageError(StorageError.BAD_PROPERTY_VALUE);
	}