Errai 3.0.1-SNAPSHOT

org.jboss.errai.jpa.client.local
Interface ErraiAttribute<X,Y>

Type Parameters:
X - The type containing the represented attribute
Y - The type of the represented attribute
All Superinterfaces:
javax.persistence.metamodel.Attribute<X,Y>
All Known Subinterfaces:
ErraiPluralAttribute<X,C,E>, ErraiSingularAttribute<X,T>

public interface ErraiAttribute<X,Y>
extends javax.persistence.metamodel.Attribute<X,Y>

Extends the JPA Attribute interface with methods required by Errai persistence but missing from the JPA metamodel. Most importantly, this interface provides methods for reading and writing the attribute value.

Author:
Jonathan Fuerth

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Attribute
javax.persistence.metamodel.Attribute.PersistentAttributeType
 
Method Summary
 boolean cascades(javax.persistence.CascadeType cascadeType)
          Returns true if this attribute cascades the given type of operation.
 Y get(X entityInstance)
          Retrieves the value of this attribute from the given entity instance.
 void set(X entityInstance, Y value)
          Sets the value of this attribute on the given entity instance.
 String toString()
          Returns the type of this attribute, its owning entity type, and the attribute's name.
 
Methods inherited from interface javax.persistence.metamodel.Attribute
getDeclaringType, getJavaType, getName, getPersistentAttributeType, isAssociation, isCollection
 

Method Detail

cascades

boolean cascades(javax.persistence.CascadeType cascadeType)
Returns true if this attribute cascades the given type of operation.

Returns:
true if operations of type cascadeType should be cascaded to this attribute from its owning entity.

get

Y get(X entityInstance)
Retrieves the value of this attribute from the given entity instance.

Parameters:
entityInstance - The entity to retrieve the entity value from. The type of this argument must be assignable to the declaring entity's type (returned by Attribute.getDeclaringType()).
Returns:
The value of this attribute on the given entity instance.

set

void set(X entityInstance,
         Y value)
Sets the value of this attribute on the given entity instance.

Parameters:
entityInstance - The entity to set this attribute value on. The type of this argument must be assignable to the declaring entity's type (returned by Attribute.getDeclaringType()).
value - The value to set the attribute to.

toString

String toString()
Returns the type of this attribute, its owning entity type, and the attribute's name.

Overrides:
toString in class Object

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.