// 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/FieldType.java
// public enum FieldType {
//  ENUM, LIST, SET, MAP, COLLECTION, CUSTOM, DEFAULT, EMPTY;
// 
//  /**
//   * find you the kind of annotation on field and then define a enum type, follow the sequences:
//   * <ul>
//   *   <li>Enum</li>
//   *   <li>List</li>
//   *   <li>Set</li>
//   *   <li>Map</li>
//   *   <li>Collection</li>
//   *   <li>Custom</li>
//   *   <li>Default - if there is not a annotation</li>
//   *   </ul>.
//   * @param field - the field with annotation
//   * @return the type
//   */
//     public static FieldType getTypeByField(Field field) {
// 
//         if (ColumnUtil.INTANCE.isEnumField(field)) {
//             return ENUM;
//         }
//         if (ColumnUtil.INTANCE.isList(field)) {
//             return LIST;
//         }
//         if (ColumnUtil.INTANCE.isSet(field)) {
//             return SET;
//         }
//         if (ColumnUtil.INTANCE.isMap(field)) {
//             return MAP;
//         }
//         if (ColumnUtil.INTANCE.isElementCollection(field)) {
//             return COLLECTION;
//         }
//         if (ColumnUtil.INTANCE.isCustom(field)) {
//             return CUSTOM;
//         }
//         return DEFAULT;
//     }
// 
//     private static final String LIST_QUALIFIELD = "java.util.List";
//     private static final String SET_QUALIFIELD = "java.util.Set";
//     private static final String MAP_QUALIFIELD = "java.util.Map";
// 
//     /**
//      * find out the kind of enum on type of Collection.
//      * @param field - the field with annotation
//      * @return the enum type
//      */
//     public static FieldType findCollectionbyQualifield(Field field) {
// 
//         switch (field.getType().getName()) {
//             case LIST_QUALIFIELD:
//                 return LIST;
//             case SET_QUALIFIELD:
//                 return SET;
//             case MAP_QUALIFIELD:
//                 return MAP;
//             default:
//                 return DEFAULT;
//         }
//     }
// 
// }


import java.nio.ByteBuffer;
import java.util.EnumMap;
import java.util.Map;
import org.easycassandra.ClassInformations;
import org.easycassandra.FieldInformation;
import org.easycassandra.FieldType;
/*
 * Copyright 2013 Otávio Gonçalves de Santana (otaviojava)
 * 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;



/**
 * create a column to cassandra checking the annotation.
 * @author otaviojava
 */
enum AddColumnUtil {
    INSTANCE;
// 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/FieldType.java
// public enum FieldType {
//  ENUM, LIST, SET, MAP, COLLECTION, CUSTOM, DEFAULT, EMPTY;
// 
//  /**
//   * find you the kind of annotation on field and then define a enum type, follow the sequences:
//   * <ul>
//   *   <li>Enum</li>
//   *   <li>List</li>
//   *   <li>Set</li>
//   *   <li>Map</li>
//   *   <li>Collection</li>
//   *   <li>Custom</li>
//   *   <li>Default - if there is not a annotation</li>
//   *   </ul>.
//   * @param field - the field with annotation
//   * @return the type
//   */
//     public static FieldType getTypeByField(Field field) {
// 
//         if (ColumnUtil.INTANCE.isEnumField(field)) {
//             return ENUM;
//         }
//         if (ColumnUtil.INTANCE.isList(field)) {
//             return LIST;
//         }
//         if (ColumnUtil.INTANCE.isSet(field)) {
//             return SET;
//         }
//         if (ColumnUtil.INTANCE.isMap(field)) {
//             return MAP;
//         }
//         if (ColumnUtil.INTANCE.isElementCollection(field)) {
//             return COLLECTION;
//         }
//         if (ColumnUtil.INTANCE.isCustom(field)) {
//             return CUSTOM;
//         }
//         return DEFAULT;
//     }
// 
//     private static final String LIST_QUALIFIELD = "java.util.List";
//     private static final String SET_QUALIFIELD = "java.util.Set";
//     private static final String MAP_QUALIFIELD = "java.util.Map";
// 
//     /**
//      * find out the kind of enum on type of Collection.
//      * @param field - the field with annotation
//      * @return the enum type
//      */
//     public static FieldType findCollectionbyQualifield(Field field) {
// 
//         switch (field.getType().getName()) {
//             case LIST_QUALIFIELD:
//                 return LIST;
//             case SET_QUALIFIELD:
//                 return SET;
//             case MAP_QUALIFIELD:
//                 return MAP;
//             default:
//                 return DEFAULT;
//         }
//     }
// 
// }


// Path: src/main/java/org/easycassandra/persistence/cassandra/AddColumnUtil.java
import java.nio.ByteBuffer;
import java.util.EnumMap;
import java.util.Map;
import org.easycassandra.ClassInformations;
import org.easycassandra.FieldInformation;
import org.easycassandra.FieldType;

/*
 * Copyright 2013 Otávio Gonçalves de Santana (otaviojava)
 * 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;



/**
 * create a column to cassandra checking the annotation.
 * @author otaviojava
 */
enum AddColumnUtil {
    INSTANCE;
    private Map<FieldType, AddColumn> addColumnMap;