Class ColumnDescriptor


  • public class ColumnDescriptor
    extends Object
    A descriptor of a ResultSet column.
    Since:
    1.1
    • Field Detail

      • tableName

        protected String tableName
      • procedureName

        protected String procedureName
      • namePrefix

        protected String namePrefix
      • dataRowKey

        protected String dataRowKey
      • jdbcType

        protected int jdbcType
      • javaClass

        protected String javaClass
      • isExpression

        protected boolean isExpression
        Since:
        4.0
    • Constructor Detail

      • ColumnDescriptor

        public ColumnDescriptor()
        Creates a ColumnDescriptor
      • ColumnDescriptor

        public ColumnDescriptor​(String columnName,
                                int jdbcType)
        Creates a column descriptor with user-specified parameters.
        Since:
        3.1
      • ColumnDescriptor

        public ColumnDescriptor​(String columnName,
                                int jdbcType,
                                String javaClass)
        Since:
        4.0
      • ColumnDescriptor

        public ColumnDescriptor​(DbAttribute attribute,
                                String tableAlias)
        Creates a ColumnDescriptor from Cayenne DbAttribute.
        Since:
        1.2
      • ColumnDescriptor

        public ColumnDescriptor​(ProcedureParameter parameter)
        Creates a ColumnDescriptor from stored procedure parameter.
        Since:
        1.2
    • Method Detail

      • setAttribute

        public void setAttribute​(DbAttribute attribute)
      • getAttribute

        public DbAttribute getAttribute()
        Returns a DbAttribute for this column. Since columns descriptors can be initialized in a context where a DbAttribite is unknown, this method may return null.
        Since:
        4.0
      • equals

        public boolean equals​(Object o)
        Returns true if another object is a ColumnDescriptor with the same name, name prefix, table and procedure names. Other fields are ignored in the equality test.
        Overrides:
        equals in class Object
        Since:
        1.2
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
        Since:
        1.2
      • getQualifiedColumnName

        public String getQualifiedColumnName()
        Returns "qualifiedColumnName" property.
        Since:
        1.2
      • getJdbcType

        public int getJdbcType()
      • getName

        public String getName()
        Returns column name. Name is an unqualified column name in a query.
      • getNamePrefix

        public String getNamePrefix()
        Since:
        4.0
      • setJdbcType

        public void setJdbcType​(int i)
      • setName

        public void setName​(String name)
      • getJavaClass

        public String getJavaClass()
      • setJavaClass

        public void setJavaClass​(String string)
      • getTableName

        public String getTableName()
        Returns the name of the parent table.
        Since:
        1.2
      • setTableName

        public void setTableName​(String tableName)
        Since:
        1.2
      • getProcedureName

        public String getProcedureName()
        Returns the name of the parent stored procedure.
        Since:
        1.2
      • setProcedureName

        public void setProcedureName​(String procedureName)
        Since:
        1.2
      • getDataRowKey

        public String getDataRowKey()
        Since:
        3.0
      • setDataRowKey

        public void setDataRowKey​(String dataRowKey)
        Since:
        3.0
      • setIsExpression

        public void setIsExpression​(boolean isExpression)
        Parameters:
        isExpression - is this column is an expression
        Since:
        4.0
      • isExpression

        public boolean isExpression()
        Returns:
        is this column is an expression
        Since:
        4.0