org.apache.sling.nosql.couchbase.client

## Class CouchbaseKey

- java.lang.Object
- - org.apache.sling.nosql.couchbase.client.CouchbaseKey

    public final class CouchbaseKey
    extends Object

Builds couchbase keys. Cuts them off and replaces the remaining part with a hash if too long.

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `build(String key, String keyPrefix)` Builds a key for a couchbase document with the given prefix that does not exceed the max. length for couchbase keys.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### build

    public static String build(String key,
                               String keyPrefix)

Builds a key for a couchbase document with the given prefix that does not exceed the max. length for couchbase keys.

Parameters:
  `key` - Full key
  `keyPrefix` - Prefix to add before the key
Returns:
  Valid key for couchbase