Package org.bson.codecs
Class BsonTypeClassMap
- java.lang.Object
-
- org.bson.codecs.BsonTypeClassMap
-
@Deprecated(since="2022-10-31") public class BsonTypeClassMap extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A map from a BSON types to the Class to which it should be decoded. This class is useful if, for example, you want to change the default decoding of BSON DATE to something besides
java.util.Date
.The default mappings are:
- DOCUMENT:
org.bson.Document.class
- ARRAY:
java.util.List.class
- DATE_TIME:
java.util.Date.class
- BOOLEAN:
java.lang.Boolean.class
- DOUBLE:
java.lang.Double.class
- INT32:
java.lang.Integer.class
- INT64:
java.lang.Long.class
- DECIMAL128:
org.bson.types.Decimal128.class
- STRING:
java.lang.String.class
- BINARY:
org.bson.types.Binary.class
- OBJECT_ID:
org.bson.types.ObjectId.class
- REGULAR_EXPRESSION:
org.bson.types.RegularExpression.class
- SYMBOL:
org.bson.types.Symbol.class
- DB_POINTER:
org.bson.types.DBPointer.class
- MAX_KEY:
org.bson.types.MaxKey.class
- MIN_KEY:
org.bson.types.MinKey.class
- JAVASCRIPT:
org.bson.types.Code.class
- JAVASCRIPT_WITH_SCOPE:
org.bson.types.CodeWithScope.class
- TIMESTAMP:
org.bson.types.BSONTimestamp.class
- UNDEFINED:
org.bson.types.Undefined.class
- Since:
- 3.0
- DOCUMENT:
-
-
Constructor Summary
Constructors Constructor Description BsonTypeClassMap()
Deprecated.Construct an instance with the default mappings.BsonTypeClassMap(java.util.Map<BsonType,java.lang.Class<?>> replacementsForDefaults)
Deprecated.Construct an instance with the default mapping, but replacing the default mapping with any values contained in the given map.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Deprecated.java.lang.Class<?>
get(BsonType bsonType)
Deprecated.Gets the Class that is mapped to the given BSON type.int
hashCode()
Deprecated.
-
-
-
Constructor Detail
-
BsonTypeClassMap
public BsonTypeClassMap(java.util.Map<BsonType,java.lang.Class<?>> replacementsForDefaults)
Deprecated.Construct an instance with the default mapping, but replacing the default mapping with any values contained in the given map. This allows a caller to easily replace a single or a few mappings, while leaving the rest at their default values.- Parameters:
replacementsForDefaults
- the replacement mappings
-
BsonTypeClassMap
public BsonTypeClassMap()
Deprecated.Construct an instance with the default mappings.
-
-
Method Detail
-
get
public java.lang.Class<?> get(BsonType bsonType)
Deprecated.Gets the Class that is mapped to the given BSON type.- Parameters:
bsonType
- the BSON type- Returns:
- the Class that is mapped to the BSON type
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
-