Package org.lilyproject.repository.api

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


            repository.getTableManager().createTable("table1");
            repository.getTableManager().createTable("table2");

            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));
View Full Code Here


            RecordId decodedRecordId = converter.convertAvroRecordId(recordId, repository);
            Record record = null;
            if (attributes == null) {
                record = table.delete(decodedRecordId, converter.convertFromAvro(conditions, repository));
            } else if (conditions == null) {
                Record toDelete = table.newRecord(decodedRecordId);
                toDelete.setAttributes(attributes);
                table.delete(toDelete);
            } else {
                // There is no API call where a full record and MutationConditions can be supplied, so
                // something has gone wrong if we get here
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.