public class ReferenceField extends FieldDetails
For example, an Order-LineItem link would have the LineItem contain a "reference" back to Order.
Limited support for collection mapping is provided. This reflects the pragmatic goals of ROO and the fact a user can edit the generated files by hand anyway.
This field is intended for use with JSR 220 and will create a @ManyToOne and @JoinColumn annotation.
comment| Constructor and Description |
|---|
ReferenceField(String physicalTypeIdentifier,
org.springframework.roo.model.JavaType fieldType,
org.springframework.roo.model.JavaSymbolName fieldName,
Cardinality cardinality,
Cascade[] cascadeType) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionaAnnotation(AnnotationMetadataBuilder annotationBuilder) |
void |
decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations) |
Fetch |
getFetch() |
org.springframework.roo.model.JavaSymbolName |
getMappedBy() |
Boolean |
getOrphanRemoval() |
void |
setFetch(Fetch fetch) |
void |
setJoinAnnotations(String joinTableName,
String[] joinColumns,
String[] referencedColumns,
String[] inverseJoinColumns,
String[] inverseReferencedColumns)
Fill
#joinTableAttributes for building @JoinTable annotation. |
void |
setJoinColumn(String joinColumn)
Add @JoinColumn annotation to field
|
void |
setJoinColumn(String joinColumn,
String referencedColumn)
Add @JoinColumn annotation to field
|
void |
setMappedBy(org.springframework.roo.model.JavaSymbolName mappedBy) |
void |
setOrphanRemoval(Boolean orphanRemoval) |
addAnnotations, getAnnotations, getColumn, getComment, getFieldName, getFieldType, getInitedAnnotations, getModifiers, getPhysicalTypeIdentifier, getValue, isNotNull, isNullRequired, isUnique, setAnnotations, setColumn, setComment, setModifiers, setNotNull, setNullRequired, setUnique, setValuepublic ReferenceField(String physicalTypeIdentifier, org.springframework.roo.model.JavaType fieldType, org.springframework.roo.model.JavaSymbolName fieldName, Cardinality cardinality, Cascade[] cascadeType)
public void decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations)
decorateAnnotationsList in class FieldDetailspublic Fetch getFetch()
public org.springframework.roo.model.JavaSymbolName getMappedBy()
public Boolean getOrphanRemoval()
public void setFetch(Fetch fetch)
public void setOrphanRemoval(Boolean orphanRemoval)
public void setMappedBy(org.springframework.roo.model.JavaSymbolName mappedBy)
public void setJoinColumn(String joinColumn, String referencedColumn)
joinColumn - referencedColumn - public void setJoinColumn(String joinColumn)
joinColumn - public void addAdditionaAnnotation(AnnotationMetadataBuilder annotationBuilder)
public void setJoinAnnotations(String joinTableName, String[] joinColumns, String[] referencedColumns, String[] inverseJoinColumns, String[] inverseReferencedColumns)
#joinTableAttributes for building @JoinTable annotation. The annotation
would have some nested @JoinColumn annotations in each of its "joinColumns" and
"inverseJoinColumns" attributes.joinTableName - joinColumns - referencedColumns - inverseJoinColumns - inverseReferencedColumns - Copyright © 2009–2016. All rights reserved.