Spring Data Couchbase

org.springframework.data.couchbase.core.convert
Class CouchbaseDocumentPropertyAccessor

java.lang.Object
  extended by org.springframework.context.expression.MapAccessor
      extended by org.springframework.data.couchbase.core.convert.CouchbaseDocumentPropertyAccessor
All Implemented Interfaces:
PropertyAccessor

public class CouchbaseDocumentPropertyAccessor
extends MapAccessor

A property accessor for document properties.

Author:
Michael Nitschinger

Constructor Summary
CouchbaseDocumentPropertyAccessor()
           
 
Method Summary
 boolean canRead(EvaluationContext context, Object target, String name)
          It can always read from those properties.
 Class<?>[] getSpecificTargetClasses()
          Returns the target classes of the properties.
 TypedValue read(EvaluationContext context, Object target, String name)
          Read the value from the property.
 
Methods inherited from class org.springframework.context.expression.MapAccessor
canWrite, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CouchbaseDocumentPropertyAccessor

public CouchbaseDocumentPropertyAccessor()
Method Detail

getSpecificTargetClasses

public Class<?>[] getSpecificTargetClasses()
Returns the target classes of the properties.

Specified by:
getSpecificTargetClasses in interface PropertyAccessor
Overrides:
getSpecificTargetClasses in class MapAccessor
Returns:

canRead

public boolean canRead(EvaluationContext context,
                       Object target,
                       String name)
It can always read from those properties.

Specified by:
canRead in interface PropertyAccessor
Overrides:
canRead in class MapAccessor
Parameters:
context - the evaluation context.
target - the target object.
name - the name of the property.
Returns:
always true.

read

public TypedValue read(EvaluationContext context,
                       Object target,
                       String name)
Read the value from the property.

Specified by:
read in interface PropertyAccessor
Overrides:
read in class MapAccessor
Parameters:
context - the evaluation context.
target - the target object.
name - the name of the property.
Returns:
the typed value of the content to be read.

Spring Data Couchbase

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.