Package com.foundationdb.server.store.format.protobuf.CustomOptions

Examples of com.foundationdb.server.store.format.protobuf.CustomOptions.TableOptions


            for (FileDescriptorProto file : priorSet.getFileList()) {
                DescriptorProto firstMessage = file.getMessageType(0);
                MessageOptions options = firstMessage.getOptions();
                if ((options != null) &&
                    (options.hasExtension(TableOptions.fdbsql))) {
                    TableOptions tableOptions = options.getExtension(TableOptions.fdbsql);
                    if (tableOptions.getUuid().equals(rootUuid)) {
                        priorFile = file;
                        break;
                    }
                }
            }
View Full Code Here


        if (priorFile != null) {
            for (DescriptorProto message : priorFile.getMessageTypeList()) {
                MessageOptions options = message.getOptions();
                if ((options != null) &&
                    (options.hasExtension(TableOptions.fdbsql))) {
                    TableOptions toptions = options.getExtension(TableOptions.fdbsql);
                    if (toptions.getUuid().equals(tableOptions.getUuid())) {
                        priorMessage = message;
                        break;
                    }
                }
            }
        }
        nextField = 1;
        if (priorMessage != null) {
            TableOptions options = priorMessage.getOptions().getExtension(TableOptions.fdbsql);
            if (options.hasNextField()) {
                nextField = options.getNextField();
            }
            else {
                nextField = priorMessage.getField(priorMessage.getFieldCount() - 1)
                    .getNumber() + 1;
            }
View Full Code Here

        if (priorFile != null) {
            for (DescriptorProto message : priorFile.getMessageTypeList()) {
                MessageOptions options = message.getOptions();
                if ((options != null) &&
                    (options.hasExtension(TableOptions.fdbsql))) {
                    TableOptions toptions = options.getExtension(TableOptions.fdbsql);
                    if (toptions.getIsGroup()) {
                        priorMessage = message;
                        break;
                    }
                }
            }
        }
        nextField = 1;
        if (priorMessage != null) {
            TableOptions options = priorMessage.getOptions().getExtension(TableOptions.fdbsql);
            if (options.hasNextField()) {
                nextField = options.getNextField();
            }
            else {
                nextField = priorMessage.getField(priorMessage.getFieldCount() - 1)
                    .getNumber() + 1;
            }
        }
        fieldNames.clear();
        for (Table table : tables) {
            String fieldName = uniqueIdent(ident(table.getName().getTableName(), false), fieldNames);
            fieldBuilder = messageBuilder.addFieldBuilder();
            fieldBuilder.setName(fieldName);
            fieldBuilder.setLabel(Label.LABEL_OPTIONAL);
            fieldBuilder.setType(Type.TYPE_MESSAGE);
            fieldBuilder.setTypeName(tableMessageNames.get(table));
            FieldOptions.Builder fieldBuilderOptions = FieldOptions.newBuilder();
            ColumnOptions.Builder columnOptions = ColumnOptions.newBuilder();
            columnOptions.setUuid(table.getUuid().toString());
            priorField = null;
            if (priorMessage != null) {
                for (FieldDescriptorProto field : priorMessage.getFieldList()) {
                    FieldOptions options = field.getOptions();
                    if ((options != null) &&
                        (options.hasExtension(ColumnOptions.fdbsql))) {
                        ColumnOptions coptions = options.getExtension(ColumnOptions.fdbsql);
                        if (coptions.getUuid().equals(columnOptions.getUuid())) {
                            priorField = field;
                            break;
                        }
                    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.store.format.protobuf.CustomOptions.TableOptions

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.