當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。