Class BinaryPropertyState
java.lang.Object
org.apache.jackrabbit.oak.plugins.memory.AbstractPropertyState
org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyState
org.apache.jackrabbit.oak.plugins.memory.BinaryPropertyState
- All Implemented Interfaces:
- PropertyState
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic PropertyStatebinaryProperty(@NotNull String name, @org.jetbrains.annotations.NotNull byte[] value) Create aPropertyStatefrom an array of bytes.static PropertyStatebinaryProperty(@NotNull String name, @NotNull String value) Create aPropertyStatefrom an array of bytes.static PropertyStatebinaryProperty(@NotNull String name, @NotNull Value value) Create aPropertyStatefrom aValue.static PropertyStatebinaryProperty(@NotNull String name, @NotNull Blob value) Create aPropertyStatefrom aBlob.intcount()The number of values of this property.Create a converter for converting the value of this property to other types.Type<?>getType()Determine the type of this propertygetValue()The value of this property<S> SValue of this property.<S> SValue at the givenindex.booleanisArray()Determine whether the value is an array of atomslongsize()The size of the value of this property.longsize(int index) The size of the value at the givenindex.Methods inherited from class org.apache.jackrabbit.oak.plugins.memory.EmptyPropertyStateemptyProperty, getName
- 
Constructor Details- 
BinaryPropertyState
 
- 
- 
Method Details- 
binaryPropertypublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @org.jetbrains.annotations.NotNull byte[] value) Create aPropertyStatefrom an array of bytes.- Parameters:
- name- The name of the property state
- value- The value of the property state
- Returns:
- The new property state of type Type.BINARY
 
- 
binaryPropertypublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull String value) Create aPropertyStatefrom an array of bytes.- Parameters:
- name- The name of the property state
- value- The value of the property state
- Returns:
- The new property state of type Type.BINARY
 
- 
binaryPropertypublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull Blob value) Create aPropertyStatefrom aBlob.- Parameters:
- name- The name of the property state
- value- The value of the property state
- Returns:
- The new property state of type Type.BINARY
 
- 
binaryPropertypublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull Value value) throws RepositoryException Create aPropertyStatefrom aValue.- Parameters:
- name- The name of the property state
- value- The value of the property state
- Returns:
- The new property state of type Type.BINARY
- Throws:
- RepositoryException
 
- 
getValueThe value of this property- Returns:
- Value of this property
 
- 
getConverterCreate a converter for converting the value of this property to other types.- Returns:
- A converter for the value of this property
 
- 
sizepublic long size()Description copied from interface:PropertyStateThe size of the value of this property.- Specified by:
- sizein interface- PropertyState
- Returns:
- getString().length()
 
- 
getTypeDescription copied from interface:PropertyStateDetermine the type of this property- Returns:
- the type of this property
 
- 
isArraypublic boolean isArray()Description copied from interface:PropertyStateDetermine whether the value is an array of atoms- Specified by:
- isArrayin interface- PropertyState
- Overrides:
- isArrayin class- EmptyPropertyState
- Returns:
- false
 
- 
getValueDescription copied from interface:PropertyStateValue of this property. The type of the return value is determined by the targettypeargument. Iftype.isArray()is true, this method returns anIterableof thebase typeoftypecontaining all values of this property. If the target type is not the same as the type of this property an attempt is made to convert the value to the target type. If the conversion fails an exception is thrown. The actual conversions which take place are those defined in theorg.apache.jackrabbit.oak.plugins.value.Conversionsclass.- Specified by:
- getValuein interface- PropertyState
- Overrides:
- getValuein class- EmptyPropertyState
- Parameters:
- type- target type
- Returns:
- An empty list if type.isArray()istrue.
- Throws:
- IllegalArgumentException- if- typeis not one of the values defined in- Type.
 
- 
getValueDescription copied from interface:PropertyStateValue at the givenindex. The type of the return value is determined by the targettypeargument. If the target type is not the same as the type of this property an attempt is made to convert the value to the target type. If the conversion fails an exception is thrown. The actual conversions which take place are those defined in theorg.apache.jackrabbit.oak.plugins.value.Conversionsclass.- Specified by:
- getValuein interface- PropertyState
- Overrides:
- getValuein class- EmptyPropertyState
- Parameters:
- type- target type
- Returns:
- the value of this property at the given index
- Throws:
- IllegalArgumentException- if- type.isArrayis- true
- IndexOutOfBoundsException- if- index != 0
 
- 
sizepublic long size(int index) Description copied from interface:PropertyStateThe size of the value at the givenindex.- Specified by:
- sizein interface- PropertyState
- Overrides:
- sizein class- EmptyPropertyState
- Returns:
- size
- Throws:
- IndexOutOfBoundsException- if- index != 0
 
- 
countpublic int count()Description copied from interface:PropertyStateThe number of values of this property.1for atoms.- Specified by:
- countin interface- PropertyState
- Overrides:
- countin class- EmptyPropertyState
- Returns:
- 1
 
 
-