|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.couchbase.config.AbstractCouchbaseConfiguration
@Configuration public abstract class AbstractCouchbaseConfiguration
Base class for Spring Data Couchbase configuration using JavaConfig.
| Constructor Summary | |
|---|---|
AbstractCouchbaseConfiguration()
|
|
| Method Summary | |
|---|---|
protected boolean |
abbreviateFieldNames()
Set to true if field names should be abbreviated with the CamelCaseAbbreviatingFieldNamingStrategy. |
protected abstract List<String> |
bootstrapHosts()
The list of hostnames (or IP addresses to bootstrap from). |
com.couchbase.client.CouchbaseClient |
couchbaseClient()
Return the CouchbaseClient instance to connect to. |
protected String |
couchbaseLogger()
Specifies the logger to use (defaults to SLF4J). |
CouchbaseMappingContext |
couchbaseMappingContext()
Creates a CouchbaseMappingContext equipped with entity classes scanned from the mapping base package. |
CouchbaseTemplate |
couchbaseTemplate()
Creates a CouchbaseTemplate. |
CustomConversions |
customConversions()
Register custom Converters in a CustomConversions object if required. |
protected FieldNamingStrategy |
fieldNamingStrategy()
Configures a FieldNamingStrategy on the CouchbaseMappingContext instance created. |
protected abstract String |
getBucketName()
The name of the bucket to connect to. |
protected abstract String |
getBucketPassword()
The password of the bucket (can be an empty string). |
protected Set<Class<?>> |
getInitialEntitySet()
Scans the mapping base package for classes annotated with Document. |
protected String |
getMappingBasePackage()
Return the base package to scan for mapped Documents. |
MappingCouchbaseConverter |
mappingCouchbaseConverter()
Creates a MappingCouchbaseConverter using the configured couchbaseMappingContext(). |
TranslationService |
translationService()
Creates a TranslationService. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCouchbaseConfiguration()
| Method Detail |
|---|
protected abstract List<String> bootstrapHosts()
protected abstract String getBucketName()
protected abstract String getBucketPassword()
@Bean(destroyMethod="shutdown")
public com.couchbase.client.CouchbaseClient couchbaseClient()
throws Exception
CouchbaseClient instance to connect to.
Exception - on Bean construction failure.protected String couchbaseLogger()
@Bean
public CouchbaseTemplate couchbaseTemplate()
throws Exception
CouchbaseTemplate.
Exception - on Bean construction failure.
@Bean
public MappingCouchbaseConverter mappingCouchbaseConverter()
throws Exception
MappingCouchbaseConverter using the configured couchbaseMappingContext().
Exception - on Bean construction failure.@Bean public TranslationService translationService()
TranslationService.
@Bean
public CouchbaseMappingContext couchbaseMappingContext()
throws Exception
CouchbaseMappingContext equipped with entity classes scanned from the mapping base package.
Exception - on Bean construction failure.@Bean public CustomConversions customConversions()
CustomConversions object if required. These
CustomConversions will be registered with the mappingCouchbaseConverter() and
couchbaseMappingContext(). Returns an empty CustomConversions instance by default.
protected Set<Class<?>> getInitialEntitySet()
throws ClassNotFoundException
Document.
ClassNotFoundException - if intial entity sets could not be loaded.protected String getMappingBasePackage()
Documents. Will return the package name of the configuration
class (the concrete class, not this one here) by default.
So if you have a com.acme.AppConfig extending AbstractCouchbaseConfiguration the base package
will be considered com.acme unless the method is overridden to implement alternate behavior.
Document classes or null to not enable scanning for
entities.protected boolean abbreviateFieldNames()
CamelCaseAbbreviatingFieldNamingStrategy.
protected FieldNamingStrategy fieldNamingStrategy()
FieldNamingStrategy on the CouchbaseMappingContext instance created.
|
Spring Data Couchbase | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||