Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.RecordException


        ResultScanner hbaseScanner;
        try {
            hbaseScanner = recordTable.getScanner(hbaseScan);
        } catch (IOException e) {
            throw new RecordException("Error creating scanner", e);
        }
        return hbaseScanner;
    }
View Full Code Here


            if (result == null || result.isEmpty()) {
                throw new RecordNotFoundException(recordId, this, this);
            }

        } catch (IOException e) {
            throw new RecordException("Exception occurred while retrieving record '" + recordId
                    + "' from HBase table", e);
        }
        return result;
    }
View Full Code Here

                    continue;
                }
                results.put(recordIds.get(i++), result);
            }
        } catch (IOException e) {
            throw new RecordException("Exception occurred while retrieving records '" + recordIds
                    + "' from HBase table", e);
        }
        return results;
    }
View Full Code Here

    private void encodeData(Object value, DataOutput dataOutput, IdentityRecordStack parentRecords)
            throws RepositoryException, InterruptedException {
        Record record = (Record)value;
        if (parentRecords.contains(record)) {
            throw new RecordException("A record may not be nested in itself: " + record.getId());
        }


        RecordType recordType;
        QName recordRecordTypeName = record.getRecordTypeName();
        if (recordRecordTypeName != null) {
            if (valueTypeRecordTypeName != null) {
                // Validate the same record type is being used
                // 20130314: temporarily disabled this, see LILY-1279
//                if (!valueTypeRecordTypeName.equals(recordRecordTypeName)) {
//                    throw new RecordException("The record's Record Type '" + recordRecordTypeName +
//                            "' does not match the record value type's record type '" + valueTypeRecordTypeName + "'");
//                }
            }
            recordType = typeManager.getRecordTypeByName(recordRecordTypeName, null);
        } else if (valueTypeRecordTypeName != null) {
                recordType = typeManager.getRecordTypeByName(valueTypeRecordTypeName, null);
        } else {
            throw new RecordException("The record '" + record + "' should specify a record type");
        }

        // Get and sort the field type entries that should be in the record
        List<FieldType> fieldTypes = getSortedFieldTypes(recordType);
View Full Code Here

TOP

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

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.