@Override public FieldEntryBuilder name(String namespace, String name) throws RepositoryException, InterruptedException { this.id = typeManager.getFieldTypeByName(new QName(namespace, name)).getId(); return this; }
@Override public RecordBuilder id(RecordId id, Map<String, String> variantProperties) { record.setId(idGenerator.newRecordId(id.getMaster(), variantProperties)); return this; }
@Override public SupertypeBuilder name(String namespace, String name) throws RepositoryException, InterruptedException { this.id = typeManager.getRecordTypeByName(new QName(namespace, name), null).getId(); return this; }
/** * Lookup name of field type, for use in debug logs. Beware, this might be slow. */ private String safeLoadTagName(SchemaId fieldTypeId) { if (fieldTypeId == null) { return "null"; } try { return repositoryManager.getDefaultRepository().getTypeManager().getFieldTypeById(fieldTypeId).getName().getName(); } catch (Throwable t) { return "failed to load name"; } }
private void checkImmutableFieldsCorrespond(FieldType userFieldType, FieldType latestFieldType) throws FieldTypeUpdateException { if (!userFieldType.getValueType().equals(latestFieldType.getValueType())) { throw new FieldTypeUpdateException("Changing the valueType of a fieldType '" + latestFieldType.getId() + "' (current name: " + latestFieldType.getName() + ") is not allowed; old '" + latestFieldType.getValueType() + "' new '" + userFieldType.getValueType() + "'"); } if (!userFieldType.getScope().equals(latestFieldType.getScope())) { throw new FieldTypeUpdateException("Changing the scope of a fieldType '" + latestFieldType.getId() + "' (current name: " + latestFieldType.getName() + ") is not allowed; old '" + latestFieldType.getScope() + "' new '" + userFieldType.getScope() + "'"); } }
public SolrInputDocument build() throws InterruptedException, RepositoryException { solrDoc.setField("lily.id", recordId.toString()); solrDoc.setField("lily.table", table); solrDoc.setField("lily.key", key); solrDoc.setField("lily.vtagId", vtag.toString()); solrDoc.setField("lily.vtag", typeManager.getFieldTypeById(vtag).getName().getName()); solrDoc.setField("lily.version", version); return solrDoc; }
@Override public FieldEntryBuilder name(QName name) throws RepositoryException, InterruptedException { this.id = typeManager.getFieldTypeByName(name).getId(); return this; }
@Override public Object eval(Record record, TypeManager typeManager) { return record.getRecordTypeName().getName(); } },
@Override public SupertypeBuilder name(String name) throws RepositoryException, InterruptedException { this.id = typeManager.getRecordTypeByName(resolveNamespace(name), null).getId(); return this; }
@Override public RecordBuilder id(String userId, Map<String, String> variantProperties) { record.setId(idGenerator.newRecordId(userId, variantProperties)); return this; }
public RecordNotFoundException(RecordId recordId, LTable table, LRepository repository) { this.recordId = recordId != null ? recordId.toString() : null; this.tableName = table != null ? table.getTableName() : null; this.repositoryName = repository != null ? repository.getRepositoryName() : null; }
@Override public InputStream getInputStream(Record record, QName fieldName, int... indexes) throws RepositoryException, InterruptedException { FieldType fieldType = typeManager.getFieldTypeByName(fieldName); return blobManager.getBlobAccess(record, fieldName, fieldType, indexes).getInputStream(); }
private FieldType buildFieldType() throws RepositoryException, InterruptedException { FieldType fieldType = typeManager.newFieldType(valueType, name, scope); fieldType.setId(id); return fieldType; }
/** * An absolute link to the specified recordId. Nothing will be copied from the context * when resolving this link, also with a repository table name supplied. */ public Link(String table, RecordId recordId) { this.table = table; this.masterRecordId = recordId != null ? recordId.getMaster() : null; variantProps = createVariantProps(recordId); }
@Override public SupertypeBuilder name(QName name) throws RepositoryException, InterruptedException { this.id = typeManager.getRecordTypeByName(name, null).getId(); return this; }
@Override public RecordBuilder assignNewUuid() { record.setId(idGenerator.newRecordId()); return this; }