com.atomizesoftware.spin.data.repositories.DocumentRepositoryComponent

DocumentRepositoryImpl

class DocumentRepositoryImpl extends DocumentRepository

Implements functions related to com.atomizesoftware.spin.models.Document and its related entities: com.atomizesoftware.spin.models.DocumentType

Linear Supertypes
DocumentRepository, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DocumentRepositoryImpl
  2. DocumentRepository
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DocumentRepositoryImpl()

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def allDocumentTypes(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[DocumentType]

  5. def allDocuments(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[Document]

  6. def allSuppliers(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[Supplier]

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def associateDocumentTo(documentId: Long, associateId: Long, associateName: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Try[Long]

    Inserts a new document association into the database.

    Inserts a new document association into the database.

    returns

    a Long representing the Id of the created association.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def deleteDocument(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

  11. def deleteDocumentType(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

  12. def deleteSupplier(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

  13. def documentFileWithId(id: Long, references: String = "")(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[DocumentFile]

  14. def documentFileWithId(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[DocumentFile]

  15. def documentTotalCountForFilters(filter: String, filterOr: String, search: String, references: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Long

    Gets the number of records that correspond to the complex select statement.

    Gets the number of records that correspond to the complex select statement.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  16. def documentTypeTotalCountForFilters(filter: String, filterOr: String, search: String, references: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Long

    Gets the number of records that correspond to the complex select statement.

    Gets the number of records that correspond to the complex select statement.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  17. def documentTypeWithCode(code: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session): DocumentType

    Gets a Document Type by the provided code

    Gets a Document Type by the provided code

    returns

    a com.atomizesoftware.spin.models.DocumentType if one is found

    Definition Classes
    DocumentRepositoryImplDocumentRepository
    Exceptions thrown
    InternalErrorException

    if document type was found.

  18. def documentTypeWithId(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[DocumentType]

  19. def documentTypesForSync(syncTimestamp: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): List[DocumentType]

    Gets all the document types that were modified after the syncTimestamp provided.

    Gets all the document types that were modified after the syncTimestamp provided.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  20. def documentWithFilesOfId(id: Long, references: String = "", filter: String = "")(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[Document]

    Returns the document with the specified Id along with the files that are associated with it.

    Returns the document with the specified Id along with the files that are associated with it.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  21. def documentWithId(id: Long, references: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[Document]

  22. def documentWithId(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[Document]

  23. def documentsAndTotalCountForFilters(references: String, filter: String, filterOr: String, search: String, sortBy: String, timeZoneId: String, limit: Int, offset: Int, associations: List[String] = List())(implicit s: scala.slick.jdbc.JdbcBackend.Session): (List[Document], Long)

    Returns a tuple with the list of equipments that pertain to the selection filters and the total number of matching records that were found.

    Returns a tuple with the list of equipments that pertain to the selection filters and the total number of matching records that were found.

    If no limit was imposed in the selection filters, we do not make another query to get the total number of records, as they were already returned.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  24. def documentsAssociatedWith(id: Long, entityName: String, associations: List[String] = List(), references: String = "", filter: String = "", filterOr: String = "", orderBy: String = "", timeZoneId: String = "", limit: Int = 0, offset: Int = 0)(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[Document]

    Returns a list of documents that are associated with the entity with the specified id.

    Returns a list of documents that are associated with the entity with the specified id.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  25. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  27. def filteredDocumentTypes(references: String, filter: String, filterOr: String, search: String, sortBy: String, timeZoneId: String, limit: Int, offset: Int)(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[DocumentType]

    Gets a list of com.atomizesoftware.spin.models.DocumentType with the requested filters.

    Gets a list of com.atomizesoftware.spin.models.DocumentType with the requested filters.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  28. def filteredDocuments(references: String, filter: String, filterOr: String, search: String, sortBy: String, timeZoneId: String, limit: Int, offset: Int, associations: List[String] = List())(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[Document]

    Gets a list of com.atomizesoftware.spin.models.Document with the requested filters.

    Gets a list of com.atomizesoftware.spin.models.Document with the requested filters.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  29. def filteredSuppliers(references: String, filter: String, filterOr: String, search: String, sortBy: String, timeZoneId: String, limit: Int, offset: Int)(implicit s: scala.slick.jdbc.JdbcBackend.Session): List[Supplier]

    Gets a list of com.atomizesoftware.spin.models.Supplier with the requested filters.

    Gets a list of com.atomizesoftware.spin.models.Supplier with the requested filters.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  30. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  32. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  33. def insertDocument(document: Document)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Try[Document]

    Inserts a document into the database and returns it with the id it received.

    Inserts a document into the database and returns it with the id it received.

    returns

    Success with the new document if successful, Failure with an exception otherwise.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  34. def insertDocumentType(typ: DocumentType)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Try[DocumentType]

    Inserts a document type into the database.

    Inserts a document type into the database.

    returns

    Success with the new document type if sucessful, Failure with an exception otherwise.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  35. def insertSupplier(supplier: Supplier)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Option[Long]

  36. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  37. val logger: Logger

  38. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. def supplierTotalCountForFilters(filter: String, filterOr: String, search: String, references: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Long

    Gets the number of records that correspond to the complex select statement.

    Gets the number of records that correspond to the complex select statement.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  42. def supplierWithId(id: Long)(implicit s: scala.slick.jdbc.JdbcBackend.Session): Option[Supplier]

  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. def unlinkDocumentFrom(documentId: Long, associateId: Long, associateName: String)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Deletes a document association from the database.

    Deletes a document association from the database.

    returns

    a Boolean representing if the operation was successful or not.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  46. def updateDocument(document: Document)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates a com.atomizesoftware.spin.models.Document

  47. def updateDocumentFile(docFile: DocumentFile)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates a com.atomizesoftware.spin.models.DocumentFile

    Updates a com.atomizesoftware.spin.models.DocumentFile

    If fields are specified, only those are updated, otherwise the whole entity is updated.

    docFile

    to update

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  48. def updateDocumentFiles(document: Document)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates the Document Files associations and moves the files to the respective dirs accordingly.

    Updates the Document Files associations and moves the files to the respective dirs accordingly.

    returns

    true if all changes were successfully executed, false otherwise.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  49. def updateDocumentType(typ: DocumentType)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates a com.atomizesoftware.spin.models.DocumentType

    Updates a com.atomizesoftware.spin.models.DocumentType

    If fields are specified, only those are updated, otherwise the whole entity is updated.

    typ

    to update

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  50. def updateDocuments(documents: List[Document])(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates several documents taking into account the fields that have been chosen to be updated.

    Updates several documents taking into account the fields that have been chosen to be updated.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  51. def updateSupplier(supplier: Supplier)(implicit s: scala.slick.jdbc.JdbcBackend.Session, currentUser: AuthenticatedUser): Boolean

    Updates a com.atomizesoftware.spin.models.Supplier

    Updates a com.atomizesoftware.spin.models.Supplier

    If fields are specified, only those are updated, otherwise the whole entity is updated.

    supplier

    to update

    Definition Classes
    DocumentRepositoryImplDocumentRepository
  52. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def createFile(stream: ByteArrayOutputStream, fileName: String): (String, String)

    Creates a file through the ByteArrayOutputStream that was provided

    Creates a file through the ByteArrayOutputStream that was provided

    returns

    the fileName and filePath of the file created

    Definition Classes
    DocumentRepositoryImplDocumentRepository
    Annotations
    @deprecated
    Deprecated

    (Since version 2016-03-18) Use File Storage Manager instead to create files

  2. def createFile(fileParam: FileItem): (String, String)

    Creates a file that was uploaded and is to be attached to a document.

    Creates a file that was uploaded and is to be attached to a document.

    returns

    the fileName and filePath of the file created.

    Definition Classes
    DocumentRepositoryImplDocumentRepository
    Annotations
    @deprecated
    Deprecated

    (Since version 2016-03-18) Use File Storage Manager instead to create files

Inherited from DocumentRepository

Inherited from AnyRef

Inherited from Any

Ungrouped