@Test public void testGetConvertibleTypes() { Set<ConvertiblePair> expected = new HashSet<ConvertiblePair>(); expected.add(new ConvertiblePair(String.class, FileInfo.class)); expected.add(new ConvertiblePair(String.class, Comment.class)); expected.add(new ConvertiblePair(String.class, Sequence.class)); expected.add(new ConvertiblePair(String.class, BaseUser.class)); expected.add(new ConvertiblePair(String.class, PasswordReset.class)); expected.add(new ConvertiblePair(String.class, UserAuthority.class)); expected.add(new ConvertiblePair(String.class, UserCredential.class)); expected.add(new ConvertiblePair(String.class, ImageInfo.class)); expected.add(new ConvertiblePair(String.class, UserGroup.class)); expected.add(new ConvertiblePair(String.class, Ninja.class)); expected.add(new ConvertiblePair(String.class, Skills.class)); expected.add(new ConvertiblePair(String.class, Clan.class)); expected.add(new ConvertiblePair(String.class, UserCriteria.class)); Set<ConvertiblePair> actual = converter.getConvertibleTypes(); assertEquals("Did you add a new class that is assignable to BaseEntity?", expected, actual); }
@Override public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new HashSet<ConvertiblePair>(); for (String entity:baseEntityRegistry.getBaseEntities()) { try { if (entity.contains("SystemCodes") || entity.contains("Tag") || entity.contains("AuditLog")) continue; convertibleTypes.add(new ConvertiblePair(String.class, Class.forName(entity))); _log.info("Adding generic string converter for " + entity); } catch (ClassNotFoundException e) { _log.error("Class not found ["+entity+"]",e); } } return convertibleTypes; }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new HashSet<ConvertiblePair>(); for (String entity:baseEntityRegistry.getBaseEntities()) { try { if (entity.contains("SystemCodes") || entity.contains("Tag") || entity.contains("AuditLog")) continue; convertibleTypes.add(new ConvertiblePair(String.class, Class.forName(entity))); _log.info("Adding generic string converter for " + entity); } catch (ClassNotFoundException e) { _log.error("Class not found ["+entity+"]",e); } } return convertibleTypes; } }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new HashSet<ConvertiblePair>(); for (String entity:baseEntityRegistry.getBaseEntities()) { try { if (entity.contains("SystemCodes") || entity.contains("Tag") || entity.contains("AuditLog")) continue; convertibleTypes.add(new ConvertiblePair(String.class, Class.forName(entity))); _log.info("Adding generic string converter for " + entity); } catch (ClassNotFoundException e) { _log.error("Class not found ["+entity+"]",e); } } return convertibleTypes; }  }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new HashSet<ConvertiblePair>(); for (String entity:baseEntityRegistry.getBaseEntities()) { try { if (entity.contains("SystemCodes") || entity.contains("Tag") || entity.contains("AuditLog")) continue; convertibleTypes.add(new ConvertiblePair(String.class, Class.forName(entity))); _log.info("Adding generic string converter for " + entity); } catch (ClassNotFoundException e) { _log.error("Class not found ["+entity+"]",e); } } return convertibleTypes; }  @Override Set<ConvertiblePair> getConvertibleTypes(); @Override Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType); @Override boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType); final void setBeanFactory(BeanFactory beanFactory); final void setBaseEntityRegistry(BaseEntityRegistry baseEntityRegistry); }
StringToBaseEntityConverter implements 
		ConditionalGenericConverter, BeanFactoryAware { @Override public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new HashSet<ConvertiblePair>(); for (String entity:baseEntityRegistry.getBaseEntities()) { try { if (entity.contains("SystemCodes") || entity.contains("Tag") || entity.contains("AuditLog")) continue; convertibleTypes.add(new ConvertiblePair(String.class, Class.forName(entity))); _log.info("Adding generic string converter for " + entity); } catch (ClassNotFoundException e) { _log.error("Class not found ["+entity+"]",e); } } return convertibleTypes; }  @Override Set<ConvertiblePair> getConvertibleTypes(); @Override Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType); @Override boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType); final void setBeanFactory(BeanFactory beanFactory); final void setBaseEntityRegistry(BaseEntityRegistry baseEntityRegistry);  }