本文整理汇总了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]);
}
示例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);
}
示例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");
}
示例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);
}
示例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];
}
示例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);
}