Record Class BulkOperationContext.TypedNamespace
java.lang.Object
java.lang.Record
org.springframework.data.mongodb.core.bulk.BulkOperationContext.TypedNamespace
- Record Components:
type- target domain type for mapping queries and updates; used to derive collection name when collection is null; may be null.database- target database; use null for the configured default database.collectionName- target collection name; may be null.
- Enclosing interface:
BulkOperationContext
public static record BulkOperationContext.TypedNamespace(@Nullable Class<?> type, @Nullable String database, @Nullable CollectionName collectionName)
extends Record
Value object holding namespace (database and collection) information and an optional domain type used for mapping
bulk operations.
NOTE: Provide at least either type or collection. An explicit collection name takes precedence over the collection name derived from type.
- Since:
- 5.1
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorsConstructorDescriptionTypedNamespace(@Nullable Class<?> type, @Nullable String database, @Nullable CollectionName collectionName) Creates an instance of aTypedNamespacerecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable CollectionNameReturns the value of thecollectionNamerecord component.@Nullable Stringdatabase()Returns the value of thedatabaserecord component.final booleanIndicates whether some other object is "equal to" this one.Class<?> booleanfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.@Nullable Class<?> type()Returns the value of thetyperecord component.
-
Constructor Details
-
TypedNamespace
public TypedNamespace(@Nullable Class<?> type, @Nullable String database, @Nullable CollectionName collectionName) Creates an instance of aTypedNamespacerecord class.- Parameters:
type- the value for thetyperecord componentdatabase- the value for thedatabaserecord componentcollectionName- the value for thecollectionNamerecord component
-
-
Method Details
-
hasCollectionName
public boolean hasCollectionName() -
getRequiredCollectionName
-
getDomainType
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
database
-
collectionName
Returns the value of thecollectionNamerecord component.- Returns:
- the value of the
collectionNamerecord component
-