public class SetField extends CollectionField
For example, an Order-LineItem link would have the Order contain a "set" of Orders.
Limited support for collection mapping is provided. This reflects the pragmatic goals of the tool 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 @OneToMany annotation or in the case of enums, an @ElementCollection annotation will be created.
comment| Constructor and Description |
|---|
SetField(String physicalTypeIdentifier,
org.springframework.roo.model.JavaType fieldType,
org.springframework.roo.model.JavaSymbolName fieldName,
org.springframework.roo.model.JavaType genericParameterTypeName,
Cardinality cardinality,
Cascade[] cascadeType,
boolean isDto)
Constructor for SetField
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionaAnnotation(AnnotationMetadataBuilder annotationBuilder) |
void |
decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations) |
Fetch |
getFetch() |
org.springframework.roo.model.JavaType |
getInitializer() |
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,
String referencedColumn)
Add @JoinColumn annotation to field
|
void |
setMappedBy(org.springframework.roo.model.JavaSymbolName mappedBy) |
void |
setOrphanRemoval(Boolean orphanRemoval) |
getGenericParameterTypeName, getSizeMax, getSizeMin, setGenericParameterTypeName, setSizeMax, setSizeMinaddAnnotations, getAnnotations, getColumn, getComment, getFieldName, getFieldType, getInitedAnnotations, getModifiers, getPhysicalTypeIdentifier, getValue, isNotNull, isNullRequired, isUnique, setAnnotations, setColumn, setComment, setModifiers, setNotNull, setNullRequired, setUnique, setValuepublic SetField(String physicalTypeIdentifier, org.springframework.roo.model.JavaType fieldType, org.springframework.roo.model.JavaSymbolName fieldName, org.springframework.roo.model.JavaType genericParameterTypeName, Cardinality cardinality, Cascade[] cascadeType, boolean isDto)
physicalTypeIdentifier - fieldType - fieldName - genericParameterTypeName - cardinality - cascadeType - isDto - whether target class is a DTOpublic void decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations)
decorateAnnotationsList in class CollectionFieldpublic Fetch getFetch()
public org.springframework.roo.model.JavaType getInitializer()
getInitializer in class CollectionFieldpublic void addAdditionaAnnotation(AnnotationMetadataBuilder annotationBuilder)
public org.springframework.roo.model.JavaSymbolName getMappedBy()
public Boolean getOrphanRemoval()
public void setFetch(Fetch fetch)
public void setMappedBy(org.springframework.roo.model.JavaSymbolName mappedBy)
public void setOrphanRemoval(Boolean orphanRemoval)
public void setJoinColumn(String joinColumn, String referencedColumn)
joinColumn - referencedColumn - 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–2018 Pivotal Software, Inc.. All rights reserved.