Search in sources :

Example 1 with NodeMultiPropertyDescriptor

use of org.neo4j.kernel.api.schema.NodeMultiPropertyDescriptor in project neo4j by neo4j.

the class IndexingAcceptanceTest method indexDescriptor.

private NewIndexDescriptor indexDescriptor(ReadOperations readOperations, IndexDefinition index) throws SchemaRuleNotFoundException {
    int labelId = readOperations.labelGetForName(index.getLabel().name());
    int[] propertyKeyIds = getPropertyKeyIds(readOperations, index.getPropertyKeys());
    NodePropertyDescriptor descriptor = new NodeMultiPropertyDescriptor(labelId, propertyKeyIds);
    return readOperations.indexGetForLabelAndPropertyKey(descriptor);
}
Also used : NodePropertyDescriptor(org.neo4j.kernel.api.schema.NodePropertyDescriptor) NodeMultiPropertyDescriptor(org.neo4j.kernel.api.schema.NodeMultiPropertyDescriptor)

Example 2 with NodeMultiPropertyDescriptor

use of org.neo4j.kernel.api.schema.NodeMultiPropertyDescriptor in project neo4j by neo4j.

the class SchemaImpl method getIndexDescriptor.

private static NewIndexDescriptor getIndexDescriptor(ReadOperations readOperations, IndexDefinition index) throws SchemaRuleNotFoundException {
    int labelId = readOperations.labelGetForName(index.getLabel().name());
    int[] propertyKeyIds = PropertyNameUtils.getPropertyKeyIds(readOperations, index.getPropertyKeys());
    assertValidLabel(index.getLabel(), labelId);
    assertValidProperties(index.getPropertyKeys(), propertyKeyIds);
    return readOperations.indexGetForLabelAndPropertyKey(new NodeMultiPropertyDescriptor(labelId, propertyKeyIds));
}
Also used : NodeMultiPropertyDescriptor(org.neo4j.kernel.api.schema.NodeMultiPropertyDescriptor) PropertyConstraint(org.neo4j.kernel.api.constraints.PropertyConstraint) NodePropertyExistenceConstraint(org.neo4j.kernel.api.constraints.NodePropertyExistenceConstraint) UniquenessConstraint(org.neo4j.kernel.api.constraints.UniquenessConstraint) RelationshipPropertyConstraint(org.neo4j.kernel.api.constraints.RelationshipPropertyConstraint) NodePropertyConstraint(org.neo4j.kernel.api.constraints.NodePropertyConstraint) RelationshipPropertyExistenceConstraint(org.neo4j.kernel.api.constraints.RelationshipPropertyExistenceConstraint)

Aggregations

NodeMultiPropertyDescriptor (org.neo4j.kernel.api.schema.NodeMultiPropertyDescriptor)2 NodePropertyConstraint (org.neo4j.kernel.api.constraints.NodePropertyConstraint)1 NodePropertyExistenceConstraint (org.neo4j.kernel.api.constraints.NodePropertyExistenceConstraint)1 PropertyConstraint (org.neo4j.kernel.api.constraints.PropertyConstraint)1 RelationshipPropertyConstraint (org.neo4j.kernel.api.constraints.RelationshipPropertyConstraint)1 RelationshipPropertyExistenceConstraint (org.neo4j.kernel.api.constraints.RelationshipPropertyExistenceConstraint)1 UniquenessConstraint (org.neo4j.kernel.api.constraints.UniquenessConstraint)1 NodePropertyDescriptor (org.neo4j.kernel.api.schema.NodePropertyDescriptor)1