public Long getLong() {
        Object gotValue=getValue();
        if (gotValue != null) {
            if (!Long.class.isAssignableFrom(gotValue.getClass())) {            	
                throw new ClassCastException("don't know how to convert "
                		+gotValue.getClass().getName()+" to Long");
            }
        }
        return (Long)gotValue;
    }