Fix for #112 - ENH (411) : RawSql to support discriminator column mapping.

This commit is contained in:
Rob Bygrave
2014-05-17 00:11:44 +12:00
parent 41f3173adf
commit 8c8442ec58
11 changed files with 460 additions and 381 deletions
@@ -3,9 +3,7 @@ package com.avaje.ebeaninternal.server.query;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import com.avaje.ebeaninternal.server.deploy.BeanDescriptor;
import com.avaje.ebeaninternal.server.deploy.BeanProperty;
import com.avaje.ebeaninternal.server.deploy.TableJoin;
@@ -15,44 +13,35 @@ import com.avaje.ebeaninternal.server.deploy.TableJoin;
public class SqlTreeProperties {
private static final TableJoin[] EMPTY_TABLE_JOINS = new TableJoin[0];
private final BeanDescriptor<?> desc;
// /**
// * The included Properties that will be used by EntityBeanIntercept
// * to determine lazy loading on partial objects.
// */
Set<String> includedProps;
/**
* True if this node of the tree should have read only entity beans.
*/
boolean readOnly;
private boolean readOnly;
/**
* set to false if the id field is not included.
*/
boolean includeId = true;
private boolean includeId = true;
TableJoin[] tableJoins = EMPTY_TABLE_JOINS;
private TableJoin[] tableJoins = EMPTY_TABLE_JOINS;
/**
* The bean properties in order.
*/
List<BeanProperty> propsList = new ArrayList<BeanProperty>();
private List<BeanProperty> propsList = new ArrayList<BeanProperty>();
/**
* Maintain a list of property names to detect embedded bean additions.
*/
LinkedHashSet<String> propNames = new LinkedHashSet<String>();
private LinkedHashSet<String> propNames = new LinkedHashSet<String>();
private boolean allProperties;
public SqlTreeProperties(BeanDescriptor<?> desc) {
this.desc = desc;
public SqlTreeProperties() {
}
public boolean containsProperty(String propName){
public boolean containsProperty(String propName){
return propNames.contains(propName);
}