Package com.mysql.cj.conf
Class AbstractPropertyDefinition<T>
java.lang.Object
com.mysql.cj.conf.AbstractPropertyDefinition<T>
- All Implemented Interfaces:
PropertyDefinition<T>
,java.io.Serializable
- Direct Known Subclasses:
BooleanPropertyDefinition
,EnumPropertyDefinition
,IntegerPropertyDefinition
,LongPropertyDefinition
,StringPropertyDefinition
public abstract class AbstractPropertyDefinition<T> extends java.lang.Object implements PropertyDefinition<T>, java.io.Serializable
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description AbstractPropertyDefinition(PropertyKey key, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory)
AbstractPropertyDefinition(PropertyKey key, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory, int lowerBound, int upperBound)
AbstractPropertyDefinition(java.lang.String name, java.lang.String camelCaseAlias, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory)
-
Method Summary
Modifier and Type Method Description java.lang.String[]
getAllowableValues()
Returns the list of allowable values.java.lang.String
getCategory()
Returns the property category.java.lang.String
getCcAlias()
Returns the property camel-case alias.T
getDefaultValue()
Returns the default value.java.lang.String
getDescription()
Returns the property description.int
getLowerBound()
The lowest possible value of range-based propertyjava.lang.String
getName()
Returns the property name.int
getOrder()
Returns the property order.PropertyKey
getPropertyKey()
Get the property key.java.lang.String
getSinceVersion()
Returns the driver version where the property was introduced first.int
getUpperBound()
The highest possible value of range-based propertyboolean
hasCcAlias()
Returns true if property has a camel-case alias.boolean
hasValueConstraints()
Does the property have fixed values based constraints.boolean
isRangeBased()
Returns true if property has range-based constraintsboolean
isRuntimeModifiable()
May the property be changed after initialization.abstract T
parseObject(java.lang.String value, ExceptionInterceptor exceptionInterceptor)
Returns the value object parsed from it's string representation and checked against allowable values.void
setCategory(java.lang.String category)
void
setDefaultValue(T defaultValue)
void
setDescription(java.lang.String description)
void
setLowerBound(int lowerBound)
void
setOrder(int order)
void
setRuntimeModifiable(boolean isRuntimeModifiable)
void
setSinceVersion(java.lang.String sinceVersion)
void
setUpperBound(int upperBound)
-
Constructor Details
-
AbstractPropertyDefinition
public AbstractPropertyDefinition(java.lang.String name, java.lang.String camelCaseAlias, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory) -
AbstractPropertyDefinition
public AbstractPropertyDefinition(PropertyKey key, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory) -
AbstractPropertyDefinition
public AbstractPropertyDefinition(PropertyKey key, T defaultValue, boolean isRuntimeModifiable, java.lang.String description, java.lang.String sinceVersion, java.lang.String category, int orderInCategory, int lowerBound, int upperBound)
-
-
Method Details
-
hasValueConstraints
public boolean hasValueConstraints()Description copied from interface:PropertyDefinition
Does the property have fixed values based constraints.- Specified by:
hasValueConstraints
in interfacePropertyDefinition<T>
- Returns:
- true if property has fixed values based constraints.
-
isRangeBased
public boolean isRangeBased()Description copied from interface:PropertyDefinition
Returns true if property has range-based constraints- Specified by:
isRangeBased
in interfacePropertyDefinition<T>
- Returns:
- true if property has range-based constraints
-
getPropertyKey
Description copied from interface:PropertyDefinition
Get the property key.- Specified by:
getPropertyKey
in interfacePropertyDefinition<T>
- Returns:
PropertyKey
or null if it's a custom property.
-
getName
public java.lang.String getName()Description copied from interface:PropertyDefinition
Returns the property name.- Specified by:
getName
in interfacePropertyDefinition<T>
- Returns:
- the property name
-
getCcAlias
public java.lang.String getCcAlias()Description copied from interface:PropertyDefinition
Returns the property camel-case alias.- Specified by:
getCcAlias
in interfacePropertyDefinition<T>
- Returns:
- the property camel-case alias.
-
hasCcAlias
public boolean hasCcAlias()Description copied from interface:PropertyDefinition
Returns true if property has a camel-case alias.- Specified by:
hasCcAlias
in interfacePropertyDefinition<T>
- Returns:
- true if property has a camel-case alias.
-
getDefaultValue
Description copied from interface:PropertyDefinition
Returns the default value.- Specified by:
getDefaultValue
in interfacePropertyDefinition<T>
- Returns:
- default value
-
setDefaultValue
-
isRuntimeModifiable
public boolean isRuntimeModifiable()Description copied from interface:PropertyDefinition
May the property be changed after initialization.- Specified by:
isRuntimeModifiable
in interfacePropertyDefinition<T>
- Returns:
- true if the property value may be changed after initialization.
-
setRuntimeModifiable
public void setRuntimeModifiable(boolean isRuntimeModifiable) -
getDescription
public java.lang.String getDescription()Description copied from interface:PropertyDefinition
Returns the property description. Used for documentation.- Specified by:
getDescription
in interfacePropertyDefinition<T>
- Returns:
- property description
-
setDescription
public void setDescription(java.lang.String description) -
getSinceVersion
public java.lang.String getSinceVersion()Description copied from interface:PropertyDefinition
Returns the driver version where the property was introduced first. Used for documentation.- Specified by:
getSinceVersion
in interfacePropertyDefinition<T>
- Returns:
- the driver version where the property was introduced first
-
setSinceVersion
public void setSinceVersion(java.lang.String sinceVersion) -
getCategory
public java.lang.String getCategory()Description copied from interface:PropertyDefinition
Returns the property category.- Specified by:
getCategory
in interfacePropertyDefinition<T>
- Returns:
- property category
-
setCategory
public void setCategory(java.lang.String category) -
getOrder
public int getOrder()Description copied from interface:PropertyDefinition
Returns the property order. Used as preferred property position in properties table in documentation.- Specified by:
getOrder
in interfacePropertyDefinition<T>
- Returns:
- property order
-
setOrder
public void setOrder(int order) -
getAllowableValues
public java.lang.String[] getAllowableValues()Description copied from interface:PropertyDefinition
Returns the list of allowable values.- Specified by:
getAllowableValues
in interfacePropertyDefinition<T>
- Returns:
- the list of allowable values
-
getLowerBound
public int getLowerBound()Description copied from interface:PropertyDefinition
The lowest possible value of range-based property- Specified by:
getLowerBound
in interfacePropertyDefinition<T>
- Returns:
- the lowest possible value of range-based property
-
setLowerBound
public void setLowerBound(int lowerBound) -
getUpperBound
public int getUpperBound()Description copied from interface:PropertyDefinition
The highest possible value of range-based property- Specified by:
getUpperBound
in interfacePropertyDefinition<T>
- Returns:
- the highest possible value of range-based property
-
setUpperBound
public void setUpperBound(int upperBound) -
parseObject
Description copied from interface:PropertyDefinition
Returns the value object parsed from it's string representation and checked against allowable values.- Specified by:
parseObject
in interfacePropertyDefinition<T>
- Parameters:
value
- valueexceptionInterceptor
- exception interceptor- Returns:
- the value object
-