Examples of OType


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

      OCollate collate) {
    final String fieldName = adjustFieldName(oClass, extractFieldName(field));
    final OIndexDefinition indexDefinition;

    final OProperty propertyToIndex = oClass.getProperty(fieldName);
    final OType indexType;
    if (type == OType.EMBEDDEDMAP || type == OType.LINKMAP) {
      final OPropertyMapIndexDefinition.INDEX_BY indexBy = extractMapIndexSpecifier(field);

      if (indexBy.equals(OPropertyMapIndexDefinition.INDEX_BY.KEY))
        indexType = OType.STRING;
View Full Code Here

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

     if ("add".equals(operation)) {
       iRequest.data.commandInfo = "Studio add property";

       try {
         OType type = OType.valueOf(fields.get("type"));

         OPropertyImpl prop;
         if (type == OType.LINK || type == OType.LINKLIST || type == OType.LINKSET || type == OType.LINKMAP)
           prop = (OPropertyImpl) cls.createProperty(fields.get("name"), type,
               db.getMetadata().getSchema().getClass(fields.get("linkedClass")));
View Full Code Here

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

      try {
        return OType.convert(iThis, Class.forName(destType));
      } catch (ClassNotFoundException e) {
      }
    } else {
      final OType orientType = OType.valueOf(destType.toUpperCase());
      if (orientType != null) {
        return OType.convert(iThis, orientType.getDefaultJavaType());
      }
    }

    return null;
  }
View Full Code Here

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

  @Override
  public Object execute(Object iThis, OIdentifiable iCurrentRecord, OCommandContext iContext, Object ioResult, Object[] iParams) {
    if (ioResult == null) {
      return null;
    }
    final OType t = OType.getTypeByValue(ioResult);

    if (t != null) {
      return t.toString();
    }

    return null;
  }
View Full Code Here

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

      next = jsonReader.readString(OJSONReader.COMMA_SEPARATOR);
      next = jsonReader.readNext(OJSONReader.FIELD_ASSIGNMENT).getValue();
    }
    next = jsonReader.checkContent("\"type\"").readString(OJSONReader.NEXT_IN_OBJECT);

    final OType type = OType.valueOf(next);

    String attrib;
    String value = null;

    String min = null;
    String max = null;
    String linkedClass = null;
    OType linkedType = null;
    boolean mandatory = false;
    boolean readonly = false;
    boolean notNull = false;
    String collate = null;
View Full Code Here

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

        final String propertyName = indexName.substring(pos + 1);

        final String keyTypeStr = config.field(OIndexInternal.CONFIG_KEYTYPE);
        if (keyTypeStr == null)
          throw new OIndexException("Can not convert from old index model to new one. " + "Index key type is absent.");
        final OType keyType = OType.valueOf(keyTypeStr.toUpperCase(Locale.ENGLISH));
        loadedIndexDefinition = new OPropertyIndexDefinition(className, propertyName, keyType);

        config.removeField(OIndexInternal.CONFIG_AUTOMATIC);
        config.removeField(OIndexInternal.CONFIG_KEYTYPE);
      } else if (config.field(OIndexInternal.CONFIG_KEYTYPE) != null) {
        final String keyTypeStr = config.field(OIndexInternal.CONFIG_KEYTYPE);
        final OType keyType = OType.valueOf(keyTypeStr.toUpperCase(Locale.ENGLISH));

        loadedIndexDefinition = new OSimpleKeyIndexDefinition(keyType);

        config.removeField(OIndexInternal.CONFIG_KEYTYPE);
      }
View Full Code Here

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

  protected void checkForKeyType(final Object iKey) {
    if (indexDefinition == null) {
      // RECOGNIZE THE KEY TYPE AT RUN-TIME

      final OType type = OType.getTypeByClass(iKey.getClass());
      if (type == null)
        return;

      indexDefinition = new OSimpleKeyIndexDefinition(type);
      updateConfiguration();
View Full Code Here

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

      throw new OCommandExecutionException("Property '" + className + "." + fieldName
          + "' already exists. Remove it before to retry.");

    // CREATE THE PROPERTY
    OClass linkedClass = null;
    OType linkedType = null;
    if (linked != null) {
      // FIRST SEARCH BETWEEN CLASSES
      linkedClass = database.getMetadata().getSchema().getClass(linked);

      if (linkedClass == null)
View Full Code Here

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

    final List<String> fields = OStringSerializerHelper.smartSplit(iContent, OStringSerializerHelper.RECORD_SEPARATOR, true, true);

    String fieldName = null;
    String fieldValue;
    OType type;
    OClass linkedClass;
    OType linkedType;
    OProperty prop;

    final Set<String> fieldSet;

    if (iFields != null && iFields.length > 0) {
View Full Code Here

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

      iOutput.append(record.getSchemaClass().getStreamableName());
      iOutput.append(OStringSerializerHelper.CLASS_SEPARATOR);
    }

    OProperty prop;
    OType type;
    OClass linkedClass;
    OType linkedType;
    String fieldClassName;
    int i = 0;

    final String[] fieldNames = iOnlyDelta && record.isTrackingChanges() ? record.getDirtyFields() : record.fieldNames();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.