- java.lang.Object
-
- com.pervasive.datarush.graphs.EngineProperty<T>
-
- Type Parameters:
T- the type of the engine property
public class EngineProperty<T> extends Object
Defined configuration properties for the DataRush engine.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> EngineProperty<T>defineProperty(String propertyName, String description, Class<T> propertyClass, T defaultValue)Creates a new engine propertystatic List<EngineProperty<?>>discoverProperties(Class<?> clazz)Finds allpublic static final EnginePropertydeclarations of the given class and its inner classes.static EngineProperty<?>discoverProperty(Class<?> clazz, String name)Looks up engine properties by their property file keys.booleanequals(Object o)TgetDefaultValue()Gets the default value for the property.StringgetDescription()Gets a description of the property.StringgetProperty()Gets the property key for use in properties files.Class<T>getPropertyClass()Returns the class of values of this propertyinthashCode()TparseValue(String value)Parses the given value from its text representation to the type of the propertyStringtoString()
-
-
-
Method Detail
-
defineProperty
public static <T> EngineProperty<T> defineProperty(String propertyName, String description, Class<T> propertyClass, T defaultValue)
Creates a new engine property- Type Parameters:
T- the type of property- Parameters:
propertyName- the name of the propertydescription- the description of the propertypropertyClass- the type of the propertydefaultValue- the default value of the property- Returns:
- a new engine property
-
parseValue
public T parseValue(String value) throws com.pervasive.datarush.graphs.physical.InvalidPropertyValueException
Parses the given value from its text representation to the type of the property- Parameters:
value- the next value- Returns:
- the property value
- Throws:
com.pervasive.datarush.graphs.physical.InvalidPropertyValueException- if a parse error occurs
-
getProperty
public final String getProperty()
Gets the property key for use in properties files.- Returns:
- the property's key name
-
getDescription
public final String getDescription()
Gets a description of the property.- Returns:
- the property's description
-
getDefaultValue
public T getDefaultValue()
Gets the default value for the property.- Returns:
- the property's default
-
getPropertyClass
public final Class<T> getPropertyClass()
Returns the class of values of this property- Returns:
- the class of values of this property
-
discoverProperties
public static List<EngineProperty<?>> discoverProperties(Class<?> clazz)
Finds allpublic static final EnginePropertydeclarations of the given class and its inner classes.- Parameters:
clazz- the class, usuallyEngineConfig- Returns:
- all property declarations in the given class and inner classes
-
discoverProperty
public static EngineProperty<?> discoverProperty(Class<?> clazz, String name)
Looks up engine properties by their property file keys.- Parameters:
clazz- the class containing property declarationsname- the key from the property file- Returns:
- the associated engine property.
nullif no such property can be found.
-
-