Class DatabaseField

    • Method Detail

      • setName

        public void setName​(java.lang.String fullname)
                     throws ReportException
        Specifies the name of the DatabaseField.
        The name have to start with the name of the table separated with a dot, i.e. table.column.
        The short name of this field is set to the name of the column. The value type of the database field will be read from the database.
        Specified by:
        setName in class Field
        Parameters:
        fullname - The qualified column name for this database field.
        Throws:
        ReportException - If the alias or table name was missing.
        java.lang.IllegalArgumentException - If the database field name was empty
        Since:
        1.0
      • setColumnLabel

        public void setColumnLabel​(java.lang.String columnLabel)
        Specifies an alias for table columns. The label is an additional information. It can be used to explain abstract column names. This label will be used from i-net Designer for example. It don't influence the SQL generation.
        Parameters:
        columnLabel - Label of the database field
        Since:
        6.0
        See Also:
        getColumnLabel(), hasColumnLabel()
      • getColumnLabel

        public java.lang.String getColumnLabel()
        Returns the label of this DatabaseField. The label is an additional information only. It can be used to explain abstract column names. This label will be used from i-net Designer for example.
        Returns:
        Label of the database field as String.
        Since:
        6.0
        See Also:
        getColumnLabel(), hasColumnLabel()
      • hasColumnLabel

        public boolean hasColumnLabel()
        Returns whether a column label was set or not.
        Returns:
        true if a column label was set, false otherwise.
        Since:
        6.0
        See Also:
        setColumnLabel(String), getColumnLabel()
      • getShortName

        public java.lang.String getShortName()
        Returns the short name of a database field.
        This is the name of the database-column without leading table-name, i.e. the name of the database field is 'Customers.Customer ID', the short name should be 'Customer ID'.
        Returns:
        The short name of the database field as String.
        Since:
        1.0
      • saveFieldXML2

        protected void saveFieldXML2​(java.io.PrintWriter pw,
                                     int depth)
        FOR INTERNAL USE ONLY
        Specified by:
        saveFieldXML2 in class Field
        Parameters:
        pw - the print writer
        depth - the current depth
      • getTableSource

        public TableSource getTableSource()
        Returns the table source this database field is based on, will never return null.
        Returns:
        TableSource this database field is based on, never null
        Since:
        7.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object