Package org.apache.cayenne.access.jdbc
Class ColumnDescriptor
java.lang.Object
org.apache.cayenne.access.jdbc.ColumnDescriptor
public class ColumnDescriptor extends Object
A descriptor of a ResultSet column.
- Since:
- 1.1
- 
Field SummaryFields Modifier and Type Field Description protected DbAttributeattributeprotected StringdataRowKeyprotected booleanisExpressionprotected StringjavaClassprotected intjdbcTypeprotected Stringnameprotected StringnamePrefixprotected StringprocedureNameprotected StringtableName
- 
Constructor SummaryConstructors Constructor Description ColumnDescriptor()Creates a ColumnDescriptorColumnDescriptor(String columnName, int jdbcType)Creates a column descriptor with user-specified parameters.ColumnDescriptor(String columnName, int jdbcType, String javaClass)ColumnDescriptor(String columnName, ResultSetMetaData metaData, int position)Creates a ColumnDescriptor using ResultSetMetaData.ColumnDescriptor(ResultSetMetaData metaData, int position)Creates a ColumnDescriptor using ResultSetMetaData.ColumnDescriptor(DbAttribute attribute, String tableAlias)Creates a ColumnDescriptor from Cayenne DbAttribute.ColumnDescriptor(ObjAttribute objAttribute, DbAttribute dbAttribute, String columnAlias)ColumnDescriptor(ProcedureParameter parameter)Creates a ColumnDescriptor from stored procedure parameter.
- 
Method SummaryModifier and Type Method Description booleanequals(Object o)Returns true if another object is a ColumnDescriptor with the same name, name prefix, table and procedure names.DbAttributegetAttribute()Returns a DbAttribute for this column.StringgetDataRowKey()StringgetJavaClass()intgetJdbcType()StringgetName()Returns column name.StringgetNamePrefix()StringgetProcedureName()Returns the name of the parent stored procedure.StringgetQualifiedColumnName()Returns "qualifiedColumnName" property.StringgetTableName()Returns the name of the parent table.inthashCode()booleanisExpression()voidsetAttribute(DbAttribute attribute)voidsetDataRowKey(String dataRowKey)voidsetIsExpression(boolean isExpression)voidsetJavaClass(String string)voidsetJdbcType(int i)voidsetName(String name)voidsetProcedureName(String procedureName)voidsetTableName(String tableName)StringtoString()
- 
Field Details- 
attribute
- 
tableName
- 
procedureName
- 
name
- 
namePrefix
- 
dataRowKey
- 
jdbcTypeprotected int jdbcType
- 
javaClass
- 
isExpressionprotected boolean isExpression- Since:
- 4.0
 
 
- 
- 
Constructor Details- 
ColumnDescriptorpublic ColumnDescriptor()Creates a ColumnDescriptor
- 
ColumnDescriptorCreates a column descriptor with user-specified parameters.- Since:
- 3.1
 
- 
ColumnDescriptor- Since:
- 4.0
 
- 
ColumnDescriptorCreates a ColumnDescriptor from Cayenne DbAttribute.- Since:
- 1.2
 
- 
ColumnDescriptor- Since:
- 1.2
 
- 
ColumnDescriptorCreates a ColumnDescriptor from stored procedure parameter.- Since:
- 1.2
 
- 
ColumnDescriptorpublic ColumnDescriptor(String columnName, ResultSetMetaData metaData, int position) throws SQLExceptionCreates a ColumnDescriptor using ResultSetMetaData.- Throws:
- SQLException
- Since:
- 3.1
 
- 
ColumnDescriptorCreates a ColumnDescriptor using ResultSetMetaData.- Throws:
- SQLException
- Since:
- 1.2
 
 
- 
- 
Method Details- 
setAttribute
- 
getAttributeReturns 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
 
- 
equalsReturns 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.
- 
hashCodepublic int hashCode()
- 
toString
- 
getQualifiedColumnNameReturns "qualifiedColumnName" property.- Since:
- 1.2
 
- 
getJdbcTypepublic int getJdbcType()
- 
getNameReturns column name. Name is an unqualified column name in a query.
- 
getNamePrefix- Since:
- 4.0
 
- 
setJdbcTypepublic void setJdbcType(int i)
- 
setName
- 
getJavaClass
- 
setJavaClass
- 
getTableNameReturns the name of the parent table.- Since:
- 1.2
 
- 
setTableName- Since:
- 1.2
 
- 
getProcedureNameReturns the name of the parent stored procedure.- Since:
- 1.2
 
- 
setProcedureName- Since:
- 1.2
 
- 
getDataRowKey- Since:
- 3.0
 
- 
setDataRowKey- Since:
- 3.0
 
- 
setIsExpressionpublic void setIsExpression(boolean isExpression)- Parameters:
- isExpression- is this column is an expression
- Since:
- 4.0
 
- 
isExpressionpublic boolean isExpression()- Returns:
- is this column is an expression
- Since:
- 4.0
 
 
-