private Iterator<Property> loadAllPropertiesOf(PrimitiveRecord primitiveRecord) {
   Collection<PropertyRecord> records =
       propertyStore.getPropertyRecordChain(primitiveRecord.getNextProp());
   if (null == records) {
     return IteratorUtil.emptyIterator();
   }
   List<Property> properties = new ArrayList<>();
   for (PropertyRecord record : records) {
     for (PropertyBlock block : record.getPropertyBlocks()) {
       properties.add(block.getType().readProperty(block.getKeyIndexId(), block, propertyStore));
     }
   }
   return properties.iterator();
 }
示例#2
0
  private Map<String, Object> getPropertyChain(long nextProp) {
    PropertyStore propStore = getPropertyStore();
    Map<String, Object> properties = new HashMap<String, Object>();

    while (nextProp != Record.NO_NEXT_PROPERTY.intValue()) {
      PropertyRecord propRecord = propStore.getRecord(nextProp);
      for (PropertyBlock propBlock : propRecord.getPropertyBlocks()) {
        String key = indexHolder.getStringKey(propBlock.getKeyIndexId());
        PropertyData propertyData = propBlock.newPropertyData(propRecord);
        Object value =
            propertyData.getValue() != null
                ? propertyData.getValue()
                : propBlock.getType().getValue(propBlock, getPropertyStore());
        properties.put(key, value);
      }
      nextProp = propRecord.getNextProp();
    }
    return properties;
  }