Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.Scope


        QName name = QNameConverter.fromJson(getString(node, "name"), namespaces);


        String scopeName = getString(node, "scope", "non_versioned");
        Scope scope = parseScope(scopeName);

        TypeManager typeManager = repository.getTypeManager();

        // Be gentle to users of Lily 1.0
        if (node.has("valueType") && node.get("valueType").isObject() && node.get("valueType").has("primitive")) {
View Full Code Here


                    ((newValue == null) && (originalValue == null))         // Don't update if both are null
                            || (isDeleteMarker(newValue) && fieldIsNewOrDeleted)    // Don't delete if it doesn't exist
                            || (newValue.equals(originalValue)))     // Don't update if they didn't change
                    || newMetadata.containsKey(field.getKey())) { // But do update if the metadata changed
                FieldTypeImpl fieldType = (FieldTypeImpl) fieldTypes.getFieldType(fieldName);
                Scope scope = fieldType.getScope();

                boolean metadataOnlyUpdate = false;
                if (newValue == METADATA_ONLY_UPDATE) {
                    // The metadata was updated, but the field itself not
                    metadataOnlyUpdate = true;
View Full Code Here

                    recordTypeVersion = record.getRecordTypeVersion();
                }
                RecordType recordType = typeManager.getRecordTypeByName(recordTypeName, recordTypeVersion);

                // Update the mutable record type in the record object
                Scope mutableScope = Scope.VERSIONED_MUTABLE;
                newRecord.setRecordType(mutableScope, recordType.getName(), recordType.getVersion());

                // If the record type changed, update it on the record table
                QName originalMutableScopeRecordTypeName = originalRecord.getRecordTypeName(mutableScope);
                if (originalMutableScopeRecordTypeName == null) { // There was no initial mutable record type yet
View Full Code Here

    private FieldType extractFieldType(SchemaId id, Result result) throws RepositoryException, InterruptedException {
        NavigableMap<byte[], byte[]> nonVersionableColumnFamily = result.getFamilyMap(TypeCf.DATA.bytes);
        QName name;
        name = decodeName(nonVersionableColumnFamily.get(TypeColumn.FIELDTYPE_NAME.bytes));
        ValueType valueType = decodeValueType(nonVersionableColumnFamily.get(TypeColumn.FIELDTYPE_VALUETYPE.bytes));
        Scope scope = Scope.valueOf(Bytes.toString(nonVersionableColumnFamily.get(TypeColumn.FIELDTYPE_SCOPE.bytes)));
        return new FieldTypeImpl(id, valueType, name, scope);
    }
View Full Code Here

                    ValueType newValueType = newFieldType.getValueType();
                    if (!oldValueType.equals(newValueType)) {
                        return ImportResult.conflict("value type", oldValueType, newValueType);
                    }

                    Scope oldScope = oldFieldType.getScope();
                    Scope newScope = newFieldType.getScope();
                    if (!oldScope.equals(newScope)) {
                        return ImportResult.conflict("scope", oldScope, newScope);
                    }

                    // Update mutable fields
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.api.Scope

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.