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


Java OrderedMap类代码示例

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


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

示例1: generateTable

import org.databene.commons.OrderedMap; //导入依赖的package包/类
private void generateTable(InstanceDescriptor descriptor, LFNormalizingStringBuilder writer) {
    ComplexTypeDescriptor type = (ComplexTypeDescriptor) descriptor.getTypeDescriptor();
    Map<String, String> attributes = new OrderedMap<String, String>();
    for (FeatureDetail<? extends Object> detail : descriptor.getDetails()) {
        Object value = detail.getValue();
        if (value != null && !isDefaultValue(value, detail.getName())) {
        	if (value instanceof Expression)
        		value = ((Expression<?>) value).evaluate(null);
            attributes.put(detail.getName(), toStringConverter.convert(value));
        }
    }
    attributes.put(ATT_CONSUMER, "db");
    appendStartTag(EL_GENERATE, attributes, writer, false);
    writer.append('\n');
    
    for (ComponentDescriptor cd : type.getComponents())
        addAttribute(cd, writer);
    writer.append(TAB);
    appendEndElement(EL_GENERATE, writer);
    writer.append("\n\n").append(TAB);
}
 
开发者ID:raphaelfeng,项目名称:benerator,代码行数:22,代码来源:ProjectBuilder.java

示例2: saveState

import org.databene.commons.OrderedMap; //导入依赖的package包/类
private void saveState() {
	try {
		FileUtil.ensureDirectoryExists(new File(DATABENE_DIRECTORY_NAME));
		Map<String, String> props = new OrderedMap<String, String>();
		props.put("exclusionPattern", exclusionField.getText());
		IOUtil.writeProperties(props, GUI_PROPERTIES_FILE_NAME);
	} catch (IOException e) {
		// writing the file failed but isn't tragic
	}
}
 
开发者ID:aravindc,项目名称:jdbacl,代码行数:11,代码来源:JdbaclGUI.java

示例3: getFeatures

import org.databene.commons.OrderedMap; //导入依赖的package包/类
/** Provides a {@link Map} of all properties and public attributes of a class assigned to their Java type.
 * @param type the Java class to examine
 * @return a {@link Map} of all properties and public attributes of a class assigned to their Java type */
public static Map<String, Class<?>> getFeatures(Class<?> type) {
    Map<String, Class<?>> features = new OrderedMap<String, Class<?>>();
    for (Field field : type.getDeclaredFields()) {
        if (WizardUtil.isPublic(field) || BeanUtil.hasProperty(type, field.getName())) {
            features.put(field.getName(), field.getType());
        }
    }
    return features;
}
 
开发者ID:AludraTest,项目名称:aludratest,代码行数:13,代码来源:WizardUtil.java

示例4: getOrCreateIdMapForType

import org.databene.commons.OrderedMap; //导入依赖的package包/类
private Map<Object, Entity> getOrCreateIdMapForType(String entityType) {
	Map<Object, Entity> idMap = typeMap.get(entityType);
	if (idMap == null) {
		idMap = new OrderedMap<Object, Entity>();
		typeMap.put(entityType, idMap);
	}
	return idMap;
}
 
开发者ID:raphaelfeng,项目名称:benerator,代码行数:9,代码来源:MemStore.java

示例5: ConnectionHolder

import org.databene.commons.OrderedMap; //导入依赖的package包/类
public ConnectionHolder(DBSystem db) {
	this.insertStatements = new OrderedMap<ComplexTypeDescriptor, PreparedStatement>();
	this.updateStatements = new OrderedMap<ComplexTypeDescriptor, PreparedStatement>();
	this.selectByPKStatements = new OrderedMap<ComplexTypeDescriptor, PreparedStatement>();
    this.db = db;
    this.connection = null; // lazily initialized
}
 
开发者ID:raphaelfeng,项目名称:benerator,代码行数:8,代码来源:ConnectionHolder.java

示例6: State

import org.databene.commons.OrderedMap; //导入依赖的package包/类
public State(String id) {
    this.id = id;
    this.cities = new OrderedMap<CityId, City>();
}
 
开发者ID:raphaelfeng,项目名称:benerator,代码行数:5,代码来源:State.java


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