Interface Relation

    • Method Detail

      • getEntity

        Entity getEntity()
        Gets the entity this relation belongs to.
        Returns:
        the entity
      • getForeignEntity

        Entity getForeignEntity()
        Gets the related entity.
        Returns:
        the foreign entity
      • getAttribute

        Attribute getAttribute()
        Gets the associated attribute.
        Returns:
        the attribute, null if ID of foreign entity
      • getForeignAttribute

        Attribute getForeignAttribute()
        Gets the foreign attribute.
        Returns:
        the attribute, null if ID of this entity
      • getForeignRelation

        Relation getForeignRelation()
        Gets the foreign (opposite) relation.
        Returns:
        the foreign relation, null if no such relation
      • getNmRelation

        Relation getNmRelation()
        Gets the N:M relation of the foreign entity.
        Returns:
        the nm-relation, null if this is no nm-relation
      • getDefiningNmRelation

        Relation getDefiningNmRelation()
        Gets the relation of the entity defining the nm-relation.
        Returns:
        the defining relation
      • getComment

        java.lang.String getComment()
        Gets the comment.
        Returns:
        the comment
      • getClassName

        java.lang.String getClassName()
        Gets the name of the related class.
        Returns:
        the classname
      • getAccessScope

        AccessScope getAccessScope()
        Gets the access scope for generated methods.
        Returns:
        the scope
      • getAnnotations

        java.util.List<java.lang.String> getAnnotations()
        list of annotations.
        Returns:
        the annotations
      • getRelationType

        RelationType getRelationType()
        Gets the relation type.
        Returns:
        list or object
      • isComposite

        boolean isComposite()
        Returns whether the relation points to components of a composite.
        Returns:
        true if composite relation
      • isTracked

        boolean isTracked()
        Returns whether the modification state of the relation is available.
        Returns:
        true if tracked object or tracked list
      • isReferenced

        boolean isReferenced()
        Returns whether the parent object is referenced by a variable.
        Returns:
        true if referenced
      • isProcessed

        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.
        Returns:
        true if processed
      • isReadOnly

        boolean isReadOnly()
        Returns whether the relation is read only.
        Returns:
        true if no setter method
      • isWriteOnly

        boolean isWriteOnly()
        Returns whether the relation is write-only.
        Returns:
        true if no getter method
      • isSerialized

        boolean isSerialized()
        Returns whether the relation is serialized.
        Used for non-composite relations to make them non-transient.
        Returns:
        true if serialized, false if transient
      • isClearOnRemoteSave

        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.
        Returns:
        true if transient on save
      • isReversed

        boolean isReversed()
        Returns whether this is list relation with only one element.
        A.k.a. reversed 1:1 object relation.
        Returns:
        true if reversed
      • isShallow

        boolean isShallow()
        Returns whether the relation should be skipped in snapshot and copy operations.
        Returns:
        true if skip this relation, false to include (default)
      • isImmutable

        boolean isImmutable()
        Returns whether the relation should be set to immutable after loading.
        Returns:
        true if immutable
      • getCountAttribute

        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. This avoids an initial select when the list is accessed the first time and the list is empty.
        Returns:
        the counter attribute, null if none
      • getSelectionType

        SelectionType getSelectionType()
        Gets the selection type.
        Returns:
        the selection tupe
      • isSelectionCached

        boolean isSelectionCached()
        Returns whether the select method is a caching one.
        Returns:
        true if cached
      • getSelectionWurbletArguments

        java.lang.String getSelectionWurbletArguments()
        Gets the optional wurblet arguments.
        Only available for composite list relations.
        Returns:
        the extra wurblet args
      • isDeletionFromMainClass

        boolean isDeletionFromMainClass()
        Returns whether delete method is invoked on main class instead of relation class.
        Returns:
        true if delete from main class
      • isDeletionCascaded

        boolean isDeletionCascaded()
        Returns whether deletion is cascaded to elements in lists.
        Returns:
        true if cascaded
      • getLinkMethodName

        java.lang.String getLinkMethodName()
        Gets the name for the link method.
        Returns:
        the link method, null if default
      • getLinkMethodIndex

        java.lang.String getLinkMethodIndex()
        Returns the optional link method index parameter.
        Returns:
        the index parameter, null if no index
      • getMethodName

        java.lang.String getMethodName()
        Gets the name-part for select- and delete-methods.
        Returns:
        the method name, null if default from foreign entity name
      • getMethodArgs

        java.util.List<MethodArgument> getMethodArgs()
        Gets the effective method arguments for select- and delete-methods.
        Returns:
        the args, never null, at least 1 element
      • getNmName

        java.lang.String getNmName()
        Gets the name of the nm-relation.
        Returns:
        the n:m relation name, null if this is not an n:m-relation
      • getNmMethodName

        java.lang.String getNmMethodName()
        Same as getMethodName() but for nm relation.
        Returns:
        the list method name, null if default
      • getVariableName

        java.lang.String getVariableName()
        Gets the variable name.
        Returns:
        the variable name
      • getMethodNameSuffix

        java.lang.String getMethodNameSuffix()
        Gets the suffix to be used in methodnames.

        Example:

         "set" + getMethodNameSuffix() would return "setBlah" if the
         classname is "Blah" or the name is "blah".
         
        Returns:
        the suffix
      • getGetterName

        java.lang.String getGetterName()
        Gets the getter method name.
        Returns:
        the getter
      • getSetterName

        java.lang.String getSetterName()
        Gets the setter method name.
        Returns:
        the setter
      • getGetterSetterComment

        java.lang.String getGetterSetterComment()
        Gets the comment line for getter and setter.
        Returns:
        the comment
      • getDeclaredJavaType

        java.lang.String getDeclaredJavaType​(boolean withinForeignEntity)
        Gets the declared java type of the relation.
        Parameters:
        withinForeignEntity - true if we need the type from within the foreign entity, else from within the relation's entity
        Returns:
        the declared java type
      • getJavaType

        java.lang.String getJavaType()
        Gets the effective java type of the relation.

        Example: the effective type is ArrayList and the declared type is List.

        Returns:
        the effective java type
      • isDeepReference

        boolean isDeepReference()
        Returns whether this relation is a deep reference.
        Deep references point to components of another composite entity.
        Returns:
        true if deep reference