sealed abstract class BSONObjectID extends BSONValue
BSON ObjectId value.
import scala.util.Try import reactivemongo.api.bson.BSONObjectID val oid: BSONObjectID = BSONObjectID.generate() def foo: Try[BSONObjectID] = BSONObjectID.parse(oid.stringify)
| Timestamp (seconds) | Machine identifier | Thread identifier | Increment
| --- | --- | --- | ---
| 4 bytes | 3 bytes | 2 bytes | 3 bytes
- Alphabetic
- By Inheritance
- BSONObjectID
- BSONValue
- AnyRef
- Any
- by valueProducer
- by identityValueProducer
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from BSONObjectID to any2stringadd[BSONObjectID] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (BSONObjectID, B)
- Implicit
- This member is added by an implicit conversion from BSONObjectID to ArrowAssoc[BSONObjectID] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
asOpt[T](implicit reader: BSONReader[T]): Option[T]
Optionally parses this value as a
T
one.Optionally parses this value as a
T
one.- returns
Some
successfully parsed value, orNone
if failsimport reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Option[String] = v.asOpt[String]
- Definition Classes
- BSONValue
- Annotations
- @inline()
-
final
def
asTry[T](implicit reader: BSONReader[T]): Try[T]
Tries to parse this value as a
T
one.Tries to parse this value as a
T
one.import scala.util.Try import reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Try[String] = v.asTry[String]
- Definition Classes
- BSONValue
-
final
def
byteArray: Array[Byte]
Returns the whole binary content as array.
-
val
byteCode: Byte
The code indicating the BSON type for this value as Byte
The code indicating the BSON type for this value as Byte
- Definition Classes
- BSONObjectID → BSONValue
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
val
code: Int
The code indicating the BSON type for this value
The code indicating the BSON type for this value
- Definition Classes
- BSONObjectID → BSONValue
-
def
ensuring(cond: (BSONObjectID) ⇒ Boolean, msg: ⇒ Any): BSONObjectID
- Implicit
- This member is added by an implicit conversion from BSONObjectID to Ensuring[BSONObjectID] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (BSONObjectID) ⇒ Boolean): BSONObjectID
- Implicit
- This member is added by an implicit conversion from BSONObjectID to Ensuring[BSONObjectID] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): BSONObjectID
- Implicit
- This member is added by an implicit conversion from BSONObjectID to Ensuring[BSONObjectID] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): BSONObjectID
- Implicit
- This member is added by an implicit conversion from BSONObjectID to Ensuring[BSONObjectID] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(that: Any): Boolean
- Definition Classes
- BSONObjectID → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from BSONObjectID to StringFormat[BSONObjectID] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
lazy val
hashCode: Int
- Definition Classes
- BSONObjectID → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
lazy val
stringify: String
The hexadecimal String representation.
The hexadecimal String representation.
import reactivemongo.api.bson.BSONObjectID def foo(oid: BSONObjectID): scala.util.Try[BSONObjectID] = { val repr: String = oid.stringify BSONObjectID.parse(repr) }
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
time: Long
The time of this BSONObjectId, in milliseconds
The time of this BSONObjectId, in milliseconds
- Annotations
- @inline()
-
def
toString(): String
- Definition Classes
- BSONObjectID → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
→[B](y: B): (BSONObjectID, B)
- Implicit
- This member is added by an implicit conversion from BSONObjectID to ArrowAssoc[BSONObjectID] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc