static Watch forDocument ( DocumentReference documentReference ) { Target . Builder target = Target . newBuilder ( ) ; target . getDocumentsBuilder ( ) . addDocuments ( documentReference . getName ( ) ) ; target . setTargetId ( WATCH_TARGET_ID ) ; return new Watch ( ( FirestoreImpl ) documentReference . getFirestore ( ) , documentReference . getParent ( ) , target . build ( ) ) ; }
Creates a new Watch instance that listens on DocumentReferences .