Interface RelationshipHandler
- All Known Implementing Classes:
OneToManyHandler,OneToOneHandler
public interface RelationshipHandler
Strategy for adding relationship fix and clear logic.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClear(ModelDescriptor md, FieldDescriptor fd, com.squareup.javapoet.MethodSpec.Builder clear, com.squareup.javapoet.ClassName entityType) Adds the clear logic for a relationship field.voidaddFix(ModelDescriptor md, FieldDescriptor fd, com.squareup.javapoet.MethodSpec.Builder fix, com.squareup.javapoet.ClassName entityType) Adds the fix logic for a relationship field.default Stringdefault String
-
Field Details
-
RELATIONSHIP_FIELD_SUFFIX
- See Also:
-
-
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 descriptorfd- the field descriptorfix- the method spec builder to add fix logic toentityType- 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 descriptorfd- the field descriptorclear- the method spec builder to add clear logic toentityType- the class name of the entity type
-
getRelationshipFieldName
-
getInverseRelationshipFieldName
-