Top Description Methods
org.eclipse.persistence.annotations

public @Interface Property

extends Annotation
Annotations
@Target:METHOD, FIELD, TYPE
@Retention:RUNTIME
@Repeatable:Properties
Imports
java.lang.annotation.Retention, .Target, .Repeatable

Annotation for a user defined property. A single Property may be specified directly on a mapped attribute or its get/set method. Multiple Properties should be wrapped into Properties annotation. Property may be assigned to either a mapped attribute (or its get/set method) within Entity, MappedSuperclass and Embeddable class; or to Entity, MappedSuperclass and Embeddable class. In case orm xml is used Property an Properties annotations specified on mapped attributes are ignored, specified on a class are merged with the ones specified in orm xml with the latter taking precedence in case of conflicts. Properties defined in MappedSuperclass are passed to all inheriting Entities and MappedSuperclasses. In case of a conflict property value defined directly on a class always overrides the value passed from class's parent.
Author
Andrei Ilitchev
Since
EclipseLink 1.0
See Also
jakarta.persistence.Embeddable, jakarta.persistence.Entity, jakarta.persistence.Id, jakarta.persistence.Basic, jakarta.persistence.ManyToMany, jakarta.persistence.ManyToOne, jakarta.persistence.MappedSuperclass, jakarta.persistence.OneToMany, jakarta.persistence.OneToOne, org.eclipse.persistence.annotations.BasicCollection, org.eclipse.persistence.annotations.BasicMap, org.eclipse.persistence.annotations.Properties, org.eclipse.persistence.annotations.Transformation, org.eclipse.persistence.annotations.VariableOneToOne

Method Summary

Modifier and TypeMethod and Description
public String
name()

Property name.

public String
value()

String representation of Property value, converted to an instance of valueType.

public Class<?>
valueType()

Property value type.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

nameback to summary
public String name()

Property name.

valueback to summary
public String value()

String representation of Property value, converted to an instance of valueType.

valueTypeback to summary
public Class<?> valueType()

Property value type. The value converted to valueType by ConversionManager. If specified must be a simple type that could be handled by ConversionManager: numerical, boolean, temporal.