// Path: src/main/java/org/easycassandra/ClassInformations.java
// public enum ClassInformations {
// 
//     INSTACE;
//     /**
//      * field that contains all class on Cassandra.
//      * Key - qualifield
//      * value - the wrapper of class
//      */
//     private Map<String, ClassInformation> classMap;
// 
//     /**
//      * The integer class is used to enum how default.
//      */
//     public static final Class<?> DEFAULT_ENUM_CLASS = Integer.class;
// 
//     /**
//      * return the wrapper of class.
//      * @param clazz class to find
//      * @return {@link ClassInformation}
//      */
//     public ClassInformation getClass(Class<?> clazz) {
// 
//         if (classMap.get(clazz.getName()) == null) {
//             classMap.put(clazz.getName(), new ClassInformation(clazz));
//         }
//         return classMap.get(clazz.getName());
//     }
// 
//     {
//         classMap = Collections.synchronizedMap(new TreeMap<String, ClassInformation>());
//     }
// }
// 
// Path: src/main/java/org/easycassandra/IndexProblemException.java
// public class IndexProblemException extends EasyCassandraException {
// 
//     /**
//      * Constructor to IndexProblemException.
//      * @param message information to log
//      */
// 	public IndexProblemException(String message) {
// 		super(message);
// 	}
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


import java.util.List;
import org.easycassandra.ClassInformation;
import org.easycassandra.ClassInformations;
import org.easycassandra.FieldInformation;
import org.easycassandra.IndexProblemException;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;
/*
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.easycassandra.persistence.cassandra;




/**
 * Class to execute a index.
 * @author otaviojava
 */
class FindByIndexQuery extends FindByKeyQuery {

	public FindByIndexQuery(String keySpace) {
		super(keySpace);
	}

    public <T, I> List<T> findByIndex(I index, Class<T> bean, Session session,
            ConsistencyLevel consistency) {
// Path: src/main/java/org/easycassandra/ClassInformations.java
// public enum ClassInformations {
// 
//     INSTACE;
//     /**
//      * field that contains all class on Cassandra.
//      * Key - qualifield
//      * value - the wrapper of class
//      */
//     private Map<String, ClassInformation> classMap;
// 
//     /**
//      * The integer class is used to enum how default.
//      */
//     public static final Class<?> DEFAULT_ENUM_CLASS = Integer.class;
// 
//     /**
//      * return the wrapper of class.
//      * @param clazz class to find
//      * @return {@link ClassInformation}
//      */
//     public ClassInformation getClass(Class<?> clazz) {
// 
//         if (classMap.get(clazz.getName()) == null) {
//             classMap.put(clazz.getName(), new ClassInformation(clazz));
//         }
//         return classMap.get(clazz.getName());
//     }
// 
//     {
//         classMap = Collections.synchronizedMap(new TreeMap<String, ClassInformation>());
//     }
// }
// 
// Path: src/main/java/org/easycassandra/IndexProblemException.java
// public class IndexProblemException extends EasyCassandraException {
// 
//     /**
//      * Constructor to IndexProblemException.
//      * @param message information to log
//      */
// 	public IndexProblemException(String message) {
// 		super(message);
// 	}
// 
// 	private static final long serialVersionUID = 1L;
// 
// }


// Path: src/main/java/org/easycassandra/persistence/cassandra/FindByIndexQuery.java
import java.util.List;
import org.easycassandra.ClassInformation;
import org.easycassandra.ClassInformations;
import org.easycassandra.FieldInformation;
import org.easycassandra.IndexProblemException;
import com.datastax.driver.core.ConsistencyLevel;
import com.datastax.driver.core.ResultSet;
import com.datastax.driver.core.Session;

/*
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.easycassandra.persistence.cassandra;




/**
 * Class to execute a index.
 * @author otaviojava
 */
class FindByIndexQuery extends FindByKeyQuery {

	public FindByIndexQuery(String keySpace) {
		super(keySpace);
	}

    public <T, I> List<T> findByIndex(I index, Class<T> bean, Session session,
            ConsistencyLevel consistency) {
        ClassInformation classInformation = ClassInformations.INSTACE.getClass(bean);