Class BindingItem

    • Constructor Detail

      • BindingItem

        public BindingItem​(BindingItem src)
        Copy constructor.
      • BindingItem

        public BindingItem​(java.lang.String pName,
                           java.lang.String pColumnExpression,
                           boolean pColumnQuoting,
                           BindingSet pBindingSet)
        Constructs a BindingItem.
        Parameters:
        pName - The name of the BindingItem.
        pBindingSet - The BindingSet.
        in the SQL code generated from the BindingItem.
        pColumnExpression - A list of database columns for the BindingItems.
        Since multi-bindings are no longer supported this list should contain exactly one item.
        pColumnQuoting - True, if the columnExpression should be in quotes or not.
        For some reserved keyword of the database it is necessary to place the
        column name in quotes.
    • Method Detail

      • getCustomAttributesMap

        public java.util.Map<java.lang.String,​java.lang.String> getCustomAttributesMap()
        Returns:
        the customAttributesMap
      • toString

        public java.lang.String toString()
        A useful method for debugging.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A list of column expressions.
      • getColumnExpression

        public java.lang.String getColumnExpression()
        Gets the column expression for a BindingItem. In many cases this is just a database column name, but it can be a simple SQL expression as well.
        Overrides:
        getColumnExpression in class SimpleBindingItem
        Returns:
        The SQL code - often just a column name - assigned to the BindingItem.
      • getJDBCDataType

        public java.lang.Integer getJDBCDataType()
        The basic type of the database column which can be String or Number.
        Returns:
        The abstract column type of the database column.
      • isDefinedJDBCDataType

        public boolean isDefinedJDBCDataType()
      • isNumeric

        public boolean isNumeric()
      • setJDBCDataType

        public void setJDBCDataType​(java.lang.Integer jdbcDataType)
        The basic type of the database column which can be String or Number.
      • isKey

        public boolean isKey()
        Tests if the BindingItem is marked as a key column in the BindingSet.
        Returns:
        True if this BindingItem is a key item.
      • setKey

        public void setKey​(boolean isKey)
      • setJDBCDataTypeName

        public void setJDBCDataTypeName​(java.lang.String jdbcDataTypeName)
                                 throws java.lang.IllegalArgumentException,
                                        java.lang.SecurityException,
                                        java.lang.IllegalAccessException,
                                        java.lang.NoSuchFieldException
        Throws:
        java.lang.IllegalArgumentException
        java.lang.SecurityException
        java.lang.IllegalAccessException
        java.lang.NoSuchFieldException
      • getJDBCDataTypeName

        public java.lang.String getJDBCDataTypeName()
        Gets the name of the JDBC data type.
        Returns:
        A string corresponding to the constant name of the JDBC data type. The names are listed in java.sql.Types.
        See Also:
        Types
      • setJDBCColumnDisplaySize

        public void setJDBCColumnDisplaySize​(java.lang.Integer jdbcColumnDisplaySize)
      • getJDBCColumnDisplaySize

        public java.lang.Integer getJDBCColumnDisplaySize()
        Retrieves the number of characters for this column.
        Returns:
        The size of the column as number of characters. It can be NULL if this value is not set in the BindingSet.
        See Also:
        ResultSetMetaData.getColumnDisplaySize(int)
      • setJDBCColumnScale

        public void setJDBCColumnScale​(java.lang.Integer jdbcColumnScale)
      • getJDBCColumnScale

        public java.lang.Integer getJDBCColumnScale()
        Gets the number of decimal places if this is a numeric column. An integer number has 0 decimal places.
        Returns:
        The number of positions after the decimal point. This can be NULL if the value has not been specified.
        See Also:
        ResultSetMetaData.getScale(int)
      • setJDBCSigned

        public void setJDBCSigned​(java.lang.Boolean jdbcSigned)
      • getJDBCSigned

        public java.lang.Boolean getJDBCSigned()
        Indicates whether the column allows negative numbers or not.
        Returns:
        True if negative numbers are allowed. The result can be NULL if this property has not been set.
        See Also:
        ResultSetMetaData.isSigned(int)
      • getAggr

        public java.lang.String getAggr()
        Default aggregator, when none is given in the Wrq
        Returns:
      • setAggr

        public void setAggr​(java.lang.String aggr)
      • setJDBCNullable

        public void setJDBCNullable​(java.lang.Integer jdbcNullable)
        Determines if the column can take a NULL value or not.
        See Also:
        ResultSetMetaData.isNullable(int)
      • getJDBCNullable

        public java.lang.Integer getJDBCNullable()
      • getReferencesAsNode

        public org.w3c.dom.Node getReferencesAsNode()
                                             throws javax.xml.parsers.ParserConfigurationException,
                                                    org.xml.sax.SAXException,
                                                    java.io.IOException
        Retrieves the content of the References element as a w3c.Node or NULL if there is no References element.
        Returns:
        The References element or NULL if there is no such element.
        Throws:
        javax.xml.parsers.ParserConfigurationException
        org.xml.sax.SAXException
        java.io.IOException
      • getReferences

        public java.lang.String getReferences()
        Gets the References element as serialized XML element.
        Returns:
        The References element in a string form.
      • setReferences

        public void setReferences​(java.lang.String references)
      • getDisplayFormat

        @Deprecated
        public java.lang.String getDisplayFormat()
        Deprecated.
        This method should no longer be used. Instead the method getJDBCDataType() can be called.
        Gets the display format of the column as XML Schema data type.
        Returns:
        The XML schema data type of the column.
      • getDisplayFormatAsNode

        @Deprecated
        public org.w3c.dom.Node getDisplayFormatAsNode()
                                                throws org.xml.sax.SAXException,
                                                       java.io.IOException,
                                                       javax.xml.parsers.ParserConfigurationException
        Deprecated.
        Use the method getJDBCDataType() instead.
        Gets the display format as an XML element.
        Returns:
        The XML element of the DisplayFormat node.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
        javax.xml.parsers.ParserConfigurationException
      • setDisplayFormat

        public void setDisplayFormat​(java.lang.String displayFormat)
      • getCaption

        public java.lang.String getCaption()
        Gets value of caption attribute or empty string.
        Returns:
        The database column caption.
        See Also:
        ResultSetMetaData.getColumnLabel(int)
      • setCaption

        public void setCaption​(java.lang.String caption)
        Sets value of caption attribute.
        Parameters:
        caption - The new caption of the column.
      • isReadOnly

        public java.lang.Boolean isReadOnly()
        gets if the BindingItem is read only
      • setReadOnly

        public void setReadOnly​(java.lang.Boolean isReadOnly)
        sets if the BindingItem is read only
        Parameters:
        isReadOnly -
      • isEscapeXML

        public java.lang.Boolean isEscapeXML()
        Returns true if the content will be stored as an escaped XML string, otherwise it is plain XML
      • setEscapeXML

        public void setEscapeXML​(java.lang.Boolean isEscapeXML)
        If true, treats content as a string of escaped XML. Otherwise it is stored as XML type and returned as inline XML
      • toXML

        public void toXML​(javax.xml.stream.XMLStreamWriter writer,
                          boolean withColumnExpression)
                   throws javax.xml.stream.XMLStreamException
        Prints an XML representation of the BindingItem.
        Overrides:
        toXML in class SimpleBindingItem
        Parameters:
        writer - The writer instance to print the data to.
        Throws:
        javax.xml.stream.XMLStreamException
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()