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


Java EdmProperty.getConcurrencyMode方法代码示例

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


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

示例1: reportProperties

import org.odata4j.edm.EdmProperty; //导入方法依赖的package包/类
private static void reportProperties(Iterable<EdmProperty> properties) {
  for (EdmProperty property : properties) {
    String p = String.format("Property Name=%s Type=%s Nullable=%s", property.getName(), property.getType(), property.isNullable());
    if (property.getMaxLength() != null)
      p = p + " MaxLength=" + property.getMaxLength();
    if (property.getUnicode() != null)
      p = p + " Unicode=" + property.getUnicode();
    if (property.getFixedLength() != null)
      p = p + " FixedLength=" + property.getFixedLength();

    if (property.getStoreGeneratedPattern() != null)
      p = p + " StoreGeneratedPattern=" + property.getStoreGeneratedPattern();
    if (property.getConcurrencyMode() != null)
      p = p + " ConcurrencyMode=" + property.getConcurrencyMode();

    if (property.getFcTargetPath() != null)
      p = p + " TargetPath=" + property.getFcTargetPath();
    if (property.getFcContentKind() != null)
      p = p + " ContentKind=" + property.getFcContentKind();
    if (property.getFcKeepInContent() != null)
      p = p + " KeepInContent=" + property.getFcKeepInContent();
    if (property.getFcContentKind() != null)
      p = p + " EpmContentKind=" + property.getFcContentKind();
    if (property.getFcEpmKeepInContent() != null)
      p = p + " EpmKeepInContent=" + property.getFcEpmKeepInContent();
    report("    " + p);
  }
}
 
开发者ID:teiid,项目名称:oreva,代码行数:29,代码来源:AbstractExample.java

示例2: writeProperties

import org.odata4j.edm.EdmProperty; //导入方法依赖的package包/类
private static void writeProperties(Iterable<EdmProperty> properties, XMLWriter2 writer) {
  for (EdmProperty prop : properties) {
    writer.startElement(new QName2("Property"));

    writer.writeAttribute("Name", prop.getName());
    writer.writeAttribute("Type", prop.getType().getFullyQualifiedTypeName());
    writer.writeAttribute("Nullable", Boolean.toString(prop.isNullable()));
    if (prop.getDefaultValue() != null) {
      writer.writeAttribute("DefaultValue", prop.getDefaultValue());
    }
    if (prop.getMaxLength() != null) {
      writer.writeAttribute("MaxLength", Integer.toString(prop.getMaxLength()));
    }
    if (prop.getFixedLength() != null) {
      writer.writeAttribute("FixedLength", Boolean.toString(prop.getFixedLength()));
    }
    if (!prop.getCollectionKind().equals(CollectionKind.NONE)) {
      writer.writeAttribute("CollectionKind", prop.getCollectionKind().toString());
    }

    if (prop.getPrecision() != null) {
      writer.writeAttribute("Precision", Integer.toString(prop.getPrecision()));
    }
    if (prop.getScale() != null) {
      writer.writeAttribute("Scale", Integer.toString(prop.getScale()));
    }
    if (prop.getCollation() != null) {
      writer.writeAttribute("Collation", prop.getCollation());
    }
    if (prop.getUnicode() != null) {
      writer.writeAttribute("Unicode", Boolean.toString(prop.getUnicode()));
    }
    if (prop.getConcurrencyMode() != null) {
      writer.writeAttribute("ConcurrencyMode", prop.getConcurrencyMode());
    }
    if (prop.getMimeType() != null) {
      writer.writeAttribute(new QName2(m, "MimeType", "m"), prop.getMimeType());
    }
    if (prop.getFcTargetPath() != null) {
      writer.writeAttribute(new QName2(m, "FC_TargetPath", "m"), prop.getFcTargetPath());
    }
    if (prop.getFcKeepInContent() != null) {
      writer.writeAttribute(new QName2(m, "FC_KeepInContent", "m"), prop.getFcKeepInContent());
    }
    if (prop.getFcNsPrefix() != null) {
      writer.writeAttribute(new QName2(m, "FC_NsPrefix", "m"), prop.getFcNsPrefix());
    }
    if (prop.getFcNsUri() != null) {
      writer.writeAttribute(new QName2(m, "FC_NsUri", "m"), prop.getFcNsUri());
    }

    writeAnnotationAttributes(prop, writer);
    writeAnnotationElements(prop, writer);
    writer.endElement("Property");
  }
}
 
开发者ID:teiid,项目名称:oreva,代码行数:57,代码来源:EdmxFormatWriter.java


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