Пример #1
0
 public static bool HasProperty(SchemaDescriptorSupplier supplier, int propertyId)
 {
     int[] schemaProperties = supplier.Schema().PropertyIds;
     foreach (int schemaProp in schemaProperties)
     {
         if (schemaProp == propertyId)
         {
             return(true);
         }
     }
     return(false);
 }
Пример #2
0
        public static bool HasRelType(SchemaDescriptorSupplier supplier, int relTypeId)
        {
            SchemaDescriptor schema = supplier.Schema();

            return(Schema.entityType() == EntityType.RELATIONSHIP && ArrayUtils.contains(Schema.EntityTokenIds, relTypeId));
        }
Пример #3
0
        public static bool HasLabel(SchemaDescriptorSupplier supplier, int labelId)
        {
            SchemaDescriptor schema = supplier.Schema();

            return(Schema.entityType() == EntityType.NODE && ArrayUtils.contains(Schema.EntityTokenIds, labelId));
        }