FileDocCategorySizeDatePackage
ColumnRef.javaAPI DocGlassfish v2 API4818Fri May 04 22:35:14 BST 2007com.sun.jdo.spi.persistence.support.sqlstore.sql.generator

ColumnRef

public class ColumnRef extends Object implements com.sun.jdo.api.persistence.support.FieldMapping

Fields Summary
private org.netbeans.modules.dbschema.ColumnElement
columnElement
private QueryTable
table
private Object
value
private int
index
private String
name
Constructors Summary
public ColumnRef(org.netbeans.modules.dbschema.ColumnElement columnElement, QueryTable table)

		this.columnElement = columnElement;
		name = columnElement.getName().getName();
		this.table = table;
	
public ColumnRef(org.netbeans.modules.dbschema.ColumnElement columnElement, Object value)

		this.columnElement = columnElement;
		name = columnElement.getName().getName();
		this.value = value;
	
Methods Summary
public org.netbeans.modules.dbschema.ColumnElementgetColumnElement()
Return the actual ColumnElement associated with this column.

return
the ColumnElement associated with this

		return columnElement;
	
public intgetColumnLength()
This method return the length of the column and -1 if unknown.

         Integer len = columnElement.getLength();
         return (len != null) ? len.intValue(): -1;
     
public java.lang.StringgetColumnName()
This method return the name of the column.

         return name;
     
public intgetColumnType()
This method return int corresponding to java.sql.Types.

         return columnElement.getType();
     
public intgetIndex()
Return the position of this column in the SQL statement.

return
the position of this column in the SQL statement

		return index;
	
public java.lang.StringgetName()
Return the name of this column.

return
the name of this column.

		return name;
	
public QueryTablegetQueryTable()
Return the QueryTable associated with this column.

return
the QueryTable associated with this column.

		return table;
	
public java.lang.ObjectgetValue()
Return the input value for this column.

return
the input value for this column

		return value;
	
public voidsetIndex(int value)
Set the position of this column in the SQL statement.

param
value - the new position

		this.index = value;