Package org.sqlproc.engine.impl
Class SqlMappingIdentity
- java.lang.Object
-
- org.sqlproc.engine.impl.SqlMappingIdentity
-
class SqlMappingIdentity extends Object
The identity related to one output attribute. To be more precise, it's related to oneSqlMappingAttribute
. For the purpose of correct left join handling, the identities are identified. They are used to prevent the repeated rows in the output result set. This is used for the associations (one-to-one, one-to-many and many-to-many).- Author:
- Vladimir Hudec
-
-
Field Summary
Fields Modifier and Type Field Description (package private) List<List<Integer>>
allIdentityIndexes
The list of all parent alternative identities.(package private) Integer
idenityDistance
The distance from the identity column.(package private) List<Integer>
identityIndexes
The list of all alternative identities.(package private) SqlMappingItem
item
The related mapping rule element for one output attribute.(package private) SqlMappingAttribute
itemAttribute
The related mapping rule sub-element for one output attribute.
-
Constructor Summary
Constructors Constructor Description SqlMappingIdentity(SqlMappingItem item)
Creates a new instance.SqlMappingIdentity(SqlMappingItem item, SqlMappingAttribute itemAttribute)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addIdentityIndex(Integer identityIndex, boolean reset)
Adds a new identity index.String
toString()
For debug purposes.
-
-
-
Field Detail
-
identityIndexes
List<Integer> identityIndexes
The list of all alternative identities. More identities happen in the case of the result classes inheritance. This version of SQL Processor supports table per subclass (represent is a (inheritance) relationships as has a (foreign key) relationships).
-
allIdentityIndexes
List<List<Integer>> allIdentityIndexes
The list of all parent alternative identities. More identities happen in the case of the result classes inheritance. This version of SQL Processor supports table per subclass (represent is a (inheritance) relationships as has a (foreign key) relationships).
-
idenityDistance
Integer idenityDistance
The distance from the identity column.
-
item
SqlMappingItem item
The related mapping rule element for one output attribute.
-
itemAttribute
SqlMappingAttribute itemAttribute
The related mapping rule sub-element for one output attribute.
-
-
Constructor Detail
-
SqlMappingIdentity
SqlMappingIdentity(SqlMappingItem item)
Creates a new instance.- Parameters:
item
- the related mapping rule element
-
SqlMappingIdentity
SqlMappingIdentity(SqlMappingItem item, SqlMappingAttribute itemAttribute)
Creates a new instance.- Parameters:
item
- the related mapping rule elementitemAttribute
- the related mapping rule sub-element
-
-
Method Detail
-
addIdentityIndex
void addIdentityIndex(Integer identityIndex, boolean reset)
Adds a new identity index.- Parameters:
identityIndex
- a new identity indexreset
- an indicator this is the only identity index
-
-