예제 #1
0
 @Override
 public void delete(Record record) throws RepositoryException, InterruptedException {
   try {
     lilyProxy.delete(converter.convert(record.getId()), null, record.getAttributes());
   } catch (AvroRepositoryException e) {
     throw converter.convert(e);
   } catch (AvroGenericException e) {
     throw converter.convert(e);
   } catch (AvroRemoteException e) {
     throw handleAvroRemoteException(e);
   } catch (UndeclaredThrowableException e) {
     throw handleUndeclaredRecordThrowable(e);
   }
 }
예제 #2
0
 @Override
 public Record create(Record record) throws RepositoryException, InterruptedException {
   try {
     return converter.convertRecord(lilyProxy.create(converter.convert(record)));
   } catch (AvroRepositoryException e) {
     throw converter.convert(e);
   } catch (AvroGenericException e) {
     throw converter.convert(e);
   } catch (AvroRemoteException e) {
     throw handleAvroRemoteException(e);
   } catch (UndeclaredThrowableException e) {
     throw handleUndeclaredRecordThrowable(e);
   }
 }
예제 #3
0
 @Override
 public Set<RecordId> getVariants(RecordId recordId)
     throws RepositoryException, InterruptedException {
   try {
     return converter.convertAvroRecordIds(lilyProxy.getVariants(converter.convert(recordId)));
   } catch (AvroRepositoryException e) {
     throw converter.convert(e);
   } catch (AvroGenericException e) {
     throw converter.convert(e);
   } catch (AvroRemoteException e) {
     throw handleAvroRemoteException(e);
   } catch (UndeclaredThrowableException e) {
     throw handleUndeclaredRecordThrowable(e);
   }
 }
예제 #4
0
 @Override
 public Record delete(RecordId recordId, List<MutationCondition> conditions)
     throws RepositoryException, InterruptedException {
   try {
     ByteBuffer record =
         lilyProxy.delete(converter.convert(recordId), converter.convert(null, conditions), null);
     return record == null ? null : converter.convertRecord(record);
   } catch (AvroRepositoryException e) {
     throw converter.convert(e);
   } catch (AvroGenericException e) {
     throw converter.convert(e);
   } catch (AvroRemoteException e) {
     throw handleAvroRemoteException(e);
   } catch (UndeclaredThrowableException e) {
     throw handleUndeclaredRecordThrowable(e);
   }
 }
예제 #5
0
 @Override
 public Record update(
     Record record,
     boolean updateVersion,
     boolean useLatestRecordType,
     List<MutationCondition> conditions)
     throws RepositoryException, InterruptedException {
   try {
     return converter.convertRecord(
         lilyProxy.update(
             converter.convert(record),
             updateVersion,
             useLatestRecordType,
             converter.convert(record, conditions)));
   } catch (AvroRepositoryException e) {
     throw converter.convert(e);
   } catch (AvroGenericException e) {
     throw converter.convert(e);
   } catch (AvroRemoteException e) {
     throw handleAvroRemoteException(e);
   } catch (UndeclaredThrowableException e) {
     throw handleUndeclaredRecordThrowable(e);
   }
 }