Class Link

  • All Implemented Interfaces:
    java.io.Serializable

    public class Link
    extends java.lang.Object
    implements java.io.Serializable
    Object link definition
    NB : This object is only dedicated to provide with default and display information on links
    Actual link behavior is handled at object field level (all dynamic business rules,
    except display-related rules, to be applied on links are to be set using object field's link related methods)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Link​(ObjectDB parent, java.lang.String id, java.lang.String obj, java.lang.String fld, java.lang.String dbtable, java.lang.String column, java.lang.String objDisplay, java.lang.String fldDisplay, java.lang.String lnkDisplay, java.lang.String lnkPluralDisplay, java.lang.String lnkHelp, java.lang.String card, int order, boolean copy, char associate, boolean visible, boolean inline, char cascad, java.lang.String icon, char render, int depth)
      Constructor
    • Method Summary

      Modifier and Type Method Description
      static void genAssocActions​(ObjectDB child)
      Build the associate Actions
      java.lang.String getChildField()
      Optional child foreign key in case of simple N,N
      java.lang.String getChildObject()
      Optional child object in case of simple N,N
      java.lang.String getDataSource()
      Get target table datasource name
      char getDeleteCascade()
      Get cascade delete mode
      java.lang.String getDisplay()
      Get link display label
      java.lang.String getFieldDisplay()
      Get foreign field display
      java.lang.String getFieldName()
      Get foreign field name
      java.lang.String getForeignKey()
      Get foreign key column
      java.lang.String getIcon()
      Get link icon
      java.lang.String getId()
      Get link ID
      java.lang.String getLabel()
      Get link display label (alias to getDisplay)
      java.lang.String getLinkDisplay()
      Get link display
      java.lang.String getLinkHelp()
      Get link help
      int getMaxOccurs()
      Get cardinality max occurs (-1 means infinity)
      int getMinOccurs()
      Get cardinality min occurs
      java.lang.String getName()
      Get link name = object;reference
      java.lang.String getObjectDisplay()
      Get target object display
      java.lang.String getObjectName()
      Get target object name
      int getOrder()
      Get link order
      ObjectDB getParent()
      Get parent object
      java.lang.String getPluralDisplay()
      Get link plural label
      char getRendering()
      Get the link rendering
      java.lang.String getTable()
      Get target table name
      int getTreeDepth()
      Get the reflexive deep search limit (-1=no limit, 0=no search)
      boolean isAssociable()
      Is link with bulk association ?
      boolean isCascadeCopy()
      Is link with cascade copy ?
      boolean isInline()
      Is inline inputs into parent form (case of 0,1 or 1,1 link)
      boolean isReflexive()
      Is link reflexive (on same object)
      boolean isVisible()
      Is link visible ?
      void setAssociable​(char a)
      Set bulk association
      void setCascadeCopy​(boolean b)
      Set cascade copy
      void setChildLink​(java.lang.String obj, java.lang.String fk)
      Set child object in case of simple N,N relationship
      void setDeleteCascade​(char c)
      Set cascade delete mode
      void setDisplay()
      Set link display label
      void setInline​(boolean inline)
      Set inline inputs into parent form
      void setLabel()
      Set link display lable (alias to setDisplay)
      void setMaxOccurs​(int max)
      Set cardinality max occurs (-1 means infinity)
      void setMinMax​(java.lang.String card)
      Set cardinality min,max
      void setMinOccurs​(int min)
      Set cardinality min occurs
      void setOrder​(int o)
      Set link order
      void setParent​(ObjectDB o)
      Set parent object
      void setReflexive​(boolean b)  
      void setRendering​(char r)
      Set link rendering
      void setTreeDepth​(int depth)
      Set the reflexive link deep search limit
      void setVisible​(boolean vis)
      Set link visible or not
      java.lang.String toString()
      Generates basic string dump for link (useful for debug purposes)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Link

        public Link​(ObjectDB parent,
                    java.lang.String id,
                    java.lang.String obj,
                    java.lang.String fld,
                    java.lang.String dbtable,
                    java.lang.String column,
                    java.lang.String objDisplay,
                    java.lang.String fldDisplay,
                    java.lang.String lnkDisplay,
                    java.lang.String lnkPluralDisplay,
                    java.lang.String lnkHelp,
                    java.lang.String card,
                    int order,
                    boolean copy,
                    char associate,
                    boolean visible,
                    boolean inline,
                    char cascad,
                    java.lang.String icon,
                    char render,
                    int depth)
        Constructor
        Parameters:
        parent - Parent object
        id - Link id
        obj - Target object name
        fld - Foreign key field name
        dbtable - Target DB table definition (may be in the form datasource;table)
        column - Foreign key DB column
        objDisplay - Object display
        fldDisplay - Field display
        lnkDisplay - Link display (calculated if null)
        lnkPluralDisplay - Optional plural label
        lnkHelp - Optional mini-help
        card - Cardinality min,max examples: 0,n 0,1 2,6
        order - Tab order
        copy - Is cascade copy enabled ?
        associate - Is bulk association enabled ?
        visible - Is visible ?
        inline - Inline inputs in parent form ? (case of 0,1 or 1,1 link)
        cascad - Delete cascade mode
        icon - Object icon
        render - Link rendering
        depth - Reflexive deep search limit
    • Method Detail

      • getId

        public java.lang.String getId()
        Get link ID
      • getObjectName

        public java.lang.String getObjectName()
        Get target object name
      • getDataSource

        public java.lang.String getDataSource()
        Get target table datasource name
      • getTable

        public java.lang.String getTable()
        Get target table name
      • getObjectDisplay

        public java.lang.String getObjectDisplay()
        Get target object display
      • getFieldName

        public java.lang.String getFieldName()
        Get foreign field name
      • getName

        public java.lang.String getName()
        Get link name = object;reference
      • getForeignKey

        public java.lang.String getForeignKey()
        Get foreign key column
      • getFieldDisplay

        public java.lang.String getFieldDisplay()
        Get foreign field display
      • getLinkDisplay

        public java.lang.String getLinkDisplay()
        Get link display
      • getIcon

        public java.lang.String getIcon()
        Get link icon
      • getLinkHelp

        public java.lang.String getLinkHelp()
        Get link help
      • getDisplay

        public java.lang.String getDisplay()
        Get link display label
      • getLabel

        public java.lang.String getLabel()
        Get link display label (alias to getDisplay)
      • getPluralDisplay

        public java.lang.String getPluralDisplay()
        Get link plural label
      • setDisplay

        public void setDisplay()
        Set link display label
      • setLabel

        public void setLabel()
        Set link display lable (alias to setDisplay)
      • getMinOccurs

        public int getMinOccurs()
        Get cardinality min occurs
      • setMinOccurs

        public void setMinOccurs​(int min)
        Set cardinality min occurs
      • getMaxOccurs

        public int getMaxOccurs()
        Get cardinality max occurs (-1 means infinity)
      • setMaxOccurs

        public void setMaxOccurs​(int max)
        Set cardinality max occurs (-1 means infinity)
      • setMinMax

        public void setMinMax​(java.lang.String card)
        Set cardinality min,max
        Parameters:
        card - examples 0,n or 1,2
      • getOrder

        public int getOrder()
        Get link order
      • setOrder

        public void setOrder​(int o)
        Set link order
        Parameters:
        o - Order
      • isCascadeCopy

        public boolean isCascadeCopy()
        Is link with cascade copy ?
      • setCascadeCopy

        public void setCascadeCopy​(boolean b)
        Set cascade copy
        Parameters:
        b - Cascade copy?
      • getDeleteCascade

        public char getDeleteCascade()
        Get cascade delete mode
      • setDeleteCascade

        public void setDeleteCascade​(char c)
        Set cascade delete mode
        Parameters:
        c - Mode
      • isAssociable

        public boolean isAssociable()
        Is link with bulk association ?
      • setAssociable

        public void setAssociable​(char a)
        Set bulk association
        Parameters:
        a - Associate?
      • genAssocActions

        public static void genAssocActions​(ObjectDB child)
        Build the associate Actions
      • isVisible

        public boolean isVisible()
        Is link visible ?
      • setVisible

        public void setVisible​(boolean vis)
        Set link visible or not
        Parameters:
        vis - Visible?
      • isInline

        public boolean isInline()
        Is inline inputs into parent form (case of 0,1 or 1,1 link)
      • setInline

        public void setInline​(boolean inline)
        Set inline inputs into parent form
        Parameters:
        inline - Inline?
      • getParent

        public ObjectDB getParent()
        Get parent object
      • setParent

        public void setParent​(ObjectDB o)
        Set parent object
        Parameters:
        o - Object
      • getRendering

        public char getRendering()
        Get the link rendering
      • setRendering

        public void setRendering​(char r)
        Set link rendering
      • getChildObject

        public java.lang.String getChildObject()
        Optional child object in case of simple N,N
      • getChildField

        public java.lang.String getChildField()
        Optional child foreign key in case of simple N,N
      • setChildLink

        public void setChildLink​(java.lang.String obj,
                                 java.lang.String fk)
        Set child object in case of simple N,N relationship
      • isReflexive

        public boolean isReflexive()
        Is link reflexive (on same object)
      • setReflexive

        public void setReflexive​(boolean b)
      • getTreeDepth

        public int getTreeDepth()
        Get the reflexive deep search limit (-1=no limit, 0=no search)
      • setTreeDepth

        public void setTreeDepth​(int depth)
        Set the reflexive link deep search limit
      • toString

        public java.lang.String toString()
        Generates basic string dump for link (useful for debug purposes)
        Overrides:
        toString in class java.lang.Object
        Returns:
        link as string