     return
 
 
-  getPaginationInfo: ->
+  getPaginationInfo : ->
     return {
-      firstPage: 0
-      lastPage: @_lastPageIndex()
-      currentPage: @state.currentPage
-      pageSize: @state.pageSize
+      firstPage : 0
+      lastPage : @_lastPageIndex()
+      currentPage : @state.currentPage
+      pageSize : @state.pageSize
     }
 
 
-  getPreviousPage: ->
+  getPreviousPage : ->
     @getPage(@state.currentPage - 1)
     return
 
 
-  getNextPage: ->
+  getNextPage : ->
     @getPage(@state.currentPage + 1)
     return
 
 
-  getFirstPage: ->
+  getFirstPage : ->
     @getPage(0)
     return
 
 
-  getLastPage: ->
+  getLastPage : ->
     @getPage(@_lastPageIndex())
     return
 
 
-  getPage: (pageIndex) ->
+  getPage : (pageIndex) ->
     if 0 <= pageIndex < Math.ceil(@currentModels.length / @state.pageSize)
       @state.currentPage = pageIndex
       @_reset()
     return
 
-  toJSON: ->
+  toJSON : ->
     @models.map((model) -> model.toJSON())
 
 
+  findWhere : ->
+
+    return @fullCollection.findWhere.apply(@fullCollection, arguments)
+
+
 module.exports = PaginationCollection

    return


  at: (index) ->
    return @currentModels[index]

  get: (index) ->
    return @at(index)

  clone: ->
    clonedCollection = new PaginationCollection(null, {
      fullCollection: @fullCollection
    })
    clonedCollection.setPageSize(@state.pageSize)
    return clonedCollection


  _lastPageIndex: ->
    return Math.ceil(@currentModels.length / @state.pageSize) - 1

  _passthroughEvent: (eventType) ->
    return (args...) ->
      @_reset()
      @trigger(eventType, args...)
      return

  _resetModels: ->
    models = @fullCollection.models.slice()

    if @state.filter?

    @listenTo(@fullCollection, "sync", @_passthroughEvent("sync"))


  add : ->
    @fullCollection.add.apply(@fullCollection, arguments)

  remove : ->
    @fullCollection.remove.apply(@fullCollection, arguments)

  set : ->
    @fullCollection.set.apply(@fullCollection, arguments)

  fetch : ->
    @fullCollection.fetch.apply(@fullCollection, arguments)

  create : ->
    @fullCollection.create.apply(@fullCollection, arguments)

  reset : ->
    @fullCollection.reset.apply(@fullCollection, arguments)


  setPageSize : (pageSize) ->
    @state.pageSize = pageSize
    @_reset()
    return


  setSorting : (field, order) ->
    @setSort(field, order)
    return


  setSort : (field, order) ->

    if order == "asc"
      order = 1
