public final class PropertyMetadata<T> extends Object
| Constructor and Description |
|---|
PropertyMetadata(String name,
String description,
Type sqlType,
Class<T> javaType,
T defaultValue,
boolean hidden,
java.util.function.Function<Object,T> decoder,
java.util.function.Function<T,Object> encoder) |
| Modifier and Type | Method and Description |
|---|---|
static <T> PropertyMetadata<Boolean> |
booleanSessionProperty(String name,
String description,
Boolean defaultValue,
boolean hidden) |
T |
decode(Object value)
Decodes the SQL type object value to the Java type of the property.
|
static PropertyMetadata<Double> |
doubleSessionProperty(String name,
String description,
Double defaultValue,
boolean hidden) |
Object |
encode(T value)
Encodes the Java type value to SQL type object value
|
T |
getDefaultValue()
Gets the default value for this property.
|
String |
getDescription()
Description for the end user.
|
Class<T> |
getJavaType()
Java type of this property.
|
String |
getName()
Name of the session property.
|
Type |
getSqlType()
SQL type of the property.
|
static PropertyMetadata<Integer> |
integerSessionProperty(String name,
String description,
Integer defaultValue,
boolean hidden) |
boolean |
isHidden()
Is this property hidden from users?
|
static PropertyMetadata<Long> |
longSessionProperty(String name,
String description,
Long defaultValue,
boolean hidden) |
static PropertyMetadata<String> |
stringSessionProperty(String name,
String description,
String defaultValue,
boolean hidden) |
public String getName()
public String getDescription()
public Type getSqlType()
public T getDefaultValue()
public boolean isHidden()
public T decode(Object value)
public static <T> PropertyMetadata<Boolean> booleanSessionProperty(String name, String description, Boolean defaultValue, boolean hidden)
public static PropertyMetadata<Integer> integerSessionProperty(String name, String description, Integer defaultValue, boolean hidden)
public static PropertyMetadata<Long> longSessionProperty(String name, String description, Long defaultValue, boolean hidden)
public static PropertyMetadata<Double> doubleSessionProperty(String name, String description, Double defaultValue, boolean hidden)
public static PropertyMetadata<String> stringSessionProperty(String name, String description, String defaultValue, boolean hidden)
Copyright © 2012-2016. All Rights Reserved.