// Find and retrieve a document by ID.
187145
func (col *Col) Read(id int) (doc map[string]interface{}, err error) {
	return col.read(id, true)
}
390544
func (s *DbSession) FindByRef(ref *mgo.DBRef, document Document) error {
	q := s.Session.DB(s.db.Config.DBName).FindRef(ref)
	if err := q.One(document); err != nil {
		if err.Error() != mgo.ErrNotFound.Error() {
			log.Printf("Error fetching %s. Error: %s\n", document.CollectionName(), err)
		}

		return err
	}
	return nil
}
302573
func (list *ScheduleList) Find(id string) *Schedule {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
790401
func (list *LinkList) Find(id string) *Link {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
279592
func (list *CustomerList) Find(id string) *Customer {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
984535
func (c *modelStateCollection) FindId(id interface{}) mongo.Query {
	if sid, ok := id.(string); ok {
		return c.WriteCollection.FindId(ensureModelUUID(c.modelUUID, sid))
	}
	return c.Find(bson.D{{"_id", id}})
}
674379
func (t *Tab) GetDocument() (*Element, error) {
	docEle, ok := t.getElement(t.GetTopNodeId())
	if !ok {
		return nil, &ElementNotFoundErr{Message: "top document node id not found."}
	}
	return docEle, nil
}
615009
func (templateApi *TemplateApi) Get(id string) (*Template, error) {
	data, err := templateApi.entityService.Get(id, map[string]string{})
	if err != nil {
		return nil, err
	}
	return parseTemplate(data), nil
}
869436
func (s *GetService) Id(id string) *GetService {
	s.id = id
	return s
}
349277
func (list *TokenList) Find(id string) *Token {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}
833623
func (c *Connection) Find(model interface{}, id interface{}) error {
	return Q(c).Find(model, id)
}
761687
func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) {
	return p.get(document, swag.DefaultJSONNameProvider)
}
1141085
func GetDocument() *js.Object {
	win := GetWindow()
	if win == nil || win == js.Undefined {
		return nil
	}
	return win.Get("document")
}
608484
func (cw collectionWrapper) FindId(id interface{}) Query {
	return queryWrapper{cw.Collection.FindId(id)}
}
1319956
func WhereID(docID ID) func(DocumentIndex, DocumentDecorator) ([]ID, error) {
	return func(idx DocumentIndex, _ DocumentDecorator) ([]ID, error) {
		return []ID{docID}, nil
	}
}
24685
func (i *indexImpl) Document(id string) (doc *document.Document, err error) {
	i.mutex.RLock()
	defer i.mutex.RUnlock()

	if !i.open {
		return nil, ErrorIndexClosed
	}
	indexReader, err := i.i.Reader()
	if err != nil {
		return nil, err
	}
	defer func() {
		if cerr := indexReader.Close(); err == nil && cerr != nil {
			err = cerr
		}
	}()

	doc, err = indexReader.Document(id)
	if err != nil {
		return nil, err
	}
	return doc, nil
}
721950
func (list *TransferList) Find(id string) *Transfer {
	for _, item := range list.Data {
		if item.ID == id {
			return item
		}
	}

	return nil
}