org.objectweb.jorm.mapper.rdb.adapter.api
Class JoinedTable
java.lang.Object
org.objectweb.jorm.mapper.rdb.adapter.api.JoinedTable
public class JoinedTable
extends java.lang.Object
is a recursive structure representing join between tables.
- S.Chassande-Barrioz
String | alias - is the alias name the current table.
|
List | joinedTables - List of JoinedTable.
|
List | joins - List of Join instaces.
|
String | tableName - the name of the current table.
|
JoinedTable() - no arg constructor required for cloning, but must not be used in usual
case.
|
JoinedTable(String tablename) - Build a JoinedTable with a particular table name.
|
JoinedTable(String tablename, String alias) - Build a JoinedTable with a particular table name and alias name.
|
alias
public String alias
is the alias name the current table. It can be null if no alias is
required.
joinedTables
public List joinedTables
List of JoinedTable. The JoinedTable instance at the N position is linked
to the current JoinedTable by the a join desribes by the Join instance
at the position N in the list 'joins'.
Therefore the joinedTables list has the exactly the same size than the
'joins' list.
this is list can be empty if not joined table are linked to the current.
joins
public List joins
List of Join instaces. The Join instance at the N position describes
the join between the current table (first table) and the JoinedTable
at the position N in the list 'joinedTables' (second table).
Therefore the joins list has the exactly the same size than the
'joinedTables' list.
this is list can be empty if not joined table are linked to the current.
tableName
public String tableName
the name of the current table. never null
JoinedTable
public JoinedTable()
no arg constructor required for cloning, but must not be used in usual
case.
JoinedTable
public JoinedTable(String tablename)
Build a JoinedTable with a particular table name.
tablename
- is the name of the table
JoinedTable
public JoinedTable(String tablename,
String alias)
Build a JoinedTable with a particular table name and alias name.
tablename
- is the name of the tablealias
- is the name of the alias
clone
public Object clone(Object clone,
java.util.Map obj2clone)
throws CloneNotSupportedException
Clone the current JoinedTable with a context.
clone
- is the clone instance to fill with the value of the current
instance. If this parameter is null, the implementation has o create a
new one.obj2clone
- is a map between object already cloned and their clone
instance
- the clone instance of the current instance.
contains
public boolean contains(JoinedTable jt)
- a boolean value indicating if a given JoinedTable is the
joinedtables of the current JoinedTable
createChildren
public JoinedTable.Join createChildren(String tablename)
Creates a new Join instance to a new JoinedTable
tablename
- is the name of the new JoinedTable
- the Join instance representing the join between the current table
and the created JoinedTable.
createChildren
public JoinedTable.Join createChildren(String tablename,
String alias)
Creates a new Join instance to a new JoinedTable
tablename
- is the name of the new JoinedTablealias
- is the alias name of the new JoinedTable
- the Join instance representing the join between the current table
and the created JoinedTable.
createChildren
public JoinedTable.Join createChildren(String tablename,
String alias,
boolean outer)
Creates a new Join instance to a new JoinedTable
tablename
- is the name of the new JoinedTablealias
- is the alias name of the new JoinedTableouter
- indicates whether the join should be outer or inner
- the Join instance representing the join between the current table
and the created JoinedTable.
createChildren
public JoinedTable.Join createChildren(String tablename,
boolean outer)
Creates a new Join instance to a new JoinedTable
tablename
- is the name of the new JoinedTableouter
- indicates whether the join should be outer or inner
- the Join instance representing the join between the current table
and the created JoinedTable.
createChildren
public JoinedTable.Join createChildren(JoinedTable jt)
Creates a new Join instance to a given JoinedTable
jt
- is a JoinedTable
- the Join instance representing the join between the current table
and the given JoinedTable.
createChildren
public JoinedTable.Join createChildren(JoinedTable jt,
boolean outer)
Creates a new Join instance to a given JoinedTable
jt
- is a JoinedTableouter
- indicates whether the join should be outer or inner
- the Join instance representing the join between the current table
and the given JoinedTable.
getClone
public static Object getClone(JoinedTable obj,
java.util.Map obj2clone)
throws CloneNotSupportedException