public Long getAsLong(String columnName) {
   Object o = getObject(columnName);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toLongValue();
 }
 public Integer getAsInteger(int i) {
   Object o = getObject(i);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toIntValue();
 }
 public Long getAsLong(int i) {
   Object o = getObject(i);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toLongValue();
 }
 public Double getAsDouble(String columnName) {
   Object o = getObject(columnName);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toDoubleValue();
 }
 public Double getAsDouble(int i) {
   Object o = getObject(i);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toDoubleValue();
 }
 public Float getAsFloat(String columnName) {
   Object o = getObject(columnName);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toFloatValue();
 }
 public Float getAsFloat(int i) {
   Object o = getObject(i);
   if (o == null) {
     return null;
   }
   return BlurObject.bind(o).toFloatValue();
 }
 public <T> T toObject(T valueObject) throws Exception {
   ClassUtils.BeanWrapper<?> _wrapper = ClassUtils.wrapper(valueObject);
   for (String _fieldName : _wrapper.getFieldNames()) {
     String _columnName = EntityMeta.fieldNameToPropertyName(_fieldName, 0);
     Object _value = this.getObject(_columnName);
     if (_value == null) {
       continue;
     }
     _wrapper.setValue(
         _fieldName, BlurObject.bind(_value).toObjectValue(_wrapper.getFieldType(_fieldName)));
   }
   return valueObject;
 }
  public DefaultModuleCfg(YMP owner) throws Exception {
    Map<String, String> _moduleCfgs = owner.getConfig().getModuleConfigs(ICaches.MODULE_NAME);
    //
    String _providerClassStr =
        StringUtils.defaultIfBlank(_moduleCfgs.get("provider_class"), "default");
    __cacheProvider =
        ClassUtils.impl(
            StringUtils.defaultIfBlank(Caches.PROVIDERS.get(_providerClassStr), _providerClassStr),
            ICacheProvider.class,
            this.getClass());
    if (__cacheProvider == null) {
      __cacheProvider = new DefaultCacheProvider();
    }
    //
    __cacheEventListener =
        ClassUtils.impl(
            _moduleCfgs.get("event_listener_class"), ICacheEventListener.class, this.getClass());
    //
    __cacheScopeProcessor =
        ClassUtils.impl(
            _moduleCfgs.get("scope_processor_class"), ICacheScopeProcessor.class, this.getClass());
    //
    __serializer =
        ClassUtils.impl(_moduleCfgs.get("serializer_class"), ISerializer.class, this.getClass());
    if (__serializer == null) {
      __serializer = new DefaultSerializer();
    }
    //
    __keyGenerator =
        ClassUtils.impl(
            _moduleCfgs.get("key_generator_class"), IKeyGenerator.class, this.getClass());
    if (__keyGenerator == null) {
      __keyGenerator = new DefaultKeyGenerator();
    }
    __keyGenerator.init(__serializer);
    //
    __defaultCacheName =
        StringUtils.defaultIfBlank(_moduleCfgs.get("default_cache_name"), "default");

    __defaultCacheTimeout =
        BlurObject.bind(StringUtils.defaultIfBlank(_moduleCfgs.get("default_cache_timeout"), "0"))
            .toIntValue();
    if (__defaultCacheTimeout <= 0) {
      __defaultCacheTimeout = 300;
    }
  }