Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.LTable.create()


            for (String tableName : new String[] {"record", "table1", "table2"}) {
                LTable table = repository.getTable(tableName);
                Record record = table.newRecord();
                record.setRecordType(typeName);
                record.setField(field1, "foobar");
                record = table.create(record);
                assertEquals("foo", record.getField(field2));
                assertEquals("foo", table.read(record.getId()).getField(field2));

                // Test we can get access to our test decorator: this is something that is occasionally useful
                // in test cases to check certain conditions, e.g. if the decorator would have async side effects.
View Full Code Here


            throws AvroRepositoryException, AvroInterruptedException {
        try {
            AuthorizationContextHolder.setCurrentContext(converter.convert(authzContext));
            LRepository repository = repositoryManager.getRepository(repositoryName);
            LTable table = repository.getTable(tableName);
            return converter.convert(table.create(converter.convertRecord(record, repository)), repository);
        } catch (RepositoryException e) {
            throw converter.convert(e);
        } catch (InterruptedException e) {
            throw converter.convert(e);
        } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.