Package com.orientechnologies.orient.core.metadata.schema

Examples of com.orientechnologies.orient.core.metadata.schema.OType


          return;

        final Object res;
        if (index.getDefinition().getParamCount() == 1) {
          // CONVERT BEFORE SEARCH IF NEEDED
          final OType type = index.getDefinition().getTypes()[0];
          keyValue = OType.convert(keyValue, type.getDefaultJavaType());

          res = index.get(keyValue);
        } else {
          final Object secondKey = getIndexKey(index.getDefinition(), right, context);
          if (keyValue instanceof OCompositeKey && secondKey instanceof OCompositeKey
View Full Code Here


     final OClass cls = db.getMetadata().getSchema().getClass(urlParts[2]);

     final String propertyName = urlParts[3];

     final OType propertyType = urlParts.length > 4 ? OType.valueOf(urlParts[4]) : OType.STRING;

     switch (propertyType) {
     case LINKLIST:
     case LINKMAP:
     case LINKSET: {
       if (urlParts.length < 6) {
         throw new OHttpRequestException("Syntax error: property named " + propertyName + " is declared as " + propertyType
             + " but linked type is not declared: property/<database>/<class-name>/<property-name>/<property-type>/<link-type>");
       }
       final OType linkType = OType.valueOf(urlParts[5]);
       final OClass linkClass = db.getMetadata().getSchema().getClass(urlParts[5]);
       if (linkType != null && linkClass != null) {
         throw new IllegalArgumentException(
             "linked type declared as "
                 + urlParts[5]
View Full Code Here

     final ODocument propertiesDoc = new ODocument().fromJSON(iRequest.content);

     for (String propertyName : propertiesDoc.fieldNames()) {
       final Map<String, String> doc = (Map<String, String>) propertiesDoc.field(propertyName);
       final OType propertyType = OType.valueOf(doc.get(PROPERTY_TYPE_JSON_FIELD));
       switch (propertyType) {
       case LINKLIST:
       case LINKMAP:
       case LINKSET: {
         final String linkType = doc.get(LINKED_TYPE_JSON_FIELD);
View Full Code Here

    executeOutsideTx(new OCallable<OClass, OrientBaseGraph>() {
      @Override
      public OClass call(final OrientBaseGraph g) {

        String indexType = OClass.INDEX_TYPE.NOTUNIQUE.name();
        OType keyType = OType.STRING;
        String className = null;
        ODocument metadata = null;

        final String ancestorClassName = getClassName(elementClass);
View Full Code Here

    final OClass linkClass = iFromVertex.getSchemaClass();
    if (linkClass == null)
      throw new IllegalArgumentException("Class ot found in source vertex: " + iFromVertex);

    final OProperty prop = linkClass.getProperty(iFieldName);
    final OType propType = prop != null && prop.getType() != OType.ANY ? prop.getType() : null;

    if (found == null) {
      if (iGraph.isAutoScaleEdgeType()
          && (prop == null || propType == OType.LINK || "true".equalsIgnoreCase(prop.getCustom("ordered")))) {
        // CREATE ONLY ONE LINK
View Full Code Here

            db.getMetadata().getSchema().createClass(iPojo.getClass());
            iRecord.setClassNameIfExists(iPojo.getClass().getSimpleName());
          }

          if (schemaProperty == null) {
            OType t = OType.getTypeByClass(fieldValue.getClass());
            if (t == null)
              t = OType.EMBEDDED;
            schemaProperty = iRecord.getSchemaClass().createProperty(fieldName, t);
          }
        }
View Full Code Here

          iType = OType.LINKMAP;
      }
    }

    Object result = iMultiValue;
    final OType linkedType;

    // CREATE THE RETURN MULTI VALUE OBJECT BASED ON DISCOVERED TYPE
    if (iType.equals(OType.EMBEDDEDSET) || iType.equals(OType.LINKSET)) {
      if (iRecord != null && iType.equals(OType.EMBEDDEDSET))
        result = new OTrackedSet<Object>(iRecord);
View Full Code Here

    executeOutsideTx(new OCallable<OClass, OrientBaseGraph>() {
      @Override
      public OClass call(final OrientBaseGraph g) {

        String indexType = OClass.INDEX_TYPE.NOTUNIQUE.name();
        OType keyType = OType.STRING;
        String className = null;

        final String ancestorClassName = getClassName(elementClass);

        // READ PARAMETERS
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.metadata.schema.OType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.