// Path: src/main/java/org/yy/mongodb/exception/MongoORMException.java
// public class MongoORMException extends RuntimeException {
// 
//   private static final long serialVersionUID = 3988706952509457604L;
// 
//   private static final Logger logger = LoggerFactory.getLogger(MongoORMException.class);
// 
//   private String message;
// 
//   public MongoORMException(String message) {
//     super(message);
//     this.message = message;
//     logger.error("Mongodb orm error. Cause:" + message);
//   }
// 
//   public MongoORMException(String message, Throwable e) {
//     super(message, e);
//     this.message = message;
//     logger.error("Mongodb orm error. Cause:" + message, e);
//   }
// 
//   @Override
//   public String getLocalizedMessage() {
//     return message;
//   }
// 
// }


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.yy.mongodb.exception.MongoORMException;

    if (value instanceof Number) {
      return new Date(((Number) value).longValue());
    }

    if (value instanceof Date) {
      return (Date) value;
    }

    try {
      return new SimpleDateFormat(DATE_FROMAT).parse(value.toString());
    } catch (ParseException pex) {
      logger.error("Resovle column value type has exception. Cause:", pex);
      throw new MongoORMException("Resovle column value type has exception. Cause:", pex);
    }
  }

  @Override
  public Date resovleColumn(Object value) {
    if (value instanceof Number) {
      return new Date(((Number) value).longValue());
    }

    if (value instanceof Date) {
      return (Date) value;
    }

    try {
      return new SimpleDateFormat(DATE_FROMAT).parse(value.toString());
    } catch (ParseException pex) {
      logger.error("Resovle column value type has exception. Cause:", pex);

// Path: src/main/java/org/yy/mongodb/exception/MongoORMException.java
// public class MongoORMException extends RuntimeException {
// 
//   private static final long serialVersionUID = 3988706952509457604L;
// 
//   private static final Logger logger = LoggerFactory.getLogger(MongoORMException.class);
// 
//   private String message;
// 
//   public MongoORMException(String message) {
//     super(message);
//     this.message = message;
//     logger.error("Mongodb orm error. Cause:" + message);
//   }
// 
//   public MongoORMException(String message, Throwable e) {
//     super(message, e);
//     this.message = message;
//     logger.error("Mongodb orm error. Cause:" + message, e);
//   }
// 
//   @Override
//   public String getLocalizedMessage() {
//     return message;
//   }
// 
// }


// Path: src/main/java/org/yy/mongodb/orm/engine/type/DateTypeHandler.java
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.yy.mongodb.exception.MongoORMException;

    if (value instanceof Number) {
      return new Date(((Number) value).longValue());
    }

    if (value instanceof Date) {
      return (Date) value;
    }

    try {
      return new SimpleDateFormat(DATE_FROMAT).parse(value.toString());
    } catch (ParseException pex) {
      logger.error("Resovle column value type has exception. Cause:", pex);
      throw new MongoORMException("Resovle column value type has exception. Cause:", pex);
    }
  }

  @Override
  public Date resovleColumn(Object value) {
    if (value instanceof Number) {
      return new Date(((Number) value).longValue());
    }

    if (value instanceof Date) {
      return (Date) value;
    }

    try {
      return new SimpleDateFormat(DATE_FROMAT).parse(value.toString());
    } catch (ParseException pex) {
      logger.error("Resovle column value type has exception. Cause:", pex);

      throw new MongoORMException("Resovle column value type has exception. Cause:", pex);
