public boolean collectStatisticsOnHold() { return Convert.toBoolean(properties.getProperty(PropertyName.CollectStatisticsOnHold.name, "false")); }
public boolean collectStatistics() { return Convert.toBoolean(properties.getProperty(PropertyName.CollectStatistics.name, "false")); }
private void logException(String message, Exception e) { if (LOGGER.isErrorEnabled() && Convert.toBoolean(System.getProperty("activejdbc.log_exception"))) LOGGER.error(message, e); }
/** * Read property as <code>Boolean</code>. * * @param propertyName name of property. * @return property as <code>Boolean</code>. */ public static Boolean pBoolean(String propertyName){ return Convert.toBoolean(p(propertyName)); } }
/** * Sets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute. * @param value value * @return reference to this model. */ public <T extends Model> T setBoolean(String attributeName, Object value) { Converter<Object, Boolean> converter = modelRegistryLocal.converterForValue(attributeName, value, Boolean.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toBoolean(value)); }
/** * Gets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the attribute value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute to convert * @return value converted to <code>Boolean</code> */ public Boolean getBoolean(String attributeName) { Object value = getRaw(attributeName); Converter<Object, Boolean> converter = modelRegistryLocal.converterForValue(attributeName, value, Boolean.class); return converter != null ? converter.convert(value) : Convert.toBoolean(value); }
public boolean collectStatisticsOnHold() { return Convert.toBoolean(properties.getProperty(PropertyName.CollectStatisticsOnHold.name, "false")); }
public boolean collectStatisticsOnHold() { return Convert.toBoolean(properties.getProperty("collectStatisticsOnHold", "false")); }
public boolean collectStatistics() { return Convert.toBoolean(properties.getProperty(PropertyName.CollectStatistics.name, "false")); }
private void logException(String message, Exception e) { if (LOGGER.isErrorEnabled() && Convert.toBoolean(System.getProperty("activejdbc.log_exception"))) LOGGER.error(message, e); }
private void logException(String message, Exception e) { if (logger.isErrorEnabled() && Convert.toBoolean(System.getProperty("activejdbc.log_exception"))) logger.error(message, e); }
/** * boolean value assigned by controller. * * @param name name of a value assigned by controller. * @return a single value assigned by controller. */ protected boolean valBoolean(String name){ assert name != null; return Convert.toBoolean(val(name)); }
@Override public void process(Map values, Writer writer) { boolean processBody = false; if(singleArgument){ Object singleArg = values.get(argumentLine); processBody = Convert.toBoolean(singleArg); } if(processBody){ bodyTemplate.process(values, writer); } }
/** * Convenience method, returns object from session, equivalent of: * <pre> * <code> * Boolean val = (Boolean)session().get(name) * </code> * </pre> * * @param name name of object * @return value */ protected Boolean sessionBoolean(String name){ return Convert.toBoolean(session(name)); }
/** * Convenience method, returns object from session, equivalent of: * <pre> * <code> * Boolean val = (Boolean)session().get(name) * </code> * </pre> * * @param name name of object * @return value */ protected Boolean sessionBoolean(String name){ return Convert.toBoolean(session().get(name)); }
/** * Sets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute. * @param value value * @return reference to this model. */ public <T extends Model> T setBoolean(String attributeName, Object value) { Converter<Object, Boolean> converter = modelRegistryLocal().converterForValue(attributeName, value, Boolean.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toBoolean(value)); }
/** * Sets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute. * @param value value * @return reference to this model. */ public <T extends Model> T setBoolean(String attributeName, Object value) { Converter<Object, Boolean> converter = modelRegistryLocal().converterForValue(attributeName, value, Boolean.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toBoolean(value)); }
/** * Gets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the attribute value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute to convert * @return value converted to <code>Boolean</code> */ public Boolean getBoolean(String attributeName) { Object value = getRaw(attributeName); Converter<Object, Boolean> converter = modelRegistryLocal().converterForValue(attributeName, value, Boolean.class); return converter != null ? converter.convert(value) : Convert.toBoolean(value); }
/** * Gets attribute value as <code>Boolean</code>. * If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class * <code>java.lang.Boolean</code>, given the attribute value is an instance of <code>S</code>, then it will be used, * otherwise performs a conversion using {@link Convert#toBoolean(Object)}. * * @param attributeName name of attribute to convert * @return value converted to <code>Boolean</code> */ public Boolean getBoolean(String attributeName) { Object value = getRaw(attributeName); Converter<Object, Boolean> converter = modelRegistryLocal().converterForValue(attributeName, value, Boolean.class); return converter != null ? converter.convert(value) : Convert.toBoolean(value); }