private void ensureJdbcType(FieldDescriptorDef fieldDef, String checkLevel) throws ConstraintException
    {
        if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE))
        {
            if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_JDBC_TYPE))
            {
                throw new ConstraintException("No jdbc-type specified for the field "+fieldDef.getName()+" in class "+fieldDef.getOwner().getName());
            }

            fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE, fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_JDBC_TYPE));
            if (!fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_CONVERSION) && fieldDef.hasProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_CONVERSION))
            {
                fieldDef.setProperty(PropertyHelper.OJB_PROPERTY_CONVERSION, fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_DEFAULT_CONVERSION));
            }
        }
        else
        {
            // we could let XDoclet check the type for field declarations but not for modifications (as we could
            // not specify the empty string anymore)
            String jdbcType = fieldDef.getProperty(PropertyHelper.OJB_PROPERTY_JDBC_TYPE);

            if (!_jdbcTypes.containsKey(jdbcType))
            {
                throw new ConstraintException("The field "+fieldDef.getName()+" in class "+fieldDef.getOwner().getName()+" specifies the invalid jdbc type "+jdbcType);
            }
        }
    }
private void ensureJdbcType ( FieldDescriptorDef fieldDef , String checkLevel ) throws ConstraintException { if ( ! fieldDef . hasProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) ) { if ( ! fieldDef . hasProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_JDBC_TYPE ) ) { throw new ConstraintException ( "No jdbc-type specified for the field " + fieldDef . getName ( ) + " in class " + fieldDef . getOwner ( ) . getName ( ) ) ; } fieldDef . setProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE , fieldDef . getProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_JDBC_TYPE ) ) ; if ( ! fieldDef . hasProperty ( PropertyHelper . OJB_PROPERTY_CONVERSION ) && fieldDef . hasProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_CONVERSION ) ) { fieldDef . setProperty ( PropertyHelper . OJB_PROPERTY_CONVERSION , fieldDef . getProperty ( PropertyHelper . OJB_PROPERTY_DEFAULT_CONVERSION ) ) ; } } else { String jdbcType = fieldDef . getProperty ( PropertyHelper . OJB_PROPERTY_JDBC_TYPE ) ; if ( ! _jdbcTypes . containsKey ( jdbcType ) ) { throw new ConstraintException ( "The field " + fieldDef . getName ( ) + " in class " + fieldDef . getOwner ( ) . getName ( ) + " specifies the invalid jdbc type " + jdbcType ) ; } } }
Constraint that ensures that the field has a jdbc type. If none is specified, then
the default type is used (which has been determined when the field descriptor was added)
and - if necessary - the default conversion is set.

@param fieldDef   The field descriptor
@param checkLevel The current check level (this constraint is checked in all levels)
@exception ConstraintException If the constraint has been violated