Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.FieldTypeNotFoundException


        return fieldsByName.get(name).fieldType;
    }

    public FieldType get(SchemaId schemaId) throws FieldTypeNotFoundException {
        if (!fieldsById.containsKey(schemaId)) {
            throw new FieldTypeNotFoundException(schemaId);
        }
        return fieldsById.get(schemaId).fieldType;
    }
View Full Code Here


        ArgumentValidator.notNull(id, "id");
        String bucket = AbstractSchemaCache.encodeHex(id.getBytes());

        Map<SchemaId, FieldType> fieldTypeIdCacheBucket = buckets.get(bucket);
        if (fieldTypeIdCacheBucket == null) {
            throw new FieldTypeNotFoundException(id);
        }
        FieldType fieldType = fieldTypeIdCacheBucket.get(id);
        if (fieldType == null) {
            throw new FieldTypeNotFoundException(id);
        }
        return fieldType.clone();
    }
View Full Code Here

    @Override
    public FieldType getFieldType(QName name) throws FieldTypeNotFoundException, InterruptedException {
        ArgumentValidator.notNull(name, "name");
        FieldType fieldType = getNameCache().get(name);
        if (fieldType == null) {
            throw new FieldTypeNotFoundException(name);
        }
        return fieldType.clone();
    }
View Full Code Here

        return fieldsById.containsKey(schemaId);
    }

    public FieldType get(QName name) throws FieldTypeNotFoundException {
        if (!fieldsByName.containsKey(name)) {
            throw new FieldTypeNotFoundException(name);
        }

        return fieldsByName.get(name).fieldType;
    }
View Full Code Here

            throws FieldTypeNotFoundException, TypeException {
        byte[] idBytes = fieldTypeEntry.getFieldTypeId().getBytes();
        Get get = new Get(idBytes);
        try {
            if (!getTypeTable().exists(get)) {
                throw new FieldTypeNotFoundException(fieldTypeEntry.getFieldTypeId());
            }
        } catch (IOException e) {
            throw new TypeException("Exception occurred while checking existance of FieldTypeEntry '"
                    + fieldTypeEntry.getFieldTypeId() + "' on HBase", e);
        }
View Full Code Here

        Long now = null;

        try {
            // Do an exists check first
            if (!getTypeTable().exists(new Get(rowId))) {
                throw new FieldTypeNotFoundException(fieldType.getId());
            }
            // First increment the counter on the row with the name as key, then
            // read the field type
            nameBytes = encodeName(fieldType.getName());
View Full Code Here

            result = getTypeTable().get(get);
            // This covers the case where a given id would match a name that was
            // used for setting the concurrent counters
            if (result == null || result.isEmpty()
                    || result.getValue(TypeCf.DATA.bytes, TypeColumn.FIELDTYPE_NAME.bytes) == null) {
                throw new FieldTypeNotFoundException(id);
            }
        } catch (IOException e) {
            throw new TypeException("Exception occurred while retrieving fieldType '" + id + "' from HBase", e);
        }
        return extractFieldType(id, result);
View Full Code Here

                return typeManager2.getFieldTypeByName(name);
            } catch (FieldTypeNotFoundException e) {
                // continue
            }
        }
        throw new FieldTypeNotFoundException(name);
    }
View Full Code Here

TOP

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

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.