/** * @return The {@link PropertyType} of this record or null if unset or non valid */ public PropertyType getType() { return PropertyType.getPropertyTypeOrNull( (long) (this.type << 24) ); }
private PropertyType getType( boolean force ) { return valueBlocks == null ? null : force ? PropertyType.getPropertyTypeOrNull( valueBlocks[0] ) : PropertyType.getPropertyTypeOrThrow( valueBlocks[0] ); }
private PropertyType type() { return PropertyType.getPropertyTypeOrNull( currentBlock() ); }
public static PropertyType getPropertyTypeOrThrow( long propBlock ) { PropertyType type = getPropertyTypeOrNull( propBlock ); if ( type == null ) { throw new InvalidRecordException( "Unknown property type for type " + typeIdentifier( propBlock ) ); } return type; }
/** * For property records there's no "inUse" byte and we need to read the whole record to * see if there are any PropertyBlocks in use in it. */ @Override public boolean isInUse( PageCursor cursor ) { cursor.setOffset( cursor.getOffset() /*skip...*/ + 1/*mod*/ + 4/*prev*/ + 4/*next*/ ); int blocks = PropertyType.getPayloadSizeLongs(); for ( int i = 0; i < blocks; i++ ) { long block = cursor.getLong(); // Since there's no inUse byte we have to check the special case of first block == 0, which will mean that it's deleted if ( i == 0 && block == 0 ) { return false; } if ( PropertyType.getPropertyTypeOrNull( block ) != null ) { return true; } } return false; } }
PropertyType type = PropertyType.getPropertyTypeOrNull( current ); if ( type == null )
PropertyType type = PropertyType.getPropertyTypeOrNull( block ); if ( type == null )
/** * @return The {@link PropertyType} of this record or null if unset or non valid */ public PropertyType getType() { return PropertyType.getPropertyTypeOrNull( (long) (this.type << 24) ); }
private PropertyType type() { return PropertyType.getPropertyTypeOrNull( currentBlock() ); }
private PropertyType getType( boolean force ) { return valueBlocks == null ? null : force ? PropertyType.getPropertyTypeOrNull( valueBlocks[0] ) : PropertyType.getPropertyTypeOrThrow( valueBlocks[0] ); }
public static PropertyType getPropertyTypeOrThrow( long propBlock ) { PropertyType type = getPropertyTypeOrNull( propBlock ); if ( type == null ) { throw new InvalidRecordException( "Unknown property type for type " + typeIdentifier( propBlock ) ); } return type; }
/** * For property records there's no "inUse" byte and we need to read the whole record to * see if there are any PropertyBlocks in use in it. */ @Override public boolean isInUse( PageCursor cursor ) { cursor.setOffset( cursor.getOffset() /*skip...*/ + 1/*mod*/ + 4/*prev*/ + 4/*next*/ ); int blocks = PropertyType.getPayloadSizeLongs(); for ( int i = 0; i < blocks; i++ ) { long block = cursor.getLong(); // Since there's no inUse byte we have to check the special case of first block == 0, which will mean that it's deleted if ( i == 0 && block == 0 ) { return false; } if ( PropertyType.getPropertyTypeOrNull( block ) != null ) { return true; } } return false; } }
PropertyType type = PropertyType.getPropertyTypeOrNull( current ); if ( type == null )
PropertyType type = PropertyType.getPropertyTypeOrNull( block ); if ( type == null )