org.springframework.roo.classpath.operations.jsr303
Class ReferenceField

java.lang.Object
  extended by org.springframework.roo.classpath.operations.jsr303.FieldDetails
      extended by org.springframework.roo.classpath.operations.jsr303.ReferenceField

public class ReferenceField
extends FieldDetails

Properties used by the many-to-one side of a relationship (called a "reference").

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.

Since:
1.0
Author:
Ben Alex

Field Summary
 
Fields inherited from class org.springframework.roo.classpath.operations.jsr303.FieldDetails
comment
 
Constructor Summary
ReferenceField(String physicalTypeIdentifier, org.springframework.roo.model.JavaType fieldType, org.springframework.roo.model.JavaSymbolName fieldName, Cardinality cardinality)
           
 
Method Summary
 void decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations)
           
 Fetch getFetch()
           
 String getJoinColumnName()
           
 String getReferencedColumnName()
           
 void setFetch(Fetch fetch)
           
 void setJoinColumnName(String joinColumnName)
           
 void setReferencedColumnName(String referencedColumnName)
           
 
Methods inherited from class org.springframework.roo.classpath.operations.jsr303.FieldDetails
getAnnotations, getColumn, getComment, getFieldName, getFieldType, getInitedAnnotations, getModifiers, getPhysicalTypeIdentifier, getValue, isNotNull, isNullRequired, isUnique, setAnnotations, setColumn, setComment, setModifiers, setNotNull, setNullRequired, setUnique, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceField

public ReferenceField(String physicalTypeIdentifier,
                      org.springframework.roo.model.JavaType fieldType,
                      org.springframework.roo.model.JavaSymbolName fieldName,
                      Cardinality cardinality)
Method Detail

decorateAnnotationsList

public void decorateAnnotationsList(List<AnnotationMetadataBuilder> annotations)
Overrides:
decorateAnnotationsList in class FieldDetails

getFetch

public Fetch getFetch()

getJoinColumnName

public String getJoinColumnName()

getReferencedColumnName

public String getReferencedColumnName()

setFetch

public void setFetch(Fetch fetch)

setJoinColumnName

public void setJoinColumnName(String joinColumnName)

setReferencedColumnName

public void setReferencedColumnName(String referencedColumnName)


Copyright © 2009–2015. All rights reserved.