public enum NoOpDbRefResolver extends Enum<NoOpDbRefResolver> implements DbRefResolver
DBRef resolver throwing
UnsupportedOperationException when attempting to resolve database references.| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
List<org.bson.Document> |
bulkFetch(List<com.mongodb.DBRef> dbRefs)
Loads a given
List of DBRefs from the datasource in one batch. |
org.bson.Document |
fetch(com.mongodb.DBRef dbRef)
Actually loads the
DBRef from the datasource. |
Object |
resolveDbRef(MongoPersistentProperty property,
com.mongodb.DBRef dbref,
DbRefResolverCallback callback,
DbRefProxyHandler proxyHandler)
Resolves the given
DBRef into an object of the given MongoPersistentProperty's type. |
static NoOpDbRefResolver |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NoOpDbRefResolver[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfcreateDbRefpublic static final NoOpDbRefResolver INSTANCE
public static NoOpDbRefResolver[] values()
for (NoOpDbRefResolver c : NoOpDbRefResolver.values()) System.out.println(c);
public static NoOpDbRefResolver valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nullable public Object resolveDbRef(MongoPersistentProperty property, @Nullable com.mongodb.DBRef dbref, DbRefResolverCallback callback, DbRefProxyHandler proxyHandler)
DbRefResolverDBRef into an object of the given MongoPersistentProperty's type. The method
might return a proxy object for the DBRef or resolve it immediately. In both cases the
DbRefResolverCallback will be used to obtain the actual backing object.resolveDbRef in interface DbRefResolverproperty - will never be null.dbref - the DBRef to resolve.callback - will never be null.@Nullable public org.bson.Document fetch(com.mongodb.DBRef dbRef)
DbRefResolverDBRef from the datasource.fetch in interface DbRefResolverdbRef - must not be null.public List<org.bson.Document> bulkFetch(List<com.mongodb.DBRef> dbRefs)
DbRefResolverList of DBRefs from the datasource in one batch. The resulting List of
Document will reflect the ordering of the DBRef passed in.DBRef elements in the list must not reference different collections.bulkFetch in interface DbRefResolverdbRefs - must not be null.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.