{
public void ojbAdd(Object anObject)
{
if (anObject != null)
{
ClassDescriptor cd = MetadataManager.getInstance().getRepository().getDescriptorFor(anObject.getClass());
FieldDescriptor[] fields = cd.getPkFields();
if(fields.length > 1 || fields.length == 0)
{
throw new MetadataException("ManageableHashMap can only be used for persistence capable objects with" +
" exactly one primiary key field defined in metadata, for " + anObject.getClass() + " the" +
" PK field count is " + fields.length);