public PropertyNotFoundException( int propertyKeyId, EntityType entityType, long entityId ) { this( entityType == EntityType.GRAPH ? "GraphProperties" : entityType.name() + "[" + entityId + "]", propertyKeyId ); }
public EntityNotFoundException( EntityType entityType, long entityId ) { super( Status.Statement.EntityNotFound, "Unable to load %s with id %s.", entityType.name(), entityId ); this.entityType = entityType; this.entityId = entityId; }
static void saveFulltextIndexSettings( FulltextIndexDescriptor descriptor, PartitionedIndexStorage indexStorage, FileSystemAbstraction fs ) throws IOException { File indexConfigFile = new File( indexStorage.getIndexFolder(), INDEX_CONFIG_FILE ); Properties settings = new Properties(); settings.getProperty( INDEX_CONFIG_EVENTUALLY_CONSISTENT, Boolean.toString( descriptor.isEventuallyConsistent() ) ); settings.setProperty( INDEX_CONFIG_ANALYZER, descriptor.analyzerName() ); settings.setProperty( INDEX_CONFIG_PROPERTY_NAMES, descriptor.propertyNames().stream().collect( Collectors.joining( ", ", "[", "]" )) ); settings.setProperty( "_propertyIds", Arrays.toString( descriptor.properties() ) ); settings.setProperty( "_name", descriptor.name() ); settings.setProperty( "_schema_entityType", descriptor.schema().entityType().name() ); settings.setProperty( "_schema_entityTokenIds", Arrays.toString( descriptor.schema().getEntityTokenIds() ) ); try ( StoreChannel channel = fs.create( indexConfigFile ); Writer writer = fs.openAsWriter( indexConfigFile, StandardCharsets.UTF_8, false ) ) { settings.store( writer, "Auto-generated file. Do not modify!" ); writer.flush(); channel.force( true ); } } }
public PropertyNotFoundException( int propertyKeyId, EntityType entityType, long entityId ) { this( entityType == EntityType.GRAPH ? "GraphProperties" : entityType.name() + "[" + entityId + "]", propertyKeyId ); }
public EntityNotFoundException( EntityType entityType, long entityId ) { super( Status.Statement.EntityNotFound, "Unable to load %s with id %s.", entityType.name(), entityId ); this.entityType = entityType; this.entityId = entityId; }