/** * INTERNAL: * Return if the expression if for a map key mapping where the key is a OneToOne. */ public boolean isMapKeyObjectRelationship() { if (getMapping() != null) { return getMapping().isCollectionMapping() && ((CollectionMapping)getMapping()).isMapKeyObjectRelationship(); } else { return false; } }
/** * INTERNAL: * Return if the expression if for a map key mapping where the key is a OneToOne. */ public boolean isMapKeyObjectRelationship() { if (getMapping() != null) { return getMapping().isCollectionMapping() && ((CollectionMapping)getMapping()).isMapKeyObjectRelationship(); } else { return false; } }
@Override public CollectionMapping getMapping() { return (CollectionMapping)((QueryKeyExpression)getBaseExpression()).getMapping(); }
public CollectionMapping getMapping() { return (CollectionMapping)((QueryKeyExpression)getBaseExpression()).getMapping(); }
@Override public CollectionMapping getMapping() { return (CollectionMapping)((QueryKeyExpression)getBaseExpression()).getMapping(); }
/** * INTERNAL: * Indicates whether this expression corresponds to OneToOne. */ public boolean isOneToOne() { if(getMapping() != null) { return getMapping().isOneToOneMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isOneToOneQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to ManyToMany. */ public boolean isManyToMany() { if(getMapping() != null) { return getMapping().isManyToManyMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isManyToManyQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to DirectCollection. */ @Override public boolean isDirectCollection() { if(getMapping() != null) { return getMapping().isDirectCollectionMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isDirectCollectionQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to DirectCollection. */ public boolean isDirectCollection() { if(getMapping() != null) { return getMapping().isDirectCollectionMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isDirectCollectionQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to OneToOne. */ public boolean isOneToOne() { if(getMapping() != null) { return getMapping().isOneToOneMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isOneToOneQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to OneToMany. */ public boolean isOneToMany() { if(getMapping() != null) { return getMapping().isOneToManyMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isOneToManyQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to OneToOne. */ public boolean isOneToOne() { if(getMapping() != null) { return getMapping().isOneToOneMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isOneToOneQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to OneToMany. */ public boolean isOneToMany() { if(getMapping() != null) { return getMapping().isOneToManyMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isOneToManyQueryKey(); } else { return false; } } }
/** * INTERNAL: * Indicates whether this expression corresponds to ManyToMany. */ public boolean isManyToMany() { if(getMapping() != null) { return getMapping().isManyToManyMapping(); } else { if(getQueryKeyOrNull() != null) { return this.queryKey.isManyToManyQueryKey(); } else { return false; } } }
/** * INTERNAL: * Return if descriptor for the map key mapping where the key is a OneToOne. */ public ClassDescriptor getMapKeyDescriptor() { return ((CollectionMapping)getMapping()).getContainerPolicy().getDescriptorForMapKey(); }
/** * INTERNAL: * Return if descriptor for the map key mapping where the key is a OneToOne. */ public ClassDescriptor getMapKeyDescriptor() { return ((CollectionMapping)getMapping()).getContainerPolicy().getDescriptorForMapKey(); }
public NestedTable(QueryKeyExpression queryKeyExpression) { super(); this.queryKeyExpression = queryKeyExpression; setName((queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getName()); tableQualifier = (queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getQualifiedName(); }
public NestedTable(QueryKeyExpression queryKeyExpression) { super(); this.queryKeyExpression = queryKeyExpression; setName((queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getName()); tableQualifier = (queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getQualifiedName(); }
public NestedTable(QueryKeyExpression queryKeyExpression) { super(); this.queryKeyExpression = queryKeyExpression; setName((queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getName()); tableQualifier = (queryKeyExpression.getMapping().getDescriptor().getTables().firstElement()).getQualifiedName(); }
protected Expression resolveBaseExpression(Expression expression) { Expression baseExpression = ((BaseExpression)expression).getBaseExpression(); //filter out aggregate expressions between this and the next node. while (!baseExpression.isExpressionBuilder() && ((QueryKeyExpression)baseExpression).getMapping().isAggregateMapping()){ baseExpression = ((BaseExpression)baseExpression).getBaseExpression(); } return baseExpression; }