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.StringgetCategory()Returns the property category.java.lang.StringgetCcAlias()Returns the property camel-case alias.TgetDefaultValue()Returns the default value.java.lang.StringgetDescription()Returns the property description.intgetLowerBound()The lowest possible value of range-based propertyjava.lang.StringgetName()Returns the property name.intgetOrder()Returns the property order.PropertyKeygetPropertyKey()Get the property key.java.lang.StringgetSinceVersion()Returns the driver version where the property was introduced first.intgetUpperBound()The highest possible value of range-based propertybooleanhasCcAlias()Returns true if property has a camel-case alias.booleanhasValueConstraints()Does the property have fixed values based constraints.booleanisRangeBased()Returns true if property has range-based constraintsbooleanisRuntimeModifiable()May the property be changed after initialization.abstract TparseObject(java.lang.String value, ExceptionInterceptor exceptionInterceptor)Returns the value object parsed from it's string representation and checked against allowable values.voidsetCategory(java.lang.String category)voidsetDefaultValue(T defaultValue)voidsetDescription(java.lang.String description)voidsetLowerBound(int lowerBound)voidsetOrder(int order)voidsetRuntimeModifiable(boolean isRuntimeModifiable)voidsetSinceVersion(java.lang.String sinceVersion)voidsetUpperBound(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:PropertyDefinitionDoes the property have fixed values based constraints.- Specified by:
hasValueConstraintsin interfacePropertyDefinition<T>- Returns:
- true if property has fixed values based constraints.
-
isRangeBased
public boolean isRangeBased()Description copied from interface:PropertyDefinitionReturns true if property has range-based constraints- Specified by:
isRangeBasedin interfacePropertyDefinition<T>- Returns:
- true if property has range-based constraints
-
getPropertyKey
Description copied from interface:PropertyDefinitionGet the property key.- Specified by:
getPropertyKeyin interfacePropertyDefinition<T>- Returns:
PropertyKeyor null if it's a custom property.
-
getName
public java.lang.String getName()Description copied from interface:PropertyDefinitionReturns the property name.- Specified by:
getNamein interfacePropertyDefinition<T>- Returns:
- the property name
-
getCcAlias
public java.lang.String getCcAlias()Description copied from interface:PropertyDefinitionReturns the property camel-case alias.- Specified by:
getCcAliasin interfacePropertyDefinition<T>- Returns:
- the property camel-case alias.
-
hasCcAlias
public boolean hasCcAlias()Description copied from interface:PropertyDefinitionReturns true if property has a camel-case alias.- Specified by:
hasCcAliasin interfacePropertyDefinition<T>- Returns:
- true if property has a camel-case alias.
-
getDefaultValue
Description copied from interface:PropertyDefinitionReturns the default value.- Specified by:
getDefaultValuein interfacePropertyDefinition<T>- Returns:
- default value
-
setDefaultValue
-
isRuntimeModifiable
public boolean isRuntimeModifiable()Description copied from interface:PropertyDefinitionMay the property be changed after initialization.- Specified by:
isRuntimeModifiablein 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:PropertyDefinitionReturns the property description. Used for documentation.- Specified by:
getDescriptionin interfacePropertyDefinition<T>- Returns:
- property description
-
setDescription
public void setDescription(java.lang.String description) -
getSinceVersion
public java.lang.String getSinceVersion()Description copied from interface:PropertyDefinitionReturns the driver version where the property was introduced first. Used for documentation.- Specified by:
getSinceVersionin 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:PropertyDefinitionReturns the property category.- Specified by:
getCategoryin interfacePropertyDefinition<T>- Returns:
- property category
-
setCategory
public void setCategory(java.lang.String category) -
getOrder
public int getOrder()Description copied from interface:PropertyDefinitionReturns the property order. Used as preferred property position in properties table in documentation.- Specified by:
getOrderin interfacePropertyDefinition<T>- Returns:
- property order
-
setOrder
public void setOrder(int order) -
getAllowableValues
public java.lang.String[] getAllowableValues()Description copied from interface:PropertyDefinitionReturns the list of allowable values.- Specified by:
getAllowableValuesin interfacePropertyDefinition<T>- Returns:
- the list of allowable values
-
getLowerBound
public int getLowerBound()Description copied from interface:PropertyDefinitionThe lowest possible value of range-based property- Specified by:
getLowerBoundin 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:PropertyDefinitionThe highest possible value of range-based property- Specified by:
getUpperBoundin interfacePropertyDefinition<T>- Returns:
- the highest possible value of range-based property
-
setUpperBound
public void setUpperBound(int upperBound) -
parseObject
Description copied from interface:PropertyDefinitionReturns the value object parsed from it's string representation and checked against allowable values.- Specified by:
parseObjectin interfacePropertyDefinition<T>- Parameters:
value- valueexceptionInterceptor- exception interceptor- Returns:
- the value object
-