Package org.lilyproject.repository.api

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


        recordType = typeMgr.createRecordType(recordType);

        Record record = repository.newRecord();
        record.setRecordType(typeName);
        record.setField(fieldName, "foo");
        record = repository.create(record);

        assertEquals("foo-create-hook", record.getField(fieldName));

        record = repository.read(record.getId());
        assertEquals("foo-create-hook", record.getField(fieldName));
View Full Code Here


        // Create a record with this blob
        Record record = repository.newRecord();
        record.setRecordType(new QName(NS, "file"));
        record.setField(new QName(NS, "data"), blob);
        record = repository.create(record);
    }

    private byte[] makeBlobData(int size) {
        return new byte[size];
    }
View Full Code Here

        for (int i = 0; i < 10; i++) {
            Record record = repository.newRecord();
            record.setId(repository.getIdGenerator().newRecordId("A" + i));
            record.setRecordType(new QName(NS, "scanrt"));
            record.setField(new QName(NS, "scanfield"), "value " + i);
            repository.create(record);
        }

        // Do a scan
        RecordScan scan = new RecordScan();
        scan.setStartRecordId(idGenerator.newRecordId("A"));
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.