be.wegenenverkeer.atomium.server.jdbc

PgJdbcFeedStore

Related Doc: package jdbc

case class PgJdbcFeedStore[E](feedName: String, title: Option[String], entryTableName: String, ser: (E) ⇒ String, deser: (String) ⇒ E, url: Url) extends AbstractJdbcFeedStore[E] with PostgresDialect with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, PostgresDialect, Dialect, AbstractJdbcFeedStore[E], AbstractFeedStore[E, JdbcContext], FeedStore[E, JdbcContext], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. PgJdbcFeedStore
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. PostgresDialect
  7. Dialect
  8. AbstractJdbcFeedStore
  9. AbstractFeedStore
  10. FeedStore
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PgJdbcFeedStore(feedName: String, title: Option[String], entryTableName: String, ser: (E) ⇒ String, deser: (String) ⇒ E, url: Url)

Type Members

  1. case class FeedEntry(sequenceNr: Long, entry: Entry[E]) extends Product with Serializable

    Attributes
    protected
    Definition Classes
    AbstractFeedStore

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 addFeed(feed: FeedDbModel)(implicit jdbcContext: JdbcContext): Unit

    Add a feed definition to the feed table.

    Add a feed definition to the feed table.

    feed

    The feed to add.

    jdbcContext

    The JDBC context to use.

    returns

    The id for the newly added feed.

    Definition Classes
    PostgresDialectDialect
  5. def addFeedEntry(entryTableName: String, entryData: EntryDbModel)(implicit jdbcContext: JdbcContext): Unit

    Add an entry to an entry table.

    Add an entry to an entry table.

    entryTableName

    The name of the entry table.

    entryData

    The entry to add.

    jdbcContext

    The JDBC context to use.

    Definition Classes
    PostgresDialectDialect
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def close(): Unit

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is stopped.

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is stopped.

    Definition Classes
    FeedStore
  9. def createEntryTableIfNotExists(entryTableName: String)(implicit jdbcContext: JdbcContext): Unit

    Create an empty feed entry table with a given name.

    Create an empty feed entry table with a given name.

    entryTableName

    The entry table name.

    jdbcContext

    The JDBC context to use.

    Definition Classes
    Dialect
  10. def createEntryTableStatement(entryTableName: String): String

    entryTableName

    The entry table name.

    returns

    the sql statement for the Feed table.

    Definition Classes
    PostgresDialectDialect
  11. def createFeedTableIfNotExists(implicit jdbcContext: JdbcContext): Unit

    Create an empty feed table.

    Create an empty feed table.

    jdbcContext

    The JDBC context to use.

    Definition Classes
    Dialect
  12. def createFeedTableStatement: String

    returns

    the sql statement for the Feed table.

    Definition Classes
    PostgresDialectDialect
  13. def createTables(implicit context: JdbcContext): Unit

    Definition Classes
    AbstractJdbcFeedStore
  14. val deser: (String) ⇒ E

  15. def dropEntryTable(entryTableName: String)(implicit jdbcContext: JdbcContext): Unit

    Drop the entry table.

    Drop the entry table.

    Definition Classes
    PostgresDialectDialect
  16. def dropFeedTable(implicit jdbcContext: JdbcContext): Unit

    Drop the feed table.

    Drop the feed table.

    Definition Classes
    PostgresDialectDialect
  17. def dropTables(implicit context: JdbcContext): Unit

    Definition Classes
    AbstractJdbcFeedStore
  18. val entryTableName: String

    The table name for the feed entries, which has to be specified by subclasses.

    The table name for the feed entries, which has to be specified by subclasses.

    Definition Classes
    PgJdbcFeedStoreAbstractJdbcFeedStore
  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def feedLink(startId: Long, count: Int, forward: Boolean): Url

    Creates a link to a feed page.

    Creates a link to a feed page.

    startId

    the starting entry's id (non inclusive)

    count

    the number of entries in the page

    forward

    if true navigate to 'previous' elements in feed (towards head of feed) else navigate to 'next' elements in feed (towards last page of feed)

    returns

    the URL

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  21. val feedName: String

  22. def fetchEntryCountLowerThan(entryTableName: String, sequenceNo: Long, inclusive: Boolean)(implicit jdbcContext: JdbcContext): Long

    Fetch the number of entries with an id lower than a given sequence number.

    Fetch the number of entries with an id lower than a given sequence number.

    entryTableName

    The name of the entry table.

    inclusive

    Indicates whether the given sequence number should be included in the entry count or not.

    jdbcContext

    The JDBC context to use.

    returns

    The number of entries with an id lower than a given sequence number.

    Definition Classes
    PostgresDialectDialect
  23. def fetchFeed(feedName: String)(implicit jdbcContext: JdbcContext): Option[FeedDbModel]

    Fetch a feed model based on the feed name.

    Fetch a feed model based on the feed name.

    feedName

    The feed name.

    jdbcContext

    The JDBC context to use.

    returns

    A feed model wrapped in an option (None if there is no feed model with the given name).

    Definition Classes
    PostgresDialectDialect
  24. def fetchFeedEntries(entryTableName: String, start: Long, count: Int, ascending: Boolean)(implicit jdbcContext: JdbcContext): List[EntryDbModel]

    Fetch entries from an entry table starting at a given index and entry count.

    Fetch entries from an entry table starting at a given index and entry count.

    entryTableName

    The name of the entry table.

    start

    The index of the first entry to fetch.

    count

    The max number of entries to fetch.

    ascending

    The direction of the search: ascending or descending indexes.

    jdbcContext

    The JDBC context to use.

    returns

    An entry list.

    Definition Classes
    PostgresDialectDialect
  25. def fetchMaxEntryId(entryTableName: String)(implicit jdbcContext: JdbcContext): Long

    Fetch the largest entry ID from the database.

    Fetch the largest entry ID from the database.

    entryTableName

    The name of the entry table.

    jdbcContext

    The JDBC context to use.

    returns

    The largest entry id for a given entry table, or -1 if the entry table is empty.

    Definition Classes
    PostgresDialectDialect
  26. def fetchMostRecentFeedEntries(entryTableName: String, count: Int)(implicit jdbcContext: JdbcContext): List[EntryDbModel]

    Fetch the most recent feed entries from an entry table.

    Fetch the most recent feed entries from an entry table.

    entryTableName

    The name of the entry table.

    count

    The max number of entries to fetch.

    jdbcContext

    The JDBC context to use.

    returns

    An entry list.

    Definition Classes
    PostgresDialectDialect
  27. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def generateEntryID(): String

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  29. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  30. def getFeed(start: Long, pageSize: Int, forward: Boolean)(implicit context: JdbcContext): Option[Feed[E]]

    Retrieves a page of the feed.

    Retrieves a page of the feed.

    start

    the starting entry (exclusive), should not be returned in the feed page

    pageSize

    the number of entries

    forward

    if true navigate to 'previous' elements in feed (towards head of feed) else navigate to 'next' elements in feed (towards last page of feed)

    returns

    the feed page or None if the page is not found

    Definition Classes
    AbstractFeedStoreFeedStore
  31. def getFeedEntries(start: Long, count: Int, ascending: Boolean)(implicit context: JdbcContext): List[FeedEntry]

    Retrieves entries with their sequence numbers from the feed

    Retrieves entries with their sequence numbers from the feed

    start

    the starting entry (inclusive), MUST be returned in the entries

    count

    the number of entries to return

    ascending

    if true return entries with sequence numbers >= start in ascending order else return entries with sequence numbers <= start in descending order

    returns

    the corresponding entries sorted accordingly

    Definition Classes
    AbstractJdbcFeedStoreAbstractFeedStore
  32. def getHeadOfFeed(pageSize: Int)(implicit context: JdbcContext): Option[Feed[E]]

    Retrieves the head of the feed.

    Retrieves the head of the feed. This is the first page containing the most recent entries

    pageSize

    the maximum number of feed entries to return. The page could contain less entries

    returns

    the head of the feed

    Definition Classes
    AbstractFeedStoreFeedStore
  33. def getMostRecentFeedEntries(count: Int)(implicit context: JdbcContext): List[FeedEntry]

    Retrieves the most recent entries from the feedstore sorted in descending order

    Retrieves the most recent entries from the feedstore sorted in descending order

    count

    the amount of recent entries to return

    returns

    a list of FeedEntries. a FeedEntry is a sequence number and its corresponding entry and sorted by descending sequence number

    Definition Classes
    AbstractJdbcFeedStoreAbstractFeedStore
  34. def getNextLink(id: Long, count: Int, next: Option[Long]): Option[Link]

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  35. def getNumberOfEntriesLowerThan(sequenceNo: Long, inclusive: Boolean)(implicit context: JdbcContext): Long

    sequenceNo

    sequence number to match

    inclusive

    if true include the specified sequence number

    returns

    the number of entries in the feed with sequence number lower than specified

    Definition Classes
    AbstractJdbcFeedStoreAbstractFeedStore
  36. def getPreviousLink(id: Long, count: Int, previous: Option[Long]): Option[Link]

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  37. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  38. def link(l: String, start: Long, pageSize: Int, forward: Boolean): Link

    Attributes
    protected
    Definition Classes
    AbstractFeedStore
  39. def maxId(implicit context: JdbcContext): Long

    returns

    The maximum sequence number used in this feed or minId if feed is empty.

    Definition Classes
    AbstractJdbcFeedStoreAbstractFeedStore
  40. def minId(implicit context: JdbcContext): Long

    returns

    one less than the minimum sequence number used in this feed

    Definition Classes
    AbstractJdbcFeedStoreAbstractFeedStore
  41. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  44. def open(): Unit

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is started.

    This method is called when the be.wegenenverkeer.atomium.server.FeedService is started. This can be used as a hook (to check consistency, for example)

    Definition Classes
    FeedStore
  45. def push(uuid: String, entry: E)(implicit context: JdbcContext): Unit

    Definition Classes
    AbstractJdbcFeedStoreFeedStore
  46. def push(entries: Iterable[E])(implicit context: JdbcContext): Unit

    push a list of entries to the feed

    push a list of entries to the feed

    entries

    the entries to push to the feed

    Definition Classes
    AbstractJdbcFeedStoreFeedStore
  47. def push(entry: E)(implicit context: JdbcContext): Unit

    push a single entry to the feed

    push a single entry to the feed

    entry

    the entry to push to the feed

    Definition Classes
    FeedStore
  48. val ser: (E) ⇒ String

  49. def sqlQuery[T](sql: String, maxRows: Option[Int], factory: (ResultSet) ⇒ T)(implicit jdbcContext: JdbcContext): List[T]

    Helper function to execute an SQL query.

    Helper function to execute an SQL query.

    sql

    The SQL query to execute.

    maxRows

    The maximum number of rows to return (only the first maxRows rows are returned).

    jdbcContext

    The JDBC context to use.

    returns

    The result set resulting from executing the query.

    Attributes
    protected
    Definition Classes
    Dialect
  50. def sqlUpdate(sql: String)(implicit jdbcContext: JdbcContext): Int

    Helper function to execute an SQL update statement.

    Helper function to execute an SQL update statement.

    sql

    The SQL update.

    jdbcContext

    The JDBC context to use.

    returns

    The number of rows affected by the update.

    Attributes
    protected
    Definition Classes
    Dialect
  51. def sqlUpdatePepared(sql: String, data: Any*)(implicit jdbcContext: JdbcContext): Int

    Helper function to execute a prepared SQL update statement.

    Helper function to execute a prepared SQL update statement.

    sql

    The prepared SQL update statement containing ? placeholders where data has to be filled in.

    data

    The data to fill into the ? placeholders of the prepared SQL update statement.

    jdbcContext

    The JDBC context to use.

    returns

    The number of rows affected by the update.

    Attributes
    protected
    Definition Classes
    Dialect
  52. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  53. val title: Option[String]

  54. val url: Url

  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from PostgresDialect

Inherited from Dialect

Inherited from AbstractJdbcFeedStore[E]

Inherited from AbstractFeedStore[E, JdbcContext]

Inherited from FeedStore[E, JdbcContext]

Inherited from AnyRef

Inherited from Any

Ungrouped