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


Java ParseUtil类代码示例

本文整理汇总了Java中org.databene.commons.ParseUtil的典型用法代码示例。如果您正苦于以下问题:Java ParseUtil类的具体用法?Java ParseUtil怎么用?Java ParseUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: parseSequence

import org.databene.commons.ParseUtil; //导入依赖的package包/类
private static DBSequence parseSequence(Element e, DBSchema schema) {
	DBSequence sequence = new DBSequence(e.getAttribute("name"), schema);
	String start = e.getAttribute("start");
	if (!StringUtil.isEmpty(start))
		sequence.setStart(new BigInteger(start));
	String increment = e.getAttribute("increment");
	if (!StringUtil.isEmpty(increment))
		sequence.setIncrement(new BigInteger(increment));
	String maxValue = e.getAttribute("maxValue");
	if (!StringUtil.isEmpty(maxValue))
		sequence.setMaxValue(new BigInteger(maxValue));
	String minValue = e.getAttribute("minValue");
	if (!StringUtil.isEmpty(minValue))
		sequence.setMinValue(new BigInteger(minValue));
	String cycle = e.getAttribute("cycle");
	if (!StringUtil.isEmpty(cycle))
		sequence.setCycle(ParseUtil.parseBoolean(cycle));
	String cache = e.getAttribute("cache");
	if (!StringUtil.isEmpty(cache))
		sequence.setCache(Long.parseLong(cache));
	String order = e.getAttribute("order");
	if (!StringUtil.isEmpty(order))
		sequence.setOrder(ParseUtil.parseBoolean(order));
	return sequence;
}
 
开发者ID:aravindc,项目名称:jdbacl,代码行数:26,代码来源:XMLModelImporter.java

示例2: parseSingleDbProperties

import org.databene.commons.ParseUtil; //导入依赖的package包/类
public static JDBCConnectData parseSingleDbProperties(String filename) throws IOException {
	Map<String, String> properties = IOUtil.readProperties(filename);
	String readOnlyConfig = properties.get("db_readonly");
	boolean readOnly = (!StringUtil.isEmpty(readOnlyConfig) ? ParseUtil.parseBoolean(readOnlyConfig, true) : false);
	
	return new JDBCConnectData(
			properties.get("db_driver"), properties.get("db_url"), 
			properties.get("db_user"), properties.get("db_password"), 
			properties.get("db_catalog"), properties.get("db_schema"), 
			readOnly);
}
 
开发者ID:aravindc,项目名称:jdbacl,代码行数:12,代码来源:JDBCConnectData.java

示例3: assertCustomToStringMethod

import org.databene.commons.ParseUtil; //导入依赖的package包/类
protected void assertCustomToStringMethod(Generator<?> generator) {
    String s = generator.toString();
    String className = generator.getClass().getName();
    if (s.startsWith(className) && s.length() >= className.length() + 2
            && s.charAt(className.length()) == '@'
            && ParseUtil.isHex(s.substring(className.length() + 1)))
        throw new AssertionFailedError("The toString() method of class " + generator.getClass() +
                " is not customized");
}
 
开发者ID:raphaelfeng,项目名称:benerator,代码行数:10,代码来源:GeneratorClassTest.java

示例4: setOverwrite

import org.databene.commons.ParseUtil; //导入依赖的package包/类
/** Verifies and sets the {@link #overwrite} flag.
 *  @param overwrite must be 'true', 'false' or null */
public final void setOverwrite(String overwrite) {
    ParseUtil.parseBoolean(overwrite); // verifies that the flag is true, false or null
    this.overwrite = overwrite;
}
 
开发者ID:AludraTest,项目名称:aludratest,代码行数:7,代码来源:TargetFileData.java

示例5: parseBoolean

import org.databene.commons.ParseUtil; //导入依赖的package包/类
/** Parses a boolean value in a string ("true" or "false").
 * @param text the text to parse
 * @return <code>true</code> or <code>false</code> */
public static boolean parseBoolean(String text) {
    return ParseUtil.parseBoolean(text);
}
 
开发者ID:AludraTest,项目名称:aludratest,代码行数:7,代码来源:DataUtil.java


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