com.vaadin.addon.jpacontainer.metadata
Class EntityClassMetadata<T>

java.lang.Object
  extended by com.vaadin.addon.jpacontainer.metadata.ClassMetadata<T>
      extended by com.vaadin.addon.jpacontainer.metadata.EntityClassMetadata<T>
All Implemented Interfaces:
Serializable

public class EntityClassMetadata<T>
extends ClassMetadata<T>

An extended version of ClassMetadata that provides additional information about classes annotated with the Entity annotation.

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

Method Summary
 boolean equals(Object obj)
           
 String getEntityName()
          The name of the entity.
 PersistentPropertyMetadata getIdentifierProperty()
          Gets the identifier property, if it exists.
 PersistentPropertyMetadata getVersionProperty()
          Gets the version property, if it exists.
 boolean hasEmbeddedIdentifier()
          If the entity has an embedded identifier.
 int hashCode()
           
 boolean hasIdentifierProperty()
          If the entity has an identifier property or not.
 boolean hasVersionProperty()
          If the entity has a version property or not.
 
Methods inherited from class com.vaadin.addon.jpacontainer.metadata.ClassMetadata
getGetterMethod, getMappedClass, getPersistentProperties, getPersistentPropertyNames, getProperties, getProperty, getPropertyNames, getPropertyValue, getPropertyValue, getSetterMethod, setPropertyValue, setPropertyValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getEntityName

public String getEntityName()
The name of the entity. If no explicit entity name has been given, this is the simple class name.


hasVersionProperty

public boolean hasVersionProperty()
If the entity has a version property or not.

See Also:
getVersionProperty()

getVersionProperty

public PersistentPropertyMetadata getVersionProperty()
Gets the version property, if it exists.

Returns:
the version property metadata, or null if not available.
See Also:
hasVersionProperty()

hasIdentifierProperty

public boolean hasIdentifierProperty()
If the entity has an identifier property or not.

See Also:
getIdentifierProperty(), hasEmbeddedIdentifier()

getIdentifierProperty

public PersistentPropertyMetadata getIdentifierProperty()
Gets the identifier property, if it exists. If hasEmbeddedIdentifier() returns true, this property is the embedded identifier.

Returns:
the identifier property metadata, or null if not available.
See Also:
hasIdentifierProperty(), hasEmbeddedIdentifier()

hasEmbeddedIdentifier

public boolean hasEmbeddedIdentifier()
If the entity has an embedded identifier. This property cannot be true unless hasIdentifierProperty() also returns true.


equals

public boolean equals(Object obj)
Overrides:
equals in class ClassMetadata<T>

hashCode

public int hashCode()
Overrides:
hashCode in class ClassMetadata<T>


Copyright © 2013 Vaadin Ltd. All rights reserved.