Interface RelationshipHandler

All Known Implementing Classes:
OneToManyHandler, OneToOneHandler

public interface RelationshipHandler
Strategy for adding relationship fix and clear logic.
  • Field Details

  • Method Details

    • addFix

      void addFix(ModelDescriptor md, FieldDescriptor fd, com.squareup.javapoet.MethodSpec.Builder fix, com.squareup.javapoet.ClassName entityType)
      Adds the fix logic for a relationship field.
      Parameters:
      md - the model descriptor
      fd - the field descriptor
      fix - the method spec builder to add fix logic to
      entityType - the class name of the entity type
    • addClear

      void addClear(ModelDescriptor md, FieldDescriptor fd, com.squareup.javapoet.MethodSpec.Builder clear, com.squareup.javapoet.ClassName entityType)
      Adds the clear logic for a relationship field.
      Parameters:
      md - the model descriptor
      fd - the field descriptor
      clear - the method spec builder to add clear logic to
      entityType - the class name of the entity type
    • getRelationshipFieldName

      default String getRelationshipFieldName(FieldDescriptor fd)
    • getInverseRelationshipFieldName

      default String getInverseRelationshipFieldName(FieldDescriptor fd, ModelDescriptor md)