- java.lang.Object
-
- com.legyver.utils.mapqua.mapbacked.MapBackedProperty<java.lang.Integer>
-
- com.legyver.utils.mapqua.mapbacked.MapBackedInteger
-
public class MapBackedInteger extends MapBackedProperty<java.lang.Integer>
An Integer variable that can be represented as a key-value pair in the POJO internal Map
-
-
Field Summary
-
Fields inherited from class com.legyver.utils.mapqua.mapbacked.MapBackedProperty
property, sourceMap, valueIfMissing
-
-
Constructor Summary
Constructors Constructor Description MapBackedInteger(java.util.Map sourceMap, java.lang.String property)Construct a MapBackedInteger with a certain property name.MapBackedInteger(java.util.Map sourceMap, java.lang.String property, java.lang.Integer valueIfMissing)Construct a MapBackedInteger with a certain property name and default value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<java.lang.Integer>queryOption()Hook to allow the Integer to be queryable-
Methods inherited from class com.legyver.utils.mapqua.mapbacked.MapBackedProperty
get, set
-
-
-
-
Constructor Detail
-
MapBackedInteger
public MapBackedInteger(java.util.Map sourceMap, java.lang.String property, java.lang.Integer valueIfMissing)Construct a MapBackedInteger with a certain property name and default value- Parameters:
sourceMap- Map to store the Integer value inproperty- Key name of the propertyvalueIfMissing- value to set if missing
-
MapBackedInteger
public MapBackedInteger(java.util.Map sourceMap, java.lang.String property)Construct a MapBackedInteger with a certain property name. The default value will be 0.- Parameters:
sourceMap- Map to store the Integer value inproperty- Key name of the property
-
-
Method Detail
-
queryOption
protected java.util.Optional<java.lang.Integer> queryOption() throws com.legyver.core.exception.CoreExceptionHook to allow the Integer to be queryable- Specified by:
queryOptionin classMapBackedProperty<java.lang.Integer>- Returns:
- the query option to use for the Integer
- Throws:
com.legyver.core.exception.CoreException- if there is a problem marshalling to/from JSON
-
-