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


Java ODocument.getClassName方法代码示例

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


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

示例1: execute

import com.orientechnologies.orient.core.record.impl.ODocument; //导入方法依赖的package包/类
@Override
public Object execute(final Object iThis,
                      final OIdentifiable iCurrentRecord,
                      final Object iCurrentResult,
                      final Object[] iParams,
                      final OCommandContext iContext)
{
  OIdentifiable identifiable = (OIdentifiable) iParams[0];
  ODocument document = identifiable.getRecord();
  String browsedRepositoryName = (String) iParams[1];
  boolean jexlOnly = iParams.length > 2 && (boolean) iParams[2];

  switch (document.getClassName()) {
    case "asset":
      return checkAssetPermissions(document, browsedRepositoryName, jexlOnly);
    case "component":
      return checkComponentAssetPermissions(document, browsedRepositoryName, jexlOnly);
    default:
      return false;
  }
}
 
开发者ID:sonatype,项目名称:nexus-public,代码行数:22,代码来源:ContentAuth.java

示例2: getSyncFields

import com.orientechnologies.orient.core.record.impl.ODocument; //导入方法依赖的package包/类
/**
 * Returns null if the record must be not synchronized, other wise the set of fields to synchronize. An empty set means all the
 * fields.
 */
public Set<String> getSyncFields(final ODocument record) {
  final String className = record.getClassName();
  if (className == null)
    return null;

  if (excludeClasses.contains(className))
    return null;

  final ODatabaseDocumentInternal db = ODatabaseRecordThreadLocal.INSTANCE.get();

  final String clusterName = db.getClusterNameById(record.getIdentity().getClusterId());
  if (excludeClasses.contains(clusterName))
    return null;

  if (!includeClasses.isEmpty()) {
    if (includeClasses.containsKey(className))
      return includeClasses.get(className);
  }

  if (!includeClusters.isEmpty()) {
    if (includeClusters.containsKey(clusterName))
      return includeClusters.get(clusterName);
  }

  // SYNCHRONIZE ALL FIELDS
  return Collections.EMPTY_SET;
}
 
开发者ID:orientechnologies,项目名称:orientdb-elasticsearch,代码行数:32,代码来源:OElasticSearchDatabaseConfiguration.java

示例3: OrientEdge

import com.orientechnologies.orient.core.record.impl.ODocument; //导入方法依赖的package包/类
public OrientEdge(OrientGraph graph, ODocument rawDocument) {
    this(graph, rawDocument, rawDocument.getClassName());
}
 
开发者ID:orientechnologies,项目名称:orientdb-gremlin,代码行数:4,代码来源:OrientEdge.java


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