Search in sources :

Example 1 with PluginValueTypeNotFoundException

use of org.dbflute.exception.PluginValueTypeNotFoundException in project dbflute-core by dbflute.

the class TnAbstractPropertyTypeFactory method findValueTypeByName.

protected ValueType findValueTypeByName(String propertyName, Class<?> propertyType, String keyName) {
    final ValueType valueType = TnValueTypes.getPluginValueType(keyName);
    if (valueType != null) {
        return valueType;
    }
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Not found the plug-in value type by the name.");
    br.addItem("Bean Type");
    br.addElement(_beanClass.getName());
    br.addItem("Property");
    br.addElement(propertyName);
    br.addElement(propertyType.getName());
    br.addItem("Key Name");
    br.addElement(keyName);
    final String msg = br.buildExceptionMessage();
    throw new PluginValueTypeNotFoundException(msg);
}
Also used : ValueType(org.dbflute.jdbc.ValueType) ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) PluginValueTypeNotFoundException(org.dbflute.exception.PluginValueTypeNotFoundException)

Example 2 with PluginValueTypeNotFoundException

use of org.dbflute.exception.PluginValueTypeNotFoundException in project dbflute-core by dbflute.

the class TnProcedureValueTypeProvider method findValueTypeByName.

// ===================================================================================
// By Name
// =======
protected ValueType findValueTypeByName(Class<?> pmbType, String paramName, Class<?> paramType, String keyName) {
    final ValueType valueType = TnValueTypes.getPluginValueType(keyName);
    if (valueType != null) {
        return valueType;
    }
    final ExceptionMessageBuilder br = new ExceptionMessageBuilder();
    br.addNotice("Not found a plug-in value type by the name.");
    br.addItem("ProcedurePmb");
    br.addElement(pmbType.getName());
    br.addItem("Parameter");
    br.addElement(paramName);
    br.addElement(paramType.getName());
    br.addItem("Key Name");
    br.addElement(keyName);
    final String msg = br.buildExceptionMessage();
    throw new PluginValueTypeNotFoundException(msg);
}
Also used : ValueType(org.dbflute.jdbc.ValueType) ExceptionMessageBuilder(org.dbflute.helper.message.ExceptionMessageBuilder) PluginValueTypeNotFoundException(org.dbflute.exception.PluginValueTypeNotFoundException)

Aggregations

PluginValueTypeNotFoundException (org.dbflute.exception.PluginValueTypeNotFoundException)2 ExceptionMessageBuilder (org.dbflute.helper.message.ExceptionMessageBuilder)2 ValueType (org.dbflute.jdbc.ValueType)2