Class ReflectionBasedPropertyMetadata
java.lang.Object
com.couchbase.client.java.repository.mapping.ReflectionBasedPropertyMetadata
- All Implemented Interfaces:
PropertyMetadata
public class ReflectionBasedPropertyMetadata extends Object implements PropertyMetadata
The property metadata implementation based on java reflection.
- Since:
- 2.2.0
-
Constructor Summary
Constructors Constructor Description ReflectionBasedPropertyMetadata(Field fieldReference) -
Method Summary
Modifier and Type Method Description StringencryptionProviderName()Get the encryption crypto algorithm provider name setObjectget(Object source)Returns the content of the field property.booleanisField()If this property represents a field in the Document.booleanisId()If this property represents the Document ID.Stringname()The name of the field inside the document.StringrealName()The name of the actual property inside the java entity.voidset(Object value, Object source)Sets the content of the field property.Class<?>type()The type of the field property.
-
Constructor Details
-
ReflectionBasedPropertyMetadata
-
-
Method Details
-
isId
public boolean isId()Description copied from interface:PropertyMetadataIf this property represents the Document ID.- Specified by:
isIdin interfacePropertyMetadata- Returns:
- true if it does, false otherwise.
-
isField
public boolean isField()Description copied from interface:PropertyMetadataIf this property represents a field in the Document.- Specified by:
isFieldin interfacePropertyMetadata- Returns:
- true if it does, false otherwise.
-
encryptionProviderName
Description copied from interface:PropertyMetadataGet the encryption crypto algorithm provider name set- Specified by:
encryptionProviderNamein interfacePropertyMetadata- Returns:
- the crypto provider name
-
name
Description copied from interface:PropertyMetadataThe name of the field inside the document. If an alias is used, it is reflected in here. If the raw field name in the entity is needed, usePropertyMetadata.realName().- Specified by:
namein interfacePropertyMetadata- Returns:
- the name of the field.
-
realName
Description copied from interface:PropertyMetadataThe name of the actual property inside the java entity.- Specified by:
realNamein interfacePropertyMetadata- Returns:
- the real field name.
-
type
Description copied from interface:PropertyMetadataThe type of the field property.- Specified by:
typein interfacePropertyMetadata- Returns:
- the type.
-
get
Description copied from interface:PropertyMetadataReturns the content of the field property.- Specified by:
getin interfacePropertyMetadata- Parameters:
source- the source object.- Returns:
- the content of the field.
-
set
Description copied from interface:PropertyMetadataSets the content of the field property.- Specified by:
setin interfacePropertyMetadata- Parameters:
value- the value to set.source- the source object.
-