com.vaadin.addon.jpacontainer.metadata
Class PersistentPropertyMetadata

java.lang.Object
  extended by com.vaadin.addon.jpacontainer.metadata.PropertyMetadata
      extended by com.vaadin.addon.jpacontainer.metadata.PersistentPropertyMetadata
All Implemented Interfaces:
Serializable

public class PersistentPropertyMetadata
extends PropertyMetadata

An extended version of PropertyMetadata that provides additional information about persistent properties.

Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)
See Also:
Serialized Form

Nested Class Summary
static class PersistentPropertyMetadata.AccessType
          Enumeration defining the property access types.
 
Field Summary
protected  Class<?> fieldDeclaringClass
           
protected  String fieldName
           
 
Fields inherited from class com.vaadin.addon.jpacontainer.metadata.PropertyMetadata
getterDeclaringClass, getterName, setterDeclaringClass, setterName
 
Method Summary
 boolean equals(Object obj)
           
 PersistentPropertyMetadata.AccessType getAccessType()
          The way the property value is accessed (as a JavaBean property or as a field).
<T extends Annotation>
T
getAnnotation(Class<T> annotationClass)
          Gets the annotation of the specified annotation class, if available.
 Annotation[] getAnnotations()
          The annotations of the property, if any.
 PropertyKind getPropertyKind()
          The kind of the property.
 ClassMetadata<?> getTypeMetadata()
          The metadata of the property type, if it is embedded or a reference.
 int hashCode()
           
 boolean isWritable()
          Persistent properties are always writable.
 Object readResolve()
           
 
Methods inherited from class com.vaadin.addon.jpacontainer.metadata.PropertyMetadata
getName, getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldName

protected final String fieldName

fieldDeclaringClass

protected final Class<?> fieldDeclaringClass
Method Detail

getTypeMetadata

public ClassMetadata<?> getTypeMetadata()
The metadata of the property type, if it is embedded or a reference. Otherwise, this method returns null.

See Also:
getPropertyKind()

getPropertyKind

public PropertyKind getPropertyKind()
The kind of the property.

Overrides:
getPropertyKind in class PropertyMetadata

getAccessType

public PersistentPropertyMetadata.AccessType getAccessType()
The way the property value is accessed (as a JavaBean property or as a field).


getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
Description copied from class: PropertyMetadata
Gets the annotation of the specified annotation class, if available.

Overrides:
getAnnotation in class PropertyMetadata
Parameters:
annotationClass - the annotation class.
Returns:
the annotation, or null if not found.
See Also:
PropertyMetadata.getAnnotations(), Class.getAnnotation(java.lang.Class)

getAnnotations

public Annotation[] getAnnotations()
Description copied from class: PropertyMetadata
The annotations of the property, if any.

Overrides:
getAnnotations in class PropertyMetadata
See Also:
PropertyMetadata.getAnnotation(java.lang.Class)

readResolve

public Object readResolve()
                   throws ObjectStreamException
Overrides:
readResolve in class PropertyMetadata
Throws:
ObjectStreamException

isWritable

public boolean isWritable()
Persistent properties are always writable.

Returns whether the property is writable or not. Transient properties (i.e. JavaBean properties) are only writable if they have a setter method..

Overrides:
isWritable in class PropertyMetadata
Returns:
true if the property is writable, false if it is not.

equals

public boolean equals(Object obj)
Overrides:
equals in class PropertyMetadata

hashCode

public int hashCode()
Overrides:
hashCode in class PropertyMetadata


Copyright © 2013 Vaadin Ltd. All rights reserved.