Class PropertyStates
- java.lang.Object
 - 
- org.apache.jackrabbit.oak.plugins.memory.PropertyStates
 
 
- 
public final class PropertyStates extends java.lang.ObjectUtility class for creatingPropertyStateinstances. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PropertyStateconvert(PropertyState state, Type<?> type)static @NotNull PropertyStatecreateProperty(java.lang.String name, java.lang.Iterable<Value> values)Create a multi valuedPropertyStatebased on a list ofValueinstances.static PropertyStatecreateProperty(java.lang.String name, java.lang.Iterable<Value> values, int type)static @NotNull PropertyStatecreateProperty(java.lang.String name, java.lang.Object value, Type<?> type)Create aPropertyState.static @NotNull PropertyStatecreateProperty(java.lang.String name, java.lang.String value, int type)Create aPropertyStatefrom a string.static @NotNull PropertyStatecreateProperty(java.lang.String name, Value value)Create aPropertyStatebased on aValue.static <T> @NotNull PropertyStatecreateProperty(java.lang.String name, T value)Create aPropertyStatewhere theTypeof the property state is inferred from the runtime type ofTaccording to the mapping established throughType. 
 - 
 
- 
- 
Method Detail
- 
createProperty
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, Value value) throws RepositoryException
Create aPropertyStatebased on aValue. TheTypeof the property state is determined by the type of the value.- Parameters:
 name- The name of the property statevalue- The value of the property state- Returns:
 - The new property state
 - Throws:
 RepositoryException- forwarded fromvalue
 
- 
createProperty
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.Iterable<Value> values) throws RepositoryException
Create a multi valuedPropertyStatebased on a list ofValueinstances. TheTypeof the property is determined by the type of the first value in the list orType.STRINGif the list is empty.- Parameters:
 name- The name of the property statevalues- The values of the property state- Returns:
 - The new property state
 - Throws:
 RepositoryException- forwarded fromvalue
 
- 
createProperty
public static PropertyState createProperty(java.lang.String name, java.lang.Iterable<Value> values, int type) throws RepositoryException
- Throws:
 RepositoryException
 
- 
createProperty
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.String value, int type)
Create aPropertyStatefrom a string.- Parameters:
 name- The name of the property statevalue- The value of the property statetype- The type of the property state- Returns:
 - The new property state
 
 
- 
createProperty
@NotNull public static @NotNull PropertyState createProperty(java.lang.String name, java.lang.Object value, Type<?> type)
Create aPropertyState.- Parameters:
 name- The name of the property statevalue- The value of the property statetype- The type of the property state- Returns:
 - The new property state
 
 
- 
createProperty
@NotNull public static <T> @NotNull PropertyState createProperty(java.lang.String name, T value)
Create aPropertyStatewhere theTypeof the property state is inferred from the runtime type ofTaccording to the mapping established throughType.- Parameters:
 name- The name of the property statevalue- The value of the property state- Returns:
 - The new property state
 
 
- 
convert
public static PropertyState convert(PropertyState state, Type<?> type)
 
 - 
 
 -