Revision 45739 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.impl/src/main/java/org/gvsig/fmap/dal/feature/impl/DefaultForeingKey.java
DefaultForeingKey.java | ||
---|---|---|
22 | 22 |
import org.gvsig.fmap.dal.spi.DataManagerProviderServices; |
23 | 23 |
import org.gvsig.tools.ToolsLocator; |
24 | 24 |
import org.gvsig.tools.dispose.DisposeUtils; |
25 |
import org.gvsig.tools.dynobject.DynObject; |
|
25 | 26 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
26 | 27 |
import org.gvsig.tools.dynobject.DynStruct; |
27 | 28 |
import org.gvsig.tools.persistence.PersistenceManager; |
... | ... | |
47 | 48 |
private Expression labelExpression; |
48 | 49 |
private SymbolTable symbolTable; |
49 | 50 |
private FeatureSymbolTable featureSymbolTable; |
51 |
private DynObject contextValues; |
|
50 | 52 |
private int refs; |
51 | 53 |
|
52 | 54 |
public DefaultContextForeingKey() { |
... | ... | |
64 | 66 |
@Override |
65 | 67 |
public void dispose() { |
66 | 68 |
DisposeUtils.disposeQuietly(featureStore); |
69 |
DisposeUtils.disposeQuietly(contextValues); |
|
67 | 70 |
this.featureStore = null; |
68 | 71 |
this.storesRepository = null; |
69 | 72 |
this.labelExpression = null; |
... | ... | |
128 | 131 |
} |
129 | 132 |
return this.symbolTable; |
130 | 133 |
} |
134 |
|
|
135 |
@Override |
|
136 |
public DynObject getContextValues() { |
|
137 |
return this.contextValues; |
|
138 |
} |
|
139 |
|
|
140 |
@Override |
|
141 |
public void setContextValues(DynObject values) { |
|
142 |
this.contextValues = values; |
|
143 |
} |
|
131 | 144 |
} |
132 | 145 |
|
133 | 146 |
private boolean foreingKey; |
... | ... | |
395 | 408 |
return null; |
396 | 409 |
} |
397 | 410 |
if( this.availableValues == null ) { |
411 |
DynObject contextValues = null; |
|
412 |
if( context != null ) { |
|
413 |
contextValues = context.getContextValues(); |
|
414 |
} |
|
398 | 415 |
DataManagerProviderServices dataManager = (DataManagerProviderServices) DALLocator.getDataManager(); |
399 | 416 |
FeatureStore myStore = this.descriptor.getStore(); |
400 | 417 |
if( myStore!=null ) { |
401 |
this.availableValues = dataManager.getAvailableValues(myStore, this.descriptor); |
|
418 |
this.availableValues = dataManager.getAvailableValues(contextValues, myStore, this.descriptor);
|
|
402 | 419 |
} |
403 | 420 |
} |
404 | 421 |
return this.availableValues; |
Also available in: Unified diff