コード例 #1
0
        public static MultiTokenSchemaDescriptor MultiToken(int[] entityTokens, EntityType entityType, params int[] propertyIds)
        {
            ValidatePropertyIds(propertyIds);
            switch (entityType.innerEnumValue)
            {
            case EntityType.InnerEnum.NODE:
                ValidateLabelIds(entityTokens);
                break;

            case EntityType.InnerEnum.RELATIONSHIP:
                ValidateRelationshipTypeIds(entityTokens);
                break;

            default:
                throw new System.ArgumentException("Cannot create schemadescriptor of type :" + entityType);
            }
            return(new MultiTokenSchemaDescriptor(entityTokens, entityType, propertyIds));
        }
コード例 #2
0
        internal IndexCheck(StoreIndexDescriptor indexRule)
        {
            this._indexRule = indexRule;
            SchemaDescriptor schema = indexRule.Schema();

            int[]  entityTokenIntIds  = Schema.EntityTokenIds;
            long[] entityTokenLongIds = new long[entityTokenIntIds.Length];
            for (int i = 0; i < entityTokenIntIds.Length; i++)
            {
                entityTokenLongIds[i] = entityTokenIntIds[i];
            }
            [email protected]_PropertySchemaType propertySchemaType = Schema.propertySchemaType();
            _entityType = Schema.entityType();
            if (_entityType == EntityType.NODE)
            {
                _nodeChecker = new NodeInUseWithCorrectLabelsCheck <IndexEntry, Org.Neo4j.Consistency.report.ConsistencyReport_IndexConsistencyReport>(entityTokenLongIds, propertySchemaType, false);
            }
            if (_entityType == EntityType.RELATIONSHIP)
            {
                _relationshipChecker = new RelationshipInUseWithCorrectRelationshipTypeCheck <IndexEntry, Org.Neo4j.Consistency.report.ConsistencyReport_IndexConsistencyReport>(entityTokenLongIds);
            }
        }
コード例 #3
0
 internal MultiTokenSchemaDescriptor(int[] entityTokens, EntityType entityType, int[] propertyIds)
 {
     this._entityTokens = entityTokens;
     this._entityType   = entityType;
     this._propertyIds  = propertyIds;
 }
コード例 #4
0
 public EntityNotFoundException(EntityType entityType, long entityId) : base(org.neo4j.kernel.api.exceptions.Status_Statement.EntityNotFound, "Unable to load %s with id %s.", entityType.name(), entityId)
 {
     this._entityType = entityType;
     this._entityId   = entityId;
 }
コード例 #5
0
 public PropertyNotFoundException(int propertyKeyId, EntityType entityType, long entityId) : this(entityType == EntityType.GRAPH ? "GraphProperties" : entityType.name() + "[" + entityId + "]", propertyKeyId)
 {
 }
コード例 #6
0
 public override MultipleIndexPopulator Create(IndexStoreView storeView, LogProvider logProvider, EntityType type, SchemaState schemaState)
 {
     return(new BatchingMultipleIndexPopulator(storeView, logProvider, type, schemaState));
 }
コード例 #7
0
 public abstract MultipleIndexPopulator Create(IndexStoreView storeView, LogProvider logProvider, EntityType type, SchemaState schemaState);