public class JDBCRatingDAOBuilder extends Object
JDBCRatingDAO.newBuilder()
.public String getTableName()
public JDBCRatingDAOBuilder setTableName(String table)
public String getUserColumn()
public JDBCRatingDAOBuilder setUserColumn(@Nonnull String col)
public String getItemColumn()
public JDBCRatingDAOBuilder setItemColumn(@Nonnull String col)
public String getRatingColumn()
public JDBCRatingDAOBuilder setRatingColumn(@Nonnull String col)
public String getTimestampColumn()
public JDBCRatingDAOBuilder setTimestampColumn(@Nullable String col)
public boolean isCloseWhenClosed()
public JDBCRatingDAOBuilder setCloseWhenClosed(boolean close)
close
- true
to close the database connection with the DAO, false
to
leave it open.public JDBCRatingDAOBuilder setStatementFactory(SQLStatementFactory fac)
fac
- The statement factory.public SQLStatementFactory getStatementFactory()
public JDBCRatingDAOBuilder setCacheBuilder(CacheBuilder<? super QueryKey,Object> cb)
cb
- The cache builder.public JDBCRatingDAOBuilder setCacheBuilder(CacheBuilderSpec spec)
spec
- A cache builder spec.public JDBCRatingDAOBuilder setCacheBuilder(String spec)
spec
- A cache builder spec.public JDBCRatingDAOBuilder setCache(Cache<QueryKey,Object> cache)
setCacheBuilder(com.google.common.cache.CacheBuilder)
.cache
- The cache to use.public JDBCRatingDAO build(Connection con)
con
- The database connection.con
.