当前位置: 首页>>代码示例>>Java>>正文


Java Validate.notEmpty方法代码示例

本文整理汇总了Java中org.thymeleaf.util.Validate.notEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java Validate.notEmpty方法的具体用法?Java Validate.notEmpty怎么用?Java Validate.notEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.thymeleaf.util.Validate的用法示例。


在下文中一共展示了Validate.notEmpty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ConnectionCommand

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
public ConnectionCommand(Arguments arguments, String propertyString) {
    this.arguments = arguments;
    Validate.notEmpty(propertyString, "Invalid connection configuration");
    String[] properties = propertyString.split(",");
    Validate.isTrue(properties.length == 4, "Invalid connection configuration");
    driver   = evaluate(properties[0]);
    url      = evaluate(properties[1]);
    username = evaluate(properties[2]);
    password = evaluate(properties[3]);
}
 
开发者ID:jmiguelsamper,项目名称:thymeleaf-extras-sqldialect,代码行数:11,代码来源:ConnectionCommand.java

示例2: QueryCommand

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
public QueryCommand(Arguments arguments, String query) {
    Validate.notEmpty(query, "SQL query was not supplied");
    this.query = query;
    this.jdbcTemplate = (JdbcTemplate) arguments.getContext().getVariables().get(CONNECTION_ATTR_NAME);
    this.params = (Object[]) arguments.getLocalVariable(PARAMS_ATTR_NAME);
    this.metadataExtractor = new QueryMetadataExtractor(jdbcTemplate);
}
 
开发者ID:jmiguelsamper,项目名称:thymeleaf-extras-sqldialect,代码行数:8,代码来源:QueryCommand.java

示例3: addContextExecutionInfo

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
public final void addContextExecutionInfo(final String templateName) {
    Validate.notEmpty(templateName, "Template name cannot be null or empty");
}
 
开发者ID:restlet,项目名称:restlet-framework,代码行数:4,代码来源:TemplateRepresentation.java

示例4: relative

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
@Override
public ITemplateResource relative(String relativeLocation) {
    Validate.notEmpty(relativeLocation, "Relative Path cannot be null or empty");
    final String fullRelativeLocation = computeRelativeLocation(this.path, relativeLocation);
    return new BundleTemplateResource(this.bundle, fullRelativeLocation, this.characterEncoding);
}
 
开发者ID:AdeptJ,项目名称:adeptj-modules,代码行数:7,代码来源:BundleTemplateResource.java

示例5: ParamsCommand

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
public ParamsCommand(Arguments arguments, String parameterString) {
    this.arguments = arguments;
    Validate.notEmpty(parameterString, "Parameters were not supplied");
    this.parameters = parameterString.split(",");
    this.processedParameters = new Object[parameters.length];
}
 
开发者ID:jmiguelsamper,项目名称:thymeleaf-extras-sqldialect,代码行数:7,代码来源:ParamsCommand.java

示例6: UpdateCommand

import org.thymeleaf.util.Validate; //导入方法依赖的package包/类
public UpdateCommand(Arguments arguments, String query) {
    Validate.notEmpty(query, "SQL statement was not supplied");
    this.query = query;
    this.jdbcTemplate = (JdbcTemplate) arguments.getContext().getVariables().get(CONNECTION_ATTR_NAME);
    this.params = (Object[]) arguments.getLocalVariable(PARAMS_ATTR_NAME);
}
 
开发者ID:jmiguelsamper,项目名称:thymeleaf-extras-sqldialect,代码行数:7,代码来源:UpdateCommand.java


注:本文中的org.thymeleaf.util.Validate.notEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。