Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.skife.jdbi.v2.sqlobject.customizers;
 
 
public @interface RegisterContainerMapper
    Class<? extends ContainerFactory>[] value();
    public static class Factory implements SqlStatementCustomizerFactory
    {
        public SqlStatementCustomizer createForMethod(Annotation annotationClass sqlObjectTypeMethod method)
        {
            return new MyCustomizer((RegisterContainerMapperannotation);
        }
        public SqlStatementCustomizer createForType(Annotation annotationClass sqlObjectType)
        {
            return new MyCustomizer((RegisterContainerMapperannotation);
        }
        public SqlStatementCustomizer createForParameter(Annotation annotationClass sqlObjectTypeMethod methodObject arg)
        {
            throw new UnsupportedOperationException("Not Yet Implemented!");
        }
    }
    static class MyCustomizer implements SqlStatementCustomizer
    {
        private final List<ContainerFactoryfactory;
        MyCustomizer(RegisterContainerMapper annotation)
        {
            List<ContainerFactoryls = new ArrayList<ContainerFactory>();
            try {
                for (Class<? extends ContainerFactorytype : annotation.value()) {
                    ls.add(type.newInstance());
                }
            }
            catch (Exception e) {
                throw new IllegalStateException("Unable to instantiate container factory"e);
            }
            this. = ls;
        }
        public void apply(SQLStatement qthrows SQLException
        {
            if (q instanceof Query) {
                Query query = (Queryq;
                for (ContainerFactory containerFactory : ) {
                    query.registerContainerFactory(containerFactory);
                }
            }
        }
    }
New to GrepCode? Check out our FAQ X