public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapper mapper : m) { q.registerMapper(mapper); } } } };
public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapperFactory factory : m) { q.registerMapper(factory); } } } };
@Override public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapperFactory factory : m) { q.registerMapper(factory); } } } };
@Override public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapper mapper : m) { q.registerMapper(mapper); } } } };
@Override public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapperFactory factory : m) { q.registerMapper(factory); } } } };
@Override public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapper mapper : m) { q.registerMapper(mapper); } } } };
public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapper mapper : m) { q.registerMapper(mapper); } } } };
public void apply(SQLStatement statement) { if (statement instanceof Query) { Query q = (Query) statement; for (ResultSetMapperFactory factory : m) { q.registerMapper(factory); } } } };
@Override public void apply(SQLStatement s) throws SQLException { Query q = (Query) s; q.registerMapper(new BeanMapperFactory()); } };
@Override public void apply(SQLStatement s) throws SQLException { Query q = (Query) s; q.registerMapper(new BeanMapperFactory()); } };
public void apply(final SQLStatement statement) { statement.setStatementLocator(l); if (statement instanceof Query) { final Query query = (Query) statement; // Find the model class associated with this sqlObjectType (which is a SqlDao class) to register its mapper // If a custom mapper is defined via @RegisterMapper, don't register our generic one if (sqlObjectType.getGenericInterfaces() != null && sqlObjectType.getAnnotation(RegisterMapper.class) == null) { for (int i = 0; i < sqlObjectType.getGenericInterfaces().length; i++) { if (sqlObjectType.getGenericInterfaces()[i] instanceof ParameterizedType) { final ParameterizedType type = (ParameterizedType) sqlObjectType.getGenericInterfaces()[i]; for (int j = 0; j < type.getActualTypeArguments().length; j++) { final Type modelType = type.getActualTypeArguments()[j]; final Class modelClazz = (Class) modelType; if (EventEntryModelDao.class.isAssignableFrom(modelClazz)) { query.registerMapper(new LowerToCamelBeanMapperFactory(modelClazz)); } } } } } } } };
public void apply(final SQLStatement statement) { statement.setStatementLocator(l); if (statement instanceof Query) { final Query query = (Query) statement; // Find the model class associated with this sqlObjectType (which is a SqlDao class) to register its mapper // If a custom mapper is defined via @RegisterMapper, don't register our generic one if (sqlObjectType.getGenericInterfaces() != null && sqlObjectType.getAnnotation(RegisterMapper.class) == null) { for (int i = 0; i < sqlObjectType.getGenericInterfaces().length; i++) { if (sqlObjectType.getGenericInterfaces()[i] instanceof ParameterizedType) { final ParameterizedType type = (ParameterizedType) sqlObjectType.getGenericInterfaces()[i]; for (int j = 0; j < type.getActualTypeArguments().length; j++) { final Type modelType = type.getActualTypeArguments()[j]; if (modelType instanceof Class) { final Class modelClazz = (Class) modelType; if (Entity.class.isAssignableFrom(modelClazz)) { query.registerMapper(new LowerToCamelBeanMapperFactory(modelClazz)); } } } } } } } } };