Fixed some inconsistencies in javadoc and exception message for ContextMapperCallbackHandler.

This commit is contained in:
Ulrik Sandberg
2008-04-28 18:18:51 +00:00
parent c6575108e9
commit 24fcc0bc35

View File

@@ -46,19 +46,19 @@ public class ContextMapperCallbackHandler extends
}
/**
* Cast the NameClassPair to a {@link Binding} and pass its attributes to
* Cast the NameClassPair to a {@link Binding} and pass its object to
* the ContextMapper.
*
* @param nameClassPair
* a SearchResult instance.
* @return the Object returned from the Mapper.
* a Binding instance.
* @return the Object returned from the mapper.
*/
public Object getObjectFromNameClassPair(NameClassPair nameClassPair) {
Binding binding = (Binding) nameClassPair;
Object object = binding.getObject();
if (object == null) {
throw new ObjectRetrievalException(
"SearchResult did not contain any object.");
"Binding did not contain any object.");
}
return mapper.mapFromContext(object);
}