protected void checkAttribute ( String attribute ) { if ( ! hasAttribute ( attribute ) ) { String sb = "Attribute: '" + attribute + "' is not defined in model: '" + getModelClass ( ) + ". " + "Available attributes: " + getAttributeNames ( ) ; throw new IllegalArgumentException ( sb ) ; } }
Checks if this model has a named attribute that has the same name as argument .