@Deprecated public class DBPointerElement extends AbstractElement
| Modifier and Type | Field and Description | 
|---|---|
static ElementType | 
TYPE
Deprecated.  
The BSON type for a Object Id. 
 | 
ELEMENT_TYPE| Constructor and Description | 
|---|
DBPointerElement(String name,
                String dbName,
                String collectionName,
                ObjectId id)
Deprecated.  
Constructs a new  
DBPointerElement. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
accept(Visitor visitor)
Deprecated.  
Accepts the visitor and calls the  
Visitor.visitDBPointer(java.lang.String, java.lang.String, java.lang.String, com.allanbank.mongodb.bson.element.ObjectId) method. | 
boolean | 
equals(Object object)
Deprecated.  
Determines if the passed object is of this same type as this object and
 if so that its fields are equal. 
 | 
String | 
getCollectionName()
Deprecated.  
Returns the collectionName value. 
 | 
String | 
getDatabaseName()
Deprecated.  
Returns the databaseName value. 
 | 
ObjectId | 
getId()
Deprecated.  
Returns the id value. 
 | 
ElementType | 
getType()
Deprecated.  
Returns the type for the BSON type. 
 | 
DocumentReference | 
getValueAsObject()
Deprecated.  
Returns the value for BSON element as a Java  
Object type. | 
int | 
hashCode()
Deprecated.  
Computes a reasonable hash code. 
 | 
DBPointerElement | 
withName(String name)
Deprecated.  
Creates a new element with the same type and value as this element but
 with the specified name. 
 | 
asElement, find, find, findFirst, findFirst, getName, getValueAsString, nullSafeEquals, queryPath, queryPath, toStringpublic static final ElementType TYPE
public DBPointerElement(String name, String dbName, String collectionName, ObjectId id)
DBPointerElement.name - The name for the BSON Object Id.dbName - The database name.collectionName - The name of the collection.id - The object id.IllegalArgumentException - If the name, dbName, collectionName,
             or id is null.public void accept(Visitor visitor)
Visitor.visitDBPointer(java.lang.String, java.lang.String, java.lang.String, com.allanbank.mongodb.bson.element.ObjectId) method.visitor - The visitor for the element.Element.accept(Visitor)public boolean equals(Object object)
equals in class AbstractElementobject - The object to compare to.Object.equals(java.lang.Object)public String getCollectionName()
public String getDatabaseName()
public ObjectId getId()
public ElementType getType()
public DocumentReference getValueAsObject()
Object type.
 
 Automatic conversion from the Object-ified value to an element is
 provided via the DocumentBuilder.add(String, Object) method. Not
 all element types will be successfully converted to the same element
 duing a Element-->Object value-->Element conversion. This cases are noted
 in the appropriate sub-type's JavaDoc.
 
 Sub-types will also overload this method with the appropriate type
 returned. e.g., The
 StringElement.getValueAsObject()
 method signature returns a String.
 
 Returns a DocumentReference.
 
Note: This value will not be recreated is a Object-->Element conversion. A more generic sub-document following the DBRef convention is created instead.
Object type.public int hashCode()
hashCode in class AbstractElementpublic DBPointerElement withName(String name)
 Returns a new DBPointerElement.
 
name - The new name for the element.Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.