RelationshipTypeStore typeStore = getRelationshipTypeStore();
int id = (int) typeStore.nextId();
RelationshipTypeRecord record = new RelationshipTypeRecord( id );
record.setInUse( true );
record.setCreated();
int nameId = typeStore.nextNameId();
record.setNameId( nameId );
Collection<DynamicRecord> nameRecords = typeStore.allocateNameRecords( nameId, encodeString( name ) );
for ( DynamicRecord typeRecord : nameRecords )
{
record.addNameRecord( typeRecord );