@ApplicationScoped public class ApplicationResources extends Object
| Constructor and Description |
|---|
ApplicationResources() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildStatements()
Prepares the statements from BoundStatements and put them into a cache, for later consumption.
|
com.datastax.driver.core.BoundStatement |
getBoundStatement(BoundStatements statement)
Retrieves a new BoundStatement based on the BoundStatements's enum item name.
|
com.datastax.driver.core.BoundStatement |
produceStatementByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
CDI producer for @NamedStatement annotations.
|
void |
setSession(com.datastax.driver.core.Session session)
Non-CDI consumers can use this to set the session before retrieving BoundStatements.
|
@PostConstruct public void buildStatements()
@Produces public com.datastax.driver.core.BoundStatement produceStatementByName(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
injectionPoint - the injection point of where the annotation ispublic com.datastax.driver.core.BoundStatement getBoundStatement(BoundStatements statement)
statement - the statement's entry on the enumpublic void setSession(com.datastax.driver.core.Session session)
session - the session to use when preparing the statementsCopyright © 2015–2016 Red Hat, Inc.. All rights reserved.