final class DynamicLegacyKeyJoin extends AbstractJoin
?
)
to represent the shared "legacy foreign key" fields. For instance, given
the three table relationship:
Person [one-to-many] ---> PersonAddress [many-to-one] ---> Addressand the following multi-table join in Progress
for each person, each person-address of person, each address of person-address: ...the first join (
person-address of person
) is represented as
follows:
personAddress.siteId = ? and personAddress.empNum = ?where
PersonAddress
is the local DMO and Person the foreign
DMO; and the second join (address of person-address
) is
represented as follows:
address.addrId = ?where
Address
is the local DMO and PersonAddress the foreign
DMO.Modifier and Type | Class and Description |
---|---|
private static interface |
DynamicLegacyKeyJoin.ParameterResolver
An internal API used by this class to abstract the resolution of the
query substitution parameters at query execution time.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<FieldReference> |
parameters
List of field reference substitution parameters which define this join
|
private DynamicLegacyKeyJoin.ParameterResolver |
resolver
An object which resolves the substitution parameters
|
inverse
Constructor and Description |
---|
DynamicLegacyKeyJoin(RecordBuffer local,
RecordBuffer inverse)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected HQLExpression |
generateHQL(RecordBuffer local,
RecordBuffer inverse,
RelationInfo info,
boolean dereference)
Generate the HQL where clause snippet which will be inserted into the
overall HQL statement executed by the enclosing query.
|
(package private) java.util.List<java.io.Serializable> |
getParameters()
Get the values of DMO instance fields which will be used as the query
substitution parameters.
|
protected java.util.List<org.hibernate.type.Type> |
getParameterTypes(RelationInfo info,
boolean dereference)
Get the values of DMO instance fields which will be used as the query
substitution parameters.
|
java.util.List<FieldReference> |
getUnresolvedParameters()
Get a list of unresolved field reference parameters for this join.
|
protected boolean |
isServerJoin()
Report whether the join represented by this object takes place at the
database server, or within runtime code.
|
protected void |
setup(RecordBuffer local,
RecordBuffer inverse,
RelationInfo info,
boolean dereference)
Perform additional setup necessary to create the object which will
resolve the query substitution parameters at query execution time.
|
getHQL, getInverse, getInverseInterface, getParameterTypes, raiseJoinError
private DynamicLegacyKeyJoin.ParameterResolver resolver
private java.util.List<FieldReference> parameters
DynamicLegacyKeyJoin(RecordBuffer local, RecordBuffer inverse)
local
- Local record buffer (the refering end of the join).inverse
- Inverse record buffer (the referent end of the join).public java.util.List<FieldReference> getUnresolvedParameters()
getUnresolvedParameters
in class AbstractJoin
protected boolean isServerJoin()
isServerJoin
in class AbstractJoin
true
if the join happens at the server;
false
if it happens in the runtime.protected HQLExpression generateHQL(RecordBuffer local, RecordBuffer inverse, RelationInfo info, boolean dereference)
generateHQL
in class AbstractJoin
local
- Local record buffer (the refering end of the join).inverse
- Inverse record buffer (the referent end of the join).info
- Relation descriptor object.dereference
- true
if the local DMO contains a reference to the
foreign record, which must be dereferenced in the HQL query;
false
if the local DMO is the foreign
record, referenced by the inverse DMO.protected java.util.List<org.hibernate.type.Type> getParameterTypes(RelationInfo info, boolean dereference)
getParameterTypes
in class AbstractJoin
info
- Relation descriptor object.dereference
- true
if the local DMO contains a reference to the
foreign record, which must be dereferenced in the HQL query;
false
if the local DMO is the foreign
record, referenced by the inverse DMO.protected void setup(RecordBuffer local, RecordBuffer inverse, RelationInfo info, boolean dereference)
setup
in class AbstractJoin
local
- Local record buffer (the refering end of the join).inverse
- Inverse record buffer (the referent end of the join).info
- Relation descriptor object.dereference
- true
if the local DMO contains a reference to the
foreign record, which must be dereferenced in the HQL query;
false
if the local DMO is the foreign
record, referenced by the inverse DMO.java.util.List<java.io.Serializable> getParameters()
DynamicLegacyKeyJoin.ParameterResolver
to do its work.getParameters
in class AbstractJoin