public class BinaryPropertyState extends EmptyPropertyState
| Constructor and Description |
|---|
BinaryPropertyState(@NotNull String name,
@NotNull Blob value) |
| Modifier and Type | Method and Description |
|---|---|
static PropertyState |
binaryProperty(@NotNull String name,
@NotNull Blob value)
Create a
PropertyState from a Blob. |
static PropertyState |
binaryProperty(@NotNull String name,
@NotNull byte[] value)
Create a
PropertyState from an array of bytes. |
static PropertyState |
binaryProperty(@NotNull String name,
@NotNull String value)
Create a
PropertyState from an array of bytes. |
static PropertyState |
binaryProperty(@NotNull String name,
@NotNull Value value)
Create a
PropertyState from a Value. |
int |
count()
The number of values of this property.
|
Conversions.Converter |
getConverter()
Create a converter for converting the value of this property to other types.
|
Type<?> |
getType()
Determine the type of this property
|
Blob |
getValue()
The value of this property
|
<S> S |
getValue(Type<S> type)
Value of this property.
|
<S> S |
getValue(Type<S> type,
int index)
Value at the given
index. |
boolean |
isArray()
Determine whether the value is an array of atoms
|
long |
size()
The size of the value of this property.
|
long |
size(int index)
The size of the value at the given
index. |
emptyProperty, getNamepublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull byte[] value)
PropertyState from an array of bytes.name - The name of the property statevalue - The value of the property stateType.BINARYpublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull String value)
PropertyState from an array of bytes.name - The name of the property statevalue - The value of the property stateType.BINARYpublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull Blob value)
PropertyState from a Blob.name - The name of the property statevalue - The value of the property stateType.BINARYpublic static PropertyState binaryProperty(@NotNull @NotNull String name, @NotNull @NotNull Value value) throws RepositoryException
PropertyState from a Value.name - The name of the property statevalue - The value of the property stateType.BINARYRepositoryExceptionpublic Blob getValue()
public Conversions.Converter getConverter()
public long size()
PropertyStatesize in interface PropertyStategetString().length()public Type<?> getType()
PropertyStatepublic boolean isArray()
PropertyStateisArray in interface PropertyStateisArray in class EmptyPropertyStatefalse@NotNull public <S> S getValue(Type<S> type)
PropertyStatetype
argument. If type.isArray() is true, this method returns an
Iterable of the base type of
type containing 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 the org.apache.jackrabbit.oak.plugins.value.Conversions class.getValue in interface PropertyStategetValue in class EmptyPropertyStatetype - target typetype.isArray() is true.IllegalArgumentException - if type is not one of the
values defined in Type.@NotNull public <S> S getValue(Type<S> type, int index)
PropertyStateindex.
The type of the return value is determined by the target type
argument.
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 the org.apache.jackrabbit.oak.plugins.value.Conversions class.getValue in interface PropertyStategetValue in class EmptyPropertyStatetype - target typeindexIllegalArgumentException - if type.isArray is trueIndexOutOfBoundsException - if index != 0public long size(int index)
PropertyStateindex.size in interface PropertyStatesize in class EmptyPropertyStatesizeIndexOutOfBoundsException - if index != 0public int count()
PropertyState1 for atoms.count in interface PropertyStatecount in class EmptyPropertyState1Copyright © 2010 - 2020 Adobe. All Rights Reserved