/** * Read the result data from the target store based on <code>sourceData</code> and <code>sourceField</code> * * @param targetStore * @param sourceData * @param sourceField * @return * @throws DataStoreException */ private List<Object> readResultData(final DataStore<?> targetStore, final Object sourceData, final Field sourceField) throws DataStoreException { Object navigationInstance = getValue(sourceField, sourceData); if (navigationInstance == null) { return Collections.emptyList(); } List<Object> resultData = new ArrayList<Object>(); for (Object targetInstance : targetStore.read()) { if (navigationInstance instanceof Collection) { for (Object object : (Collection<?>) navigationInstance) { if (targetStore.isKeyEqualChecked(targetInstance, object)) { resultData.add(targetInstance); } } } else if (targetStore.isKeyEqualChecked(targetInstance, navigationInstance)) { resultData.add(targetInstance); } } return resultData; }
/** * Read the result data from the target store based on <code>sourceData</code> and <code>sourceField</code> * * @param targetStore * @param sourceData * @param sourceField * @return * @throws DataStoreException */ private List<Object> readResultData(final DataStore<?> targetStore, final Object sourceData, final Field sourceField) throws DataStoreException { Object navigationInstance = getValue(sourceField, sourceData); if (navigationInstance == null) { return Collections.emptyList(); } List<Object> resultData = new ArrayList<Object>(); for (Object targetInstance : targetStore.read()) { if (navigationInstance instanceof Collection) { for (Object object : (Collection<?>) navigationInstance) { if (targetStore.isKeyEqualChecked(targetInstance, object)) { resultData.add(targetInstance); } } } else if (targetStore.isKeyEqualChecked(targetInstance, navigationInstance)) { resultData.add(targetInstance); } } return resultData; }
/** * Read the result data from the target store based on <code>sourceData</code> and <code>sourceField</code> * * @param targetStore * @param sourceData * @param sourceField * @return * @throws DataStoreException */ private List<Object> readResultData(final DataStore<?> targetStore, final Object sourceData, final Field sourceField) throws DataStoreException { Object navigationInstance = getValue(sourceField, sourceData); if (navigationInstance == null) { return Collections.emptyList(); } List<Object> resultData = new ArrayList<Object>(); for (Object targetInstance : targetStore.read()) { if (navigationInstance instanceof Collection) { for (Object object : (Collection<?>) navigationInstance) { if (targetStore.isKeyEqualChecked(targetInstance, object)) { resultData.add(targetInstance); } } } else if (targetStore.isKeyEqualChecked(targetInstance, navigationInstance)) { resultData.add(targetInstance); } } return resultData; }
ANNOTATION_HELPER.setKeyFields(keyInstance, targetKeys); for (Object result : resultData) { if (targetStore.isKeyEqualChecked(result, keyInstance)) { return result;
ANNOTATION_HELPER.setKeyFields(keyInstance, targetKeys); for (Object result : resultData) { if (targetStore.isKeyEqualChecked(result, keyInstance)) { return result;
ANNOTATION_HELPER.setKeyFields(keyInstance, targetKeys); for (Object result : resultData) { if (targetStore.isKeyEqualChecked(result, keyInstance)) { return result;