本文整理汇总了Java中com.orientechnologies.orient.core.metadata.schema.OClass.getName方法的典型用法代码示例。如果您正苦于以下问题:Java OClass.getName方法的具体用法?Java OClass.getName怎么用?Java OClass.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.orientechnologies.orient.core.metadata.schema.OClass
的用法示例。
在下文中一共展示了OClass.getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupDocumentClass
import com.orientechnologies.orient.core.metadata.schema.OClass; //导入方法依赖的package包/类
protected static void setupDocumentClass(OClass oClass) {
// Oversize leaves some extra space in the record, to reduce the
// frequency in which we need to defragment. Orient sets the oversize
// of class V at 2 by default, so we do the same.
oClass.setOverSize(2);
// TODO: should use constants from .graph, or there should be a way for
// graph to tell the DB certain things so it can optimize for them.
switch (oClass.getName()) {
case "V_eclass":
oClass.setOverSize(4);
oClass.createProperty(PREFIX_INCOMING + "ofType", OType.LINKBAG);
oClass.createProperty(PREFIX_INCOMING + "ofKind", OType.LINKBAG);
break;
case "V_eobject":
oClass.createProperty(PREFIX_OUTGOING + "file", OType.LINKBAG);
oClass.createProperty(PREFIX_OUTGOING + "ofType", OType.LINKLIST);
oClass.createProperty(PREFIX_OUTGOING + "ofKind", OType.LINKLIST);
break;
case "V_file":
oClass.createProperty(PREFIX_INCOMING + "file", OType.LINKBAG);
break;
}
System.out.println("set up properties for " + oClass.getName() + ": "+ oClass.declaredProperties());
}