com.is.jrf
Class JoinColumn
java.lang.Object
|
+--com.is.jrf.JoinColumn
- Direct Known Subclasses:
- BigDecimalJoinColumn, BooleanJoinColumn, DoubleJoinColumn, FloatJoinColumn, IntegerJoinColumn, LongJoinColumn, ShortJoinColumn, SQLDateJoinColumn, SQLTimeJoinColumn, StringArrayJoinColumn, StringJoinColumn, TimestampJoinColumn
- public abstract class JoinColumn
- extends java.lang.Object
Subclasses of this class represent columns from another table that we
want included in our PersistentObject. These are not columns that are
used in the actual join (ie. "Table1.Col1 = Table2.Col1") between tables.
The column alias is important since the real column name may match one in
the main table.
Constructor Summary |
JoinColumn()
|
JoinColumn(java.lang.String columnName,
java.lang.String setter)
Construct a JoinColumnInstance that is ready to be used. |
JoinColumn(java.lang.String columnName,
java.lang.String columnAlias,
java.lang.String setter)
Construct a JoinColumn instance that is ready to be used. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
i_columnName
protected java.lang.String i_columnName
i_columnAlias
protected java.lang.String i_columnAlias
i_setter
protected java.lang.String i_setter
s_class
protected static java.lang.Class s_class
JoinColumn
public JoinColumn()
JoinColumn
public JoinColumn(java.lang.String columnName,
java.lang.String setter)
- Construct a JoinColumnInstance that is ready to be used.
- Parameters:
columnName
- a value of type 'String' - can include alias like
this: "Name PersonName"setter
- a value of type 'String'
JoinColumn
public JoinColumn(java.lang.String columnName,
java.lang.String columnAlias,
java.lang.String setter)
- Construct a JoinColumn instance that is ready to be used.
- Parameters:
columnName
- a value of type 'String'columnAlias
- a value of type 'String' - This can be important if
the main table has a matching column name.setter
- a value of type 'String'
getColumnValueFrom
public java.lang.Object getColumnValueFrom(JDBCHelper helper)
throws java.sql.SQLException
- This is usually overridden by subclasses to explicitly specify the type
of object to be retrieved from the result set in JDBCHelper.
- Parameters:
helper
- a value of type 'JDBCHelper'- Returns:
- a value of type 'Object'
- Throws:
java.sql.SQLException
- if an error occurs
getColumnClass
public abstract java.lang.Class getColumnClass()
getColumnName
public java.lang.String getColumnName()
setColumnName
public void setColumnName(java.lang.String name)
getColumnAlias
public java.lang.String getColumnAlias()
setColumnAlias
public void setColumnAlias(java.lang.String alias)
getSetter
public java.lang.String getSetter()
setSetter
public void setSetter(java.lang.String setter)
copyColumnValueToPersistentObject
public void copyColumnValueToPersistentObject(JDBCHelper helper,
PersistentObject aPO)
throws java.sql.SQLException
- Copy the value of my column to the appropriate attribute for this
persistent object.
- Parameters:
helper
- a value of type 'JDBCHelper'aPO
- a value of type 'PersistentObject'- Throws:
java.sql.SQLException
- if an error occurs
buildSelectColumnString
protected void buildSelectColumnString(java.lang.StringBuffer sqlBuffer,
java.lang.String tableAlias)