public interface Relation extends ModelElement
| Modifier and Type | Method and Description |
|---|---|
AccessScope |
getAccessScope()
Gets the access scope for generated methods.
|
List<String> |
getAnnotations()
list of annotations.
|
Attribute |
getAttribute()
Gets the associated attribute.
|
String |
getClassName()
Gets the name of the related class.
|
String |
getComment()
Gets the comment.
|
Attribute |
getCountAttribute()
Returns the attribute that holds the number of elements of a 1:N relation.
Applies only to composite non-reversed list relations. If set, this column gets the number of elements in the list when the PDO is persisted. |
String |
getDeclaredJavaType(boolean withinForeignEntity)
Gets the declared java type of the relation.
|
Relation |
getDefiningNmRelation()
Gets the relation of the entity defining the nm-relation.
|
Entity |
getEntity()
Gets the entity this relation belongs to.
|
Attribute |
getForeignAttribute()
Gets the foreign attribute.
|
Entity |
getForeignEntity()
Gets the related entity.
|
Relation |
getForeignRelation()
Gets the foreign (opposite) relation.
|
String |
getGetterName()
Gets the getter method name.
|
String |
getGetterSetterComment()
Gets the comment line for getter and setter.
|
String |
getJavaType()
Gets the effective java type of the relation.
|
String |
getLinkMethodIndex()
Returns the optional link method index parameter.
|
String |
getLinkMethodName()
Gets the name for the link method.
|
List<MethodArgument> |
getMethodArgs()
Gets the effective method arguments for select- and delete-methods.
|
String |
getMethodName()
Gets the name-part for select- and delete-methods.
|
String |
getMethodNameSuffix()
Gets the suffix to be used in methodnames.
|
String |
getNmMethodName()
Same as
getMethodName() but for nm relation. |
String |
getNmName()
Gets the name of the nm-relation.
|
Relation |
getNmRelation()
Gets the N:M relation of the foreign entity.
|
RelationType |
getRelationType()
Gets the relation type.
|
SelectionType |
getSelectionType()
Gets the selection type.
|
String |
getSelectionWurbletArguments()
Gets the optional wurblet arguments.
Only available for composite list relations. |
String |
getSetterName()
Gets the setter method name.
|
String |
getVariableName()
Gets the variable name.
|
boolean |
isClearOnRemoteSave()
Returns whether the relation should be cleared before save.
Used for non-composite serialized relations that should not be transmitted to the server. |
boolean |
isComposite()
Returns whether the relation points to components of a composite.
|
boolean |
isDeepReference()
Returns whether this relation is a deep reference.
Deep references point to components of another composite entity. |
boolean |
isDeletionCascaded()
Returns whether deletion is cascaded to elements in lists.
|
boolean |
isDeletionFromMainClass()
Returns whether delete method is invoked on main class instead of relation class.
|
boolean |
isProcessed()
Returns whether a process-method is invoked after initialization, select and before save.
The method has the same name as the getter with "get" replaced by "process" and must be provided by the application. This flag applies to composite relations only. |
boolean |
isReadOnly()
Returns whether the relation is read only.
|
boolean |
isReferenced()
Returns whether the parent object is referenced by a variable.
|
boolean |
isReversed()
Returns whether this is list relation with only one element.
A.k.a. |
boolean |
isSelectionCached()
Returns whether the select method is a caching one.
|
boolean |
isSerialized()
Returns whether the relation is serialized.
Used for non-composite relations to make them non-transient. |
boolean |
isTracked()
Returns whether the modification state of the relation is available.
|
boolean |
isWriteOnly()
Returns whether the relation is write-only.
|
void |
validate()
Validates the relation.
|
getName, getParent, getSourceInfoEntity getEntity()
Entity getForeignEntity()
Attribute getAttribute()
Attribute getForeignAttribute()
Relation getForeignRelation()
Relation getNmRelation()
Relation getDefiningNmRelation()
String getComment()
String getClassName()
AccessScope getAccessScope()
RelationType getRelationType()
boolean isComposite()
boolean isTracked()
boolean isReferenced()
boolean isProcessed()
boolean isReadOnly()
boolean isWriteOnly()
boolean isSerialized()
boolean isClearOnRemoteSave()
boolean isReversed()
Attribute getCountAttribute()
SelectionType getSelectionType()
boolean isSelectionCached()
String getSelectionWurbletArguments()
boolean isDeletionFromMainClass()
boolean isDeletionCascaded()
String getLinkMethodName()
String getLinkMethodIndex()
String getMethodName()
List<MethodArgument> getMethodArgs()
String getNmName()
String getNmMethodName()
getMethodName() but for nm relation.void validate()
throws ModelException
ModelException - if validation failedString getVariableName()
String getMethodNameSuffix()
Example:
"set" + getMethodNameSuffix() would return "setBlah" if the classname is "Blah" or the name is "blah".
String getGetterName()
String getSetterName()
String getGetterSetterComment()
String getDeclaredJavaType(boolean withinForeignEntity)
withinForeignEntity - true if we need the type from within the foreign entity,
else from within the relation's entityString getJavaType()
Example: the effective type is ArrayList and the declared type is List.
boolean isDeepReference()
Tentackle - a domain driven enterprise framework