Module com.speedment.common.codegen
Interface HasParent<P,T extends HasParent<P,T>>
-
- Type Parameters:
P- the model type of the parentT- the extending type
- All Known Subinterfaces:
Class,ClassOrInterface<T>,Constructor,Enum,EnumConstant,Field,Import,Initializer,Interface,InterfaceField,InterfaceMethod,Javadoc,LicenseTerm,Method
public interface HasParent<P,T extends HasParent<P,T>>Trait for all models that has a parent. Models that are designed to be reused typically don't have a parent.If the model implementing this trait also implements
HasCopy, then the parent property will not be copied whenHasCopy.copy()is invoked.- Since:
- 2.5
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<P>getParent()Returns the parent model if one exists, otherwise an emptyOptional.TsetParent(P parent)Sets the parent of this model.
-