RelationshipHolder

public class RelationshipHolder extends FieldHolder

The main purpose of this class is to find out how cascade should be used for the given field with relationship type.

Constructors

RelationshipHolder

public RelationshipHolder(Field field)

RelationshipHolder

public RelationshipHolder(FieldDto fieldDto)

RelationshipHolder

public RelationshipHolder(ClassData data, FieldDto field)

RelationshipHolder

public RelationshipHolder(ClassData data, Field field)

Methods

getCollectionClassName

public String getCollectionClassName()

getFieldName

public String getFieldName()

getRelatedClass

public String getRelatedClass()

getRelatedField

public String getRelatedField()

hasUnresolvedRelation

public boolean hasUnresolvedRelation()

If this returns true, it means that either: the relation is uni-directional or the relation is bi-directional, and we should expect related class to define which fields are related

Returns:true if relation is uni-directional or bi-directional without defined related field; false otherwise

isBiDirectional

public boolean isBiDirectional()

isCascadeDelete

public boolean isCascadeDelete()

isCascadePersist

public boolean isCascadePersist()

isCascadeUpdate

public boolean isCascadeUpdate()

isListManyToMany

public boolean isListManyToMany()

isManyToMany

public boolean isManyToMany()

isManyToOne

public boolean isManyToOne()

isOneToMany

public boolean isOneToMany()

isOneToOne

public boolean isOneToOne()

isOwningSide

public boolean isOwningSide()

isSetManyToMany

public boolean isSetManyToMany()

setFieldName

public void setFieldName(String fieldName)