conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
import org.broadleafcommerce.openadmin.web.form.entity.Tab;
import org.springframework.beans.factory.annotation.Value;
>>>>>>>
import org.springframework.beans.factory.annotation.Value;
<<<<<<<
=======
@Value("${admin.form.validation.errors.hideTopLevelErrors}")
protected boolean hideTopLevelErrors = false;
@Resource(name = "blAdornedTargetAutoPopulateExtensionManager")
protected AdornedTargetAutoPopulateExtensionManager adornedTargetAutoPopulateExtensionManager;
@Resource(name = "blRowLevelSecurityService")
protected RowLevelSecurityService rowLevelSecurityService;
>>>>>>>
@Resource(name = "blAdornedTargetAutoPopulateExtensionManager")
protected AdornedTargetAutoPopulateExtensionManager adornedTargetAutoPopulateExtensionManager;
@Resource(name = "blRowLevelSecurityService")
protected RowLevelSecurityService rowLevelSecurityService;
<<<<<<<
listGrid.setSelectType(ListGrid.SelectType.NONE);
=======
if (CollectionUtils.isEmpty(listGrid.getHeaderFields())) {
throw new IllegalStateException("At least 1 field must be set to prominent to display in a main grid");
}
List<EntityFormAction> mainActions = new ArrayList<EntityFormAction>();
addAddActionIfAllowed(sectionClassName, cmd, mainActions);
extensionManager.getProxy().addAdditionalMainActions(sectionClassName, mainActions);
extensionManager.getProxy().modifyMainActions(cmd, mainActions);
>>>>>>>
listGrid.setSelectType(ListGrid.SelectType.NONE);
<<<<<<<
/**
*
* @param request
* @param response
* @param model
* @param pathVars
* @param id
* @param collectionField
* @param requestParams
* @return Json collection data
* @throws Exception
*/
@RequestMapping(value = "/{id}/{collectionField:.*}/selectize", method = RequestMethod.GET)
public @ResponseBody Map<String, Object> getSelectizeCollectionOptions(HttpServletRequest request, HttpServletResponse response, Model model,
@PathVariable Map<String, String> pathVars,
@PathVariable(value = "id") String id,
@PathVariable(value = "collectionField") String collectionField,
@RequestParam MultiValueMap<String, String> requestParams) throws Exception {
String sectionKey = getSectionKey(pathVars);
String mainClassName = getClassNameForSection(sectionKey);
List<SectionCrumb> sectionCrumbs = getSectionCrumbs(request, sectionKey, id);
ClassMetadata mainMetadata = service.getClassMetadata(getSectionPersistencePackageRequest(mainClassName,
sectionCrumbs, pathVars)).getDynamicResultSet().getClassMetaData();
Property collectionProperty = mainMetadata.getPMap().get(collectionField);
FieldMetadata md = collectionProperty.getMetadata();
PersistencePackageRequest ppr = PersistencePackageRequest.fromMetadata(md, sectionCrumbs)
.withFilterAndSortCriteria(getCriteria(requestParams))
.withStartIndex(getStartIndex(requestParams))
.withMaxIndex(getMaxIndex(requestParams));
if (md instanceof AdornedTargetCollectionMetadata) {
ppr.setOperationTypesOverride(null);
ppr.setType(PersistencePackageRequest.Type.STANDARD);
ppr.setSectionEntityField(collectionField);
}
DynamicResultSet drs = service.getRecords(ppr).getDynamicResultSet();
return formService.buildSelectizeCollectionInfo(id, drs, collectionProperty, sectionKey, sectionCrumbs);
}
/**
* Adds the requested collection item via Selectize
*
* @param request
* @param response
* @param model
* @param pathVars
* @param id
* @param collectionField
* @param entityForm
* @return the return view path
* @throws Exception
*/
@RequestMapping(value = "/{id}/{collectionField:.*}/selectize-add", method = RequestMethod.POST)
public @ResponseBody Map<String, Object> addSelectizeCollectionItem(HttpServletRequest request, HttpServletResponse response, Model model,
@PathVariable Map<String, String> pathVars,
@PathVariable(value="id") String id,
@PathVariable(value="collectionField") String collectionField,
@ModelAttribute(value="entityForm") EntityForm entityForm, BindingResult result) throws Exception {
Map<String, Object> returnVal = new HashMap<>();
String sectionKey = getSectionKey(pathVars);
String mainClassName = getClassNameForSection(sectionKey);
List<SectionCrumb> sectionCrumbs = getSectionCrumbs(request, sectionKey, id);
ClassMetadata mainMetadata = service.getClassMetadata(getSectionPersistencePackageRequest(mainClassName, sectionCrumbs, pathVars)).getDynamicResultSet().getClassMetaData();
Property collectionProperty = mainMetadata.getPMap().get(collectionField);
if (StringUtils.isBlank(entityForm.getEntityType())) {
FieldMetadata fmd = collectionProperty.getMetadata();
if (fmd instanceof BasicCollectionMetadata) {
entityForm.setEntityType(((BasicCollectionMetadata) fmd).getCollectionCeilingEntity());
}
}
PersistencePackageRequest ppr = getSectionPersistencePackageRequest(mainClassName, sectionCrumbs, pathVars);
Entity entity = service.getRecord(ppr, id, mainMetadata, false).getDynamicResultSet().getRecords()[0];
// First, we must save the collection entity
PersistenceResponse persistenceResponse = service.addSubCollectionEntity(entityForm, mainMetadata, collectionProperty, entity, sectionCrumbs);
Entity savedEntity = persistenceResponse.getEntity();
entityFormValidator.validate(entityForm, savedEntity, result);
if (result.hasErrors()) {
returnVal.put("error", result.getFieldError());
return returnVal;
}
if (savedEntity.findProperty(ALTERNATE_ID_PROPERTY) != null) {
returnVal.put("alternateId", savedEntity.findProperty(ALTERNATE_ID_PROPERTY).getValue());
}
return returnVal;
}
=======
@RequestMapping(value = "/{id}/{collectionField:.*}/add/{collectionItemId}/verify", method = RequestMethod.POST)
public @ResponseBody Map<String, Object> addCollectionItem(HttpServletRequest request, HttpServletResponse response, Model model,
@PathVariable Map<String, String> pathVars,
@PathVariable(value="id") String id,
@PathVariable(value="collectionField") String collectionField,
@PathVariable(value="collectionItemId") String collectionItemId) throws Exception {
String sectionKey = getSectionKey(pathVars);
String mainClassName = getClassNameForSection(sectionKey);
List<SectionCrumb> sectionCrumbs = getSectionCrumbs(request, sectionKey, id);
ClassMetadata mainMetadata = service.getClassMetadata(getSectionPersistencePackageRequest(mainClassName, sectionCrumbs, pathVars)).getDynamicResultSet().getClassMetaData();
Property collectionProperty = mainMetadata.getPMap().get(collectionField);
FieldMetadata md = collectionProperty.getMetadata();
Map<String, Object> responseMap = new HashMap<String, Object>();
if (md instanceof AdornedTargetCollectionMetadata) {
adornedTargetAutoPopulateExtensionManager.getProxy().autoSetAdornedTargetManagedFields(md, mainClassName, id,
collectionField,
collectionItemId, responseMap);
}
return responseMap;
}
>>>>>>>
/**
*
* @param request
* @param response
* @param model
* @param pathVars
* @param id
* @param collectionField
* @param requestParams
* @return Json collection data
* @throws Exception
*/
@RequestMapping(value = "/{id}/{collectionField:.*}/selectize", method = RequestMethod.GET)
public @ResponseBody Map<String, Object> getSelectizeCollectionOptions(HttpServletRequest request, HttpServletResponse response, Model model,
@PathVariable Map<String, String> pathVars,
@PathVariable(value = "id") String id,
@PathVariable(value = "collectionField") String collectionField,
@RequestParam MultiValueMap<String, String> requestParams) throws Exception {
String sectionKey = getSectionKey(pathVars);
String mainClassName = getClassNameForSection(sectionKey);
List<SectionCrumb> sectionCrumbs = getSectionCrumbs(request, sectionKey, id);
ClassMetadata mainMetadata = service.getClassMetadata(getSectionPersistencePackageRequest(mainClassName,
sectionCrumbs, pathVars)).getDynamicResultSet().getClassMetaData();
Property collectionProperty = mainMetadata.getPMap().get(collectionField);
FieldMetadata md = collectionProperty.getMetadata();
PersistencePackageRequest ppr = PersistencePackageRequest.fromMetadata(md, sectionCrumbs)
.withFilterAndSortCriteria(getCriteria(requestParams))
.withStartIndex(getStartIndex(requestParams))
.withMaxIndex(getMaxIndex(requestParams));
if (md instanceof AdornedTargetCollectionMetadata) {
ppr.setOperationTypesOverride(null);
ppr.setType(PersistencePackageRequest.Type.STANDARD);
ppr.setSectionEntityField(collectionField);
}
DynamicResultSet drs = service.getRecords(ppr).getDynamicResultSet();
return formService.buildSelectizeCollectionInfo(id, drs, collectionProperty, sectionKey, sectionCrumbs);
}
/**
* Adds the requested collection item via Selectize
*
* @param request
* @param response
* @param model
* @param pathVars
* @param id
* @param collectionField
* @param entityForm
* @return the return view path
* @throws Exception
*/
@RequestMapping(value = "/{id}/{collectionField:.*}/selectize-add", method = RequestMethod.POST)
public @ResponseBody Map<String, Object> addSelectizeCollectionItem(HttpServletRequest request, HttpServletResponse response, Model model,
@PathVariable Map<String, String> pathVars,
@PathVariable(value="id") String id,
@PathVariable(value="collectionField") String collectionField,
@ModelAttribute(value="entityForm") EntityForm entityForm, BindingResult result) throws Exception {
Map<String, Object> returnVal = new HashMap<>();
String sectionKey = getSectionKey(pathVars);
String mainClassName = getClassNameForSection(sectionKey);
List<SectionCrumb> sectionCrumbs = getSectionCrumbs(request, sectionKey, id);
ClassMetadata mainMetadata = service.getClassMetadata(getSectionPersistencePackageRequest(mainClassName, sectionCrumbs, pathVars)).getDynamicResultSet().getClassMetaData();
Property collectionProperty = mainMetadata.getPMap().get(collectionField);
if (StringUtils.isBlank(entityForm.getEntityType())) {
FieldMetadata fmd = collectionProperty.getMetadata();
if (fmd instanceof BasicCollectionMetadata) {
entityForm.setEntityType(((BasicCollectionMetadata) fmd).getCollectionCeilingEntity());
}
}
PersistencePackageRequest ppr = getSectionPersistencePackageRequest(mainClassName, sectionCrumbs, pathVars);
Entity entity = service.getRecord(ppr, id, mainMetadata, false).getDynamicResultSet().getRecords()[0];
// First, we must save the collection entity
PersistenceResponse persistenceResponse = service.addSubCollectionEntity(entityForm, mainMetadata, collectionProperty, entity, sectionCrumbs);
Entity savedEntity = persistenceResponse.getEntity();
entityFormValidator.validate(entityForm, savedEntity, result);
if (result.hasErrors()) {
returnVal.put("error", result.getFieldError());
return returnVal;
}
if (savedEntity.findProperty(ALTERNATE_ID_PROPERTY) != null) {
returnVal.put("alternateId", savedEntity.findProperty(ALTERNATE_ID_PROPERTY).getValue());
}
return returnVal;
} |
<<<<<<<
protected Boolean isMultiColumn;
=======
private boolean isTabsPresent = false;
>>>>>>>
protected Boolean isMultiColumn;
private boolean isTabsPresent = false;
<<<<<<<
public Boolean getIsMultiColumn() {
return isMultiColumn == null ? false : isMultiColumn;
}
public void setIsMultiColumn(Boolean isMultiColumn) {
this.isMultiColumn = isMultiColumn;
}
=======
public boolean isTabsPresent() {
return isTabsPresent;
}
public void setTabsPresent(boolean isTabsPresent) {
this.isTabsPresent = isTabsPresent;
}
>>>>>>>
public Boolean getIsMultiColumn() {
return isMultiColumn == null ? false : isMultiColumn;
}
public void setIsMultiColumn(Boolean isMultiColumn) {
this.isMultiColumn = isMultiColumn;
}
public boolean isTabsPresent() {
return isTabsPresent;
}
public void setTabsPresent(boolean isTabsPresent) {
this.isTabsPresent = isTabsPresent;
} |
<<<<<<<
=======
import org.codehaus.jackson.map.ObjectMapper;
>>>>>>>
<<<<<<<
import com.fasterxml.jackson.core.Version;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import java.io.IOException;
=======
>>>>>>>
import com.fasterxml.jackson.databind.ObjectMapper;
<<<<<<<
protected DataWrapper convertJsonToDataWrapper(String json) {
ObjectMapper mapper = new ObjectMapper();
DataDTODeserializer dtoDeserializer = new DataDTODeserializer();
SimpleModule module = new SimpleModule("DataDTODeserializerModule", new Version(1, 0, 0, null, null, null));
module.addDeserializer(DataDTO.class, dtoDeserializer);
mapper.registerModule(module);
if (json == null || "[]".equals(json)){
return null;
}
try {
return mapper.readValue(json, DataWrapper.class);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
protected String convertMatchRuleJsonToMvel(DataDTOToMVELTranslator translator, String entityKey,
String fieldService, DataWrapper dw) {
String mvel = null;
//there can only be one DataDTO for an appliesTo* rule
if (dw != null && dw.getData().size() == 1) {
DataDTO dto = dw.getData().get(0);
try {
mvel = translator.createMVEL(entityKey, dto,
ruleBuilderFieldServiceFactory.createInstance(fieldService));
} catch (MVELTranslationException e) {
throw new RuntimeException(e);
}
}
return mvel;
}
=======
>>>>>>> |
<<<<<<<
public static final String FULFILLMENT_LOCATION = "org.broadleafcommerce.core.inventory.domain.FulfillmentLocationImpl";
public static final String INVENTORY = "org.broadleafcommerce.core.inventory.domain.InventoryImpl";
=======
public static final String PRICE_DATA = "org.broadleafcommerce.core.pricing.domain.PriceDataImpl";
public static final String PRICELIST = "org.broadleafcommerce.core.pricing.domain.PriceListImpl";
public static final String PRICE_ADJUSTMENT = "org.broadleafcommerce.core.pricing.domain.PriceAdjustmentImpl";
public static final String PRODUCT_OPTION_VALUE_TRANSLATION = "org.broadleafcommerce.core.catalog.domain.ProductOptionValueTranslationImpl";
public static final String SKU_TRANSLATION = "org.broadleafcommerce.core.catalog.domain.SkuTranslationImpl";
>>>>>>>
public static final String PRICE_DATA = "org.broadleafcommerce.core.pricing.domain.PriceDataImpl";
public static final String PRICELIST = "org.broadleafcommerce.core.pricing.domain.PriceListImpl";
public static final String PRICE_ADJUSTMENT = "org.broadleafcommerce.core.pricing.domain.PriceAdjustmentImpl";
public static final String PRODUCT_OPTION_VALUE_TRANSLATION = "org.broadleafcommerce.core.catalog.domain.ProductOptionValueTranslationImpl";
public static final String SKU_TRANSLATION = "org.broadleafcommerce.core.catalog.domain.SkuTranslationImpl";
public static final String FULFILLMENT_LOCATION = "org.broadleafcommerce.core.inventory.domain.FulfillmentLocationImpl";
public static final String INVENTORY = "org.broadleafcommerce.core.inventory.domain.InventoryImpl"; |
<<<<<<<
List<Long> readSkuIdsForProductOptionValues(Long productId, String attributeName, String attributeValue, List<Long> possibleSkuIds);
=======
public Long countProductsUsingProductOptionById(Long productOptionId);
/**
* Returns a paginated list of Product Ids that are using the passed in ProductOption ID
*
* @param productOptionId
* @param start
* @param pageSize
* @return
*/
public List<Long> findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize);
>>>>>>>
List<Long> readSkuIdsForProductOptionValues(Long productId, String attributeName, String attributeValue, List<Long> possibleSkuIds);
public Long countProductsUsingProductOptionById(Long productOptionId);
/**
* Returns a paginated list of Product Ids that are using the passed in ProductOption ID
*
* @param productOptionId
* @param start
* @param pageSize
* @return
*/
public List<Long> findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize); |
<<<<<<<
import io.nuls.tools.io.IoUtils;
import io.nuls.tools.log.logback.LoggerBuilder;
=======
>>>>>>>
import io.nuls.tools.io.IoUtils;
import io.nuls.tools.log.logback.LoggerBuilder;
<<<<<<<
import java.util.List;
=======
import java.util.HashMap;
>>>>>>>
import java.util.List;
import java.util.HashMap;
<<<<<<<
import static io.nuls.base.constant.BaseConstant.PROTOCOL_CONFIG_COMPARATOR;
import static io.nuls.base.constant.BaseConstant.PROTOCOL_CONFIG_FILE;
import static io.nuls.transaction.utils.LoggerUtil.Log;
=======
import static io.nuls.transaction.utils.LoggerUtil.LOG;
>>>>>>>
import static io.nuls.base.constant.BaseConstant.PROTOCOL_CONFIG_COMPARATOR;
import static io.nuls.base.constant.BaseConstant.PROTOCOL_CONFIG_FILE;
import static io.nuls.transaction.utils.LoggerUtil.Log;
import static io.nuls.transaction.utils.LoggerUtil.LOG;
<<<<<<<
String json = IoUtils.read(PROTOCOL_CONFIG_FILE);
List<ProtocolConfigJson> protocolConfigs = JSONUtils.json2list(json, ProtocolConfigJson.class);
protocolConfigs.sort(PROTOCOL_CONFIG_COMPARATOR);
Map<Short, Protocol> protocolMap = ProtocolLoader.load(protocolConfigs);
ProtocolGroupManager.init(chainId, protocolMap, (short) 1);
=======
chain.getLoggerMap().get(TxConstant.LOG_TX).debug("Chain:{} init success..", chainId);
>>>>>>>
chain.getLoggerMap().get(TxConstant.LOG_TX).debug("Chain:{} init success..", chainId);
String json = IoUtils.read(PROTOCOL_CONFIG_FILE);
List<ProtocolConfigJson> protocolConfigs = JSONUtils.json2list(json, ProtocolConfigJson.class);
protocolConfigs.sort(PROTOCOL_CONFIG_COMPARATOR);
Map<Short, Protocol> protocolMap = ProtocolLoader.load(protocolConfigs);
ProtocolGroupManager.init(chainId, protocolMap, (short) 1); |
<<<<<<<
@Override
public Map<String, PriceAdjustment> getPriceAdjustmentMap() {
return priceAdjustmentMap;
}
@Override
public void setPriceAdjustmentMap(Map<String, PriceAdjustment> priceDataMap) {
this.priceAdjustmentMap = priceDataMap;
}
@Override
public Map<String, ProductOptionValueTranslation> getTranslations() {
return null;
}
@Override
public void setTranslations(Map<String, ProductOptionValueTranslation> translations) {
}
=======
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ProductOptionValueImpl other = (ProductOptionValueImpl) obj;
if (id != null && other.id != null) {
return id.equals(other.id);
}
if (getAttributeValue() == null) {
if (other.getAttributeValue() != null) {
return false;
}
} else if (!getAttributeValue().equals(other.getAttributeValue())) {
return false;
}
return true;
}
>>>>>>>
@Override
public Map<String, PriceAdjustment> getPriceAdjustmentMap() {
return priceAdjustmentMap;
}
@Override
public void setPriceAdjustmentMap(Map<String, PriceAdjustment> priceDataMap) {
this.priceAdjustmentMap = priceDataMap;
}
@Override
public Map<String, ProductOptionValueTranslation> getTranslations() {
return null;
}
@Override
public void setTranslations(Map<String, ProductOptionValueTranslation> translations) {
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ProductOptionValueImpl other = (ProductOptionValueImpl) obj;
if (id != null && other.id != null) {
return id.equals(other.id);
}
if (getAttributeValue() == null) {
if (other.getAttributeValue() != null) {
return false;
}
} else if (!getAttributeValue().equals(other.getAttributeValue())) {
return false;
}
return true;
} |
<<<<<<<
import org.broadleafcommerce.core.order.service.call.ConfigurableOrderItemRequest;
=======
>>>>>>>
import org.broadleafcommerce.core.order.service.call.ConfigurableOrderItemRequest;
<<<<<<<
protected Sku findMatchingSku(Product product, Map<String, String> attributeValues, ActivityMessages messages) throws RequiredAttributeNotProvidedException {
Map<String, String> attributeValuesForSku = new HashMap<>();
Sku matchingSku = null;
=======
protected Sku findMatchingSku(Product product, Map<String, String> attributeValues, ActivityMessages messages) {
Map<String, String> attributesRelevantToFindMatchingSku = new HashMap<>();
>>>>>>>
protected Sku findMatchingSku(Product product, Map<String, String> attributeValues, ActivityMessages messages) throws RequiredAttributeNotProvidedException {
Map<String, String> attributesRelevantToFindMatchingSku = new HashMap<>();
<<<<<<<
protected void putAttributeValueForSku(Map<String, String> attributeValuesForSku, ProductOption productOption,
String attributeName, String attributeValue, Long productId) {
if (StringUtils.isEmpty(attributeValue)) {
String message = "Unable to add to product (" + productId + ") cart. Required attribute was not provided: "
+ attributeName;
throw new RequiredAttributeNotProvidedException(message, attributeName, String.valueOf(productId));
} else if (productOption.getUseInSkuGeneration()) {
attributeValuesForSku.put(attributeName, attributeValue);
}
}
protected boolean shouldValidateWithException(boolean isRequired, boolean isAddOrNoneType, String attributeValue) {
return isAddOrNoneType && (isRequired || !StringUtils.isEmpty(attributeValue));
=======
protected boolean shouldValidateWithException(boolean isRequired, boolean isAddOrNoneType, String attributeValue, boolean hasStrategy) {
return (!hasStrategy || isAddOrNoneType) && (isRequired || StringUtils.isNotEmpty(attributeValue));
>>>>>>>
protected boolean shouldValidateWithException(boolean isRequired, boolean isAddOrNoneType, String attributeValue, boolean hasStrategy) {
return (!hasStrategy || isAddOrNoneType) && (isRequired || StringUtils.isNotEmpty(attributeValue)); |
<<<<<<<
public void initializeLookup(final String propertyName, final LookupMetadata metadata) {
final String dataSourceName = metadata.getDefaultDataSource().getDataURL() + "_" + propertyName + "Lookup";
if (presenterSequenceSetupManager.getDataSource(dataSourceName) != null) {
java.util.logging.Logger.getLogger(getClass().toString()).log(Level.FINE, "Detected collection metadata for a datasource that is already registered (" + dataSourceName + "). Ignoring this repeated definition.");
return;
}
presenterSequenceSetupManager.addOrReplaceItem(new PresenterSetupItem(dataSourceName, new ForeignKeyLookupDataSourceFactory(metadata.getLookupForeignKey()), new AsyncCallbackAdapter() {
@Override
public void onSetupSuccess(DataSource lookupDS) {
EntitySearchDialog searchView = new EntitySearchDialog((ListGridDataSource) lookupDS, true);
String viewTitle = BLCMain.getMessageManager().getString(metadata.getFriendlyName());
if (viewTitle == null) {
viewTitle = metadata.getFriendlyName();
=======
for (final Map.Entry<String, LookupMetadata> entry : lookupMetadatas.entrySet()) {
if (entry.getKey().startsWith(getClass().getName())) {
final String key = entry.getKey().substring(entry.getKey().indexOf("_") + 1, entry.getKey().length());
final String dataSourceName = key + "Lookup";
if (presenterSequenceSetupManager.containsDataSource(dataSourceName)) {
java.util.logging.Logger.getLogger(getClass().toString()).log(Level.FINE, "Detected collection metadata for a datasource that is already registered (" + dataSourceName + "). Ignoring this repeated definition.");
continue;
>>>>>>>
public void initializeLookup(final String propertyName, final LookupMetadata metadata) {
final String dataSourceName = metadata.getDefaultDataSource().getDataURL() + "_" + propertyName + "Lookup";
if (presenterSequenceSetupManager.containsDataSource(dataSourceName)) {
java.util.logging.Logger.getLogger(getClass().toString()).log(Level.FINE, "Detected collection metadata for a datasource that is already registered (" + dataSourceName + "). Ignoring this repeated definition.");
return;
}
presenterSequenceSetupManager.addOrReplaceItem(new PresenterSetupItem(dataSourceName, new ForeignKeyLookupDataSourceFactory(metadata.getLookupForeignKey()), new AsyncCallbackAdapter() {
@Override
public void onSetupSuccess(DataSource lookupDS) {
EntitySearchDialog searchView = new EntitySearchDialog((ListGridDataSource) lookupDS, true);
String viewTitle = BLCMain.getMessageManager().getString(metadata.getFriendlyName());
if (viewTitle == null) {
viewTitle = metadata.getFriendlyName(); |
<<<<<<<
public static final String TRANSLATABLE = "translatable";
=======
public static final String ASSOCIATEDFIELDNAME = "associatedFieldName";
>>>>>>>
public static final String TRANSLATABLE = "translatable";
public static final String ASSOCIATEDFIELDNAME = "associatedFieldName"; |
<<<<<<<
import org.broadleafcommerce.common.money.Money;
import org.broadleafcommerce.core.offer.service.type.OfferDeliveryType;
import org.broadleafcommerce.core.offer.service.type.OfferDiscountType;
import org.broadleafcommerce.core.offer.service.type.OfferItemRestrictionRuleType;
import org.broadleafcommerce.core.offer.service.type.OfferType;
=======
import javax.annotation.Nonnull;
>>>>>>>
import org.broadleafcommerce.common.money.Money;
import org.broadleafcommerce.core.offer.service.type.OfferDeliveryType;
import org.broadleafcommerce.core.offer.service.type.OfferDiscountType;
import org.broadleafcommerce.core.offer.service.type.OfferItemRestrictionRuleType;
import org.broadleafcommerce.core.offer.service.type.OfferType;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
import java.util.Set;
<<<<<<<
boolean isStackable();
=======
@Deprecated
public boolean isStackable();
>>>>>>>
@Deprecated
public boolean isStackable();
<<<<<<<
OfferDeliveryType getDeliveryType();
=======
@Deprecated
public OfferDeliveryType getDeliveryType();
>>>>>>>
@Deprecated
public OfferDeliveryType getDeliveryType();
<<<<<<<
void setDeliveryType(OfferDeliveryType deliveryType);
=======
@Deprecated
public void setDeliveryType(OfferDeliveryType deliveryType);
>>>>>>>
@Deprecated
public void setDeliveryType(OfferDeliveryType deliveryType);
<<<<<<<
Long getMaxUsesPerCustomer();
=======
@Nonnull
public Long getMaxUsesPerCustomer();
>>>>>>>
public Long getMaxUsesPerCustomer();
<<<<<<<
void setMaxUsesPerCustomer(Long maxUses);
=======
public void setMaxUsesPerCustomer(Long maxUses);
/**
* Indicates that there is no limit to how many times a customer can use this offer. By default this is true if
* {@link #getMaxUsesPerCustomer()} == 0
*/
public boolean isUnlimitedUsePerCustomer();
/**
* Whether or not this offer has limited use in an order. By default this is true if {@link #getMaxUsesPerCustomer()} > 0
*/
public boolean isLimitedUsePerCustomer();
>>>>>>>
public void setMaxUsesPerCustomer(Long maxUses);
/**
* Indicates that there is no limit to how many times a customer can use this offer. By default this is true if
* {@link #getMaxUsesPerCustomer()} == 0
*/
public boolean isUnlimitedUsePerCustomer();
/**
* Whether or not this offer has limited use in an order. By default this is true if {@link #getMaxUsesPerCustomer()} > 0
*/
public boolean isLimitedUsePerCustomer();
<<<<<<<
int getMaxUses() ;
=======
@Deprecated
public int getMaxUses();
>>>>>>>
@Deprecated
public int getMaxUses() ;
<<<<<<<
void setMaxUses(int maxUses) ;
=======
@Deprecated
public void setMaxUses(int maxUses) ;
>>>>>>>
@Deprecated
public void setMaxUses(int maxUses) ; |
<<<<<<<
if (SkuAccessor.class.isAssignableFrom(orderItem.getClass())) {
Sku sku = ((SkuAccessor) orderItem).getSku();
sb.append("ga('" + trackerPrefix + "ecommerce:addItem', {");
sb.append("'id': '" + order.getOrderNumber() + "'");
sb.append(",'name': '" + sku.getName() + "'");
sb.append(",'sku': '" + sku.getId() + "'");
sb.append(",'category': '" + getVariation(orderItem) + "'");
sb.append(",'price': '" + orderItem.getAveragePrice() + "'");
sb.append(",'quantity': '" + orderItem.getQuantity() + "'");
sb.append("});");
}
=======
if (orderItem instanceof DiscreteOrderItem) {
Sku sku = ((SkuAccessor) orderItem).getSku();
sb.append("ga('" + trackerPrefix + "ecommerce:addItem', {");
sb.append("'id': '" + order.getOrderNumber() + "'");
sb.append(",'name': '" + sku.getName() + "'");
sb.append(",'sku': '" + sku.getId() + "'");
sb.append(",'category': '" + getVariation(orderItem) + "'");
sb.append(",'price': '" + orderItem.getAveragePrice() + "'");
sb.append(",'quantity': '" + orderItem.getQuantity() + "'");
sb.append("});");
}
>>>>>>>
if (orderItem instanceof DiscreteOrderItem) {
if (SkuAccessor.class.isAssignableFrom(orderItem.getClass())) {
Sku sku = ((SkuAccessor) orderItem).getSku();
sb.append("ga('" + trackerPrefix + "ecommerce:addItem', {");
sb.append("'id': '" + order.getOrderNumber() + "'");
sb.append(",'name': '" + sku.getName() + "'");
sb.append(",'sku': '" + sku.getId() + "'");
sb.append(",'category': '" + getVariation(orderItem) + "'");
sb.append(",'price': '" + orderItem.getAveragePrice() + "'");
sb.append(",'quantity': '" + orderItem.getQuantity() + "'");
sb.append("});");
}
} |
<<<<<<<
=======
/**
* Generates an access token and then emails the user.
*
* @param userName - the user to send a reset password email to.
* @param forgotPasswordUrl - Base url to include in the email.
* @return Response can contain errors including (invalidEmail, invalidUsername, inactiveUser)
*
*/
GenericResponse sendForcedPasswordChangeNotification(String userName, String forgotPasswordUrl);
>>>>>>>
/**
* Generates an access token and then emails the user.
*
* @param userName - the user to send a reset password email to.
* @param forgotPasswordUrl - Base url to include in the email.
* @return Response can contain errors including (invalidEmail, invalidUsername, inactiveUser)
*
*/
GenericResponse sendForcedPasswordChangeNotification(String userName, String forgotPasswordUrl); |
<<<<<<<
foreignKey.setOriginatingField(field.getName());
foreignKey.setSortField(sortProperty);
foreignKey.setSortAscending(isAscending);
=======
foreignKey.setOriginatingField(prefix + field.getName());
>>>>>>>
foreignKey.setOriginatingField(prefix + field.getName());
foreignKey.setSortField(sortProperty);
foreignKey.setSortAscending(isAscending);
<<<<<<<
foreignKey.setOriginatingField(field.getName());
foreignKey.setSortField(sortProperty);
foreignKey.setSortAscending(isAscending);
persistencePerspective.addPersistencePerspectiveItem(PersistencePerspectiveItemType.FOREIGNKEY, foreignKey);
=======
foreignKey.setOriginatingField(prefix + field.getName());
>>>>>>>
foreignKey.setOriginatingField(prefix + field.getName());
foreignKey.setSortField(sortProperty);
foreignKey.setSortAscending(isAscending);
persistencePerspective.addPersistencePerspectiveItem(PersistencePerspectiveItemType.FOREIGNKEY, foreignKey); |
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
=======
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
>>>>>>>
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
dirty = checkDirtyState(populateValueRequest, instance, val);
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new Double(populateValueRequest.getRequestedValue()));
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), new Double(populateValueRequest.getRequestedValue()));
=======
Double val = populateValueRequest.getDataFormatProvider().getDecimalFormatter().parse(populateValueRequest.getRequestedValue()).doubleValue();
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
>>>>>>>
Double val = populateValueRequest.getDataFormatProvider().getDecimalFormatter().parse(populateValueRequest.getRequestedValue()).doubleValue();
dirty = checkDirtyState(populateValueRequest, instance, val);
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), new BigDecimal(populateValueRequest.getRequestedValue()));
=======
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
populateValueRequest.getFieldManager()
.setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
format.setParseBigDecimal(true);
>>>>>>>
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
dirty = checkDirtyState(populateValueRequest, instance, val);
populateValueRequest.getFieldManager()
.setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
format.setParseBigDecimal(true);
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
=======
Double val = populateValueRequest.getDataFormatProvider().getDecimalFormatter().parse(populateValueRequest.getRequestedValue()).doubleValue();
>>>>>>>
Double val = populateValueRequest.getDataFormatProvider().getDecimalFormatter().parse(populateValueRequest.getRequestedValue()).doubleValue();
dirty = checkDirtyState(populateValueRequest, instance, val);
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), new Money(new BigDecimal(populateValueRequest.getRequestedValue())));
=======
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), new Money(val));
format.setParseBigDecimal(false);
>>>>>>>
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
dirty = checkDirtyState(populateValueRequest, instance, val);
populateValueRequest.getFieldManager().setFieldValue(instance, populateValueRequest.getProperty().getName(), new Money(val));
format.setParseBigDecimal(false); |
<<<<<<<
@Override
public void setAuditCreationAndUpdateData(Object entity) throws Exception {
setAuditCreationData(entity, new AdminAuditable());
setAuditUpdateData(entity, new AdminAuditable());
=======
public void setAuditCreatedBy(Object entity) throws Exception {
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
if (!brc.getAdmin()) {
return;
}
if (entity.getClass().isAnnotationPresent(Entity.class)) {
Field field = getSingleField(entity.getClass(), getAuditableFieldName());
field.setAccessible(true);
if (field.isAnnotationPresent(Embedded.class)) {
Object auditable = field.get(entity);
if (auditable == null) {
field.set(entity, new AdminAuditable());
auditable = field.get(entity);
}
Field temporalCreatedField = auditable.getClass().getDeclaredField("dateCreated");
Field temporalUpdatedField = auditable.getClass().getDeclaredField("dateUpdated");
Field agentField = auditable.getClass().getDeclaredField("createdBy");
setAuditValueTemporal(temporalCreatedField, auditable);
setAuditValueTemporal(temporalUpdatedField, auditable);
setAuditValueAgent(agentField, auditable);
}
}
>>>>>>>
@Override
public void setAuditCreationAndUpdateData(Object entity) throws Exception {
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
if (!brc.getAdmin()) {
return;
}
setAuditCreationData(entity, new AdminAuditable());
setAuditUpdateData(entity, new AdminAuditable());
<<<<<<<
@Override
public void setAuditUpdateData(Object entity) throws Exception {
setAuditUpdateData(entity, new AdminAuditable());
=======
public void setAuditUpdatedBy(Object entity) throws Exception {
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
if (!brc.getAdmin()) {
return;
}
if (entity.getClass().isAnnotationPresent(Entity.class)) {
Field field = getSingleField(entity.getClass(), getAuditableFieldName());
field.setAccessible(true);
if (field.isAnnotationPresent(Embedded.class)) {
Object auditable = field.get(entity);
if (auditable == null) {
field.set(entity, new AdminAuditable());
auditable = field.get(entity);
}
Field temporalField = auditable.getClass().getDeclaredField("dateUpdated");
Field agentField = auditable.getClass().getDeclaredField("updatedBy");
setAuditValueTemporal(temporalField, auditable);
setAuditValueAgent(agentField, auditable);
}
}
}
protected void setAuditValueTemporal(Field field, Object entity) throws IllegalArgumentException, IllegalAccessException {
Calendar cal = SystemTime.asCalendar();
field.setAccessible(true);
field.set(entity, cal.getTime());
>>>>>>>
@Override
public void setAuditUpdateData(Object entity) throws Exception {
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
if (!brc.getAdmin()) {
return;
}
setAuditUpdateData(entity, new AdminAuditable()); |
<<<<<<<
List<Long> productOptionValueIds = new ArrayList<>();
List<ProductOptionValue> productOptionValues = sku.getProductOptionValues();
for (ProductOptionValue productOptionValue : productOptionValues) {
=======
List<Long> productOptionValueIds = new ArrayList<Long>();
Set<SkuProductOptionValueXref> productOptionValueXrefs = SetUtils.emptyIfNull(sku.getProductOptionValueXrefs());
for (SkuProductOptionValueXref skuProductOptionValueXref : productOptionValueXrefs) {
ProductOptionValue productOptionValue = skuProductOptionValueXref.getProductOptionValue();
>>>>>>>
List<Long> productOptionValueIds = new ArrayList<Long>();
Set<SkuProductOptionValueXref> productOptionValueXrefs = SetUtils.emptyIfNull(sku.getProductOptionValueXrefs());
for (SkuProductOptionValueXref skuProductOptionValueXref : productOptionValueXrefs) {
ProductOptionValue productOptionValue = skuProductOptionValueXref.getProductOptionValue();
<<<<<<<
// Check for Price Overrides
ExtensionResultHolder<Money> priceHolder = new ExtensionResultHolder<>();
priceHolder.setResult(currentPrice);
if (extensionManager != null) {
extensionManager.getProxy().modifyPriceForOverrides(sku, priceHolder, context, tagAttributes);
}
dto.setPrice(BLCMoneyFormatUtils.formatPrice(currentPrice));
=======
dto.setPrice(formatPrice(currentPrice));
>>>>>>>
// Check for Price Overrides
ExtensionResultHolder<Money> priceHolder = new ExtensionResultHolder<>();
priceHolder.setResult(currentPrice);
if (extensionManager != null) {
extensionManager.getProxy().modifyPriceForOverrides(sku, priceHolder, context, tagAttributes);
}
dto.setPrice(BLCMoneyFormatUtils.formatPrice(currentPrice));
<<<<<<<
protected void addAllProductOptionsToModel(Map<String, Object> newModelVars, Product product) {
List<ProductOption> productOptions = product.getProductOptions();
List<ProductOptionDTO> dtos = new ArrayList<>();
for (ProductOption option : productOptions) {
=======
private void addAllProductOptionsToModel(Arguments arguments, Product product) {
List<ProductOptionXref> productOptionXrefs = ListUtils.emptyIfNull(product.getProductOptionXrefs());
List<ProductOptionDTO> dtos = new ArrayList<>();
for (ProductOptionXref optionXref : productOptionXrefs) {
>>>>>>>
protected void addAllProductOptionsToModel(Map<String, Object> newModelVars, Product product) {
List<ProductOptionXref> productOptionXrefs = ListUtils.emptyIfNull(product.getProductOptionXrefs());
List<ProductOptionDTO> dtos = new ArrayList<>();
for (ProductOptionXref optionXref : productOptionXrefs) {
<<<<<<<
dto.setId(option.getId());
dto.setType(option.getType().getType());
Map<Long, String> values = new HashMap<>();
for (ProductOptionValue value : option.getAllowedValues()) {
=======
ProductOption productOption = optionXref.getProductOption();
dto.setId(productOption.getId());
dto.setType(productOption.getType().getType());
Map<Long, String> values = new HashMap<>();
Map<Long, Double> priceAdjustments = new HashMap<>();
for (ProductOptionValue value : productOption.getAllowedValues()) {
>>>>>>>
ProductOption productOption = optionXref.getProductOption();
dto.setId(productOption.getId());
dto.setType(productOption.getType().getType());
Map<Long, String> values = new HashMap<>();
Map<Long, Double> priceAdjustments = new HashMap<>();
for (ProductOptionValue value : productOption.getAllowedValues()) {
<<<<<<<
writeJSONToModel(newModelVars, "allProductOptions", dtos);
=======
writeJSONToModel(arguments, "allProductOptions", dtos);
>>>>>>>
writeJSONToModel(newModelVars, "allProductOptions", dtos);
<<<<<<<
newModelVars.put(modelKey, jsonValue);
=======
addToModel(arguments, modelKey, jsonValue);
>>>>>>>
newModelVars.put(modelKey, jsonValue);
<<<<<<<
protected class ProductOptionDTO {
=======
private String formatPrice(Money price){
if (price == null){
return null;
}
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
if (brc.getJavaLocale() != null) {
return BroadleafCurrencyUtils.getNumberFormatFromCache(brc.getJavaLocale(),
price.getCurrency()).format(price.getAmount());
} else {
// Setup your BLC_CURRENCY and BLC_LOCALE to display a diff default.
return "$ " + price.getAmount().toString();
}
}
private class ProductOptionDTO {
>>>>>>>
protected class ProductOptionDTO {
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
@SuppressWarnings("unused")
=======
>>>>>>>
<<<<<<<
if (price != null ? !price.equals(that.price) : that.price != null) {
return false;
}
if (!Arrays.equals(skuOptions, that.skuOptions)) {
return false;
}
=======
if ((price != null) ? !price.equals(that.price) : (that.price != null)) {
return false;
}
if (!Arrays.equals(skuOptions, that.skuOptions)) {
return false;
}
>>>>>>>
if ((price != null) ? !price.equals(that.price) : (that.price != null)) {
return false;
}
if (!Arrays.equals(skuOptions, that.skuOptions)) {
return false;
} |
<<<<<<<
=======
import java.math.BigDecimal;
>>>>>>>
import java.math.BigDecimal;
<<<<<<<
protected final PromotableOfferUtility promotableOfferUtility;
public OfferServiceUtilitiesImpl(PromotableOfferUtility promotableOfferUtility) {
this.promotableOfferUtility = promotableOfferUtility;
}
=======
@Resource(name = "blGenericEntityService")
protected GenericEntityService entityService;
>>>>>>>
@Resource(name = "blGenericEntityService")
protected GenericEntityService entityService;
protected final PromotableOfferUtility promotableOfferUtility;
public OfferServiceUtilitiesImpl(PromotableOfferUtility promotableOfferUtility) {
this.promotableOfferUtility = promotableOfferUtility;
} |
<<<<<<<
PersistencePackageRequest ppr = PersistencePackageRequest.fromMetadata(md);
ClassMetadata collectionMetadata = service.getClassMetadata(ppr).getDynamicResultSet().getClassMetaData();
=======
PersistencePackageRequest ppr = PersistencePackageRequest.fromMetadata(md)
.withCustomCriteria(new String[] { id });
ClassMetadata collectionMetadata = service.getClassMetadata(ppr);
>>>>>>>
PersistencePackageRequest ppr = PersistencePackageRequest.fromMetadata(md)
.withCustomCriteria(new String[] { id });
ClassMetadata collectionMetadata = service.getClassMetadata(ppr).getDynamicResultSet().getClassMetaData(); |
<<<<<<<
/**
* Used to map the collection to a group defined in AdminPresentationClass using AdminGroupPresentation.
*
* If the group cannot be found in AdminPresentationClass, then the tab specified in
* AdminPresentationAdornedTargetCollection is used to map the collection to a tab defined in AdminPresentationClass
* using AdminTabPresentation. If the tab cannot be found, then the collection will be placed in a tab created using
* the information specified in AdminPresentationAdornedTargetCollection.
*
* Optional - only required if you want the field to appear under a specific group
*
* Specify a GUI group for this collection
*
* @return the group for this collection
*/
String group() default "";
/**
* <p>Optional - only required if you want to lookup an item
* for this association, rather than creating a new instance of the
* target item. Note - if the type is changed to LOOKUP, and you
* do not wish for the lookup entity to be deleted during an admin
* collection item removal operation, you should specify a removeType
* of OperationType.NONDESTRUCTIVEREMOVE in {@link #operationTypes()}
* param for this annotation.</p>
*
* <p>If the type is set to LOOKUP_FOR_UPDATE, the system will trigger
* an update call on the target entity instead of an add. This is typically
* used when the target entity also has a to-one lookup to this field.</p>
*
* <p>Define whether or not added items for this
* collection are acquired via search or construction.</p>
*
* @return the item is acquired via lookup or construction
*/
AdornedTargetAddMethodType addType() default AdornedTargetAddMethodType.LOOKUP;
/**
* <p>Optional - only required when using the "SELECTIZE_LOOKUP" addType for a collection </p>
*
* <p>Field visible in the selectize collection UI in the admin tool.
* Fields are referenced relative to the the target entity. For example, in CrossSaleProductImpl,
* to show the product name field, the selectizeVisibleField value would be : "name"</p>
*
* @return Field visible in the selectize collection UI in the admin tool
*/
String selectizeVisibleField() default "";
=======
/**
* <p>Optional - fields are eagerly fetched by default</p>
*
* <p>Specify true if this field should be lazily fetched</p>
*
* @return whether or not the field should be fetched
*/
boolean lazyFetch() default true;
>>>>>>>
/**
* <p>Optional - fields are eagerly fetched by default</p>
*
* <p>Specify true if this field should be lazily fetched</p>
*
* @return whether or not the field should be fetched
*/
boolean lazyFetch() default true;
/**
* Used to map the collection to a group defined in AdminPresentationClass using AdminGroupPresentation.
*
* If the group cannot be found in AdminPresentationClass, then the tab specified in
* AdminPresentationAdornedTargetCollection is used to map the collection to a tab defined in AdminPresentationClass
* using AdminTabPresentation. If the tab cannot be found, then the collection will be placed in a tab created using
* the information specified in AdminPresentationAdornedTargetCollection.
*
* Optional - only required if you want the field to appear under a specific group
*
* Specify a GUI group for this collection
*
* @return the group for this collection
*/
String group() default "";
/**
* <p>Optional - only required if you want to lookup an item
* for this association, rather than creating a new instance of the
* target item. Note - if the type is changed to LOOKUP, and you
* do not wish for the lookup entity to be deleted during an admin
* collection item removal operation, you should specify a removeType
* of OperationType.NONDESTRUCTIVEREMOVE in {@link #operationTypes()}
* param for this annotation.</p>
*
* <p>If the type is set to LOOKUP_FOR_UPDATE, the system will trigger
* an update call on the target entity instead of an add. This is typically
* used when the target entity also has a to-one lookup to this field.</p>
*
* <p>Define whether or not added items for this
* collection are acquired via search or construction.</p>
*
* @return the item is acquired via lookup or construction
*/
AdornedTargetAddMethodType addType() default AdornedTargetAddMethodType.LOOKUP;
/**
* <p>Optional - only required when using the "SELECTIZE_LOOKUP" addType for a collection </p>
*
* <p>Field visible in the selectize collection UI in the admin tool.
* Fields are referenced relative to the the target entity. For example, in CrossSaleProductImpl,
* to show the product name field, the selectizeVisibleField value would be : "name"</p>
*
* @return Field visible in the selectize collection UI in the admin tool
*/
String selectizeVisibleField() default ""; |
<<<<<<<
@Resource(name = "blEntityDuplicator")
protected EntityDuplicator duplicator;
@Resource(name = "blDynamicEntityDao")
protected DynamicEntityDao dynamicEntityDao;
=======
@Resource(name = "blLocaleService")
protected LocaleService localeService;
@Resource(name = "blTranslationService")
protected TranslationService translationService;
@Value("${use.translation.search:false}")
protected boolean useTranslationSearch;
>>>>>>>
@Resource(name = "blEntityDuplicator")
protected EntityDuplicator duplicator;
@Resource(name = "blDynamicEntityDao")
protected DynamicEntityDao dynamicEntityDao;
@Resource(name = "blLocaleService")
protected LocaleService localeService;
@Resource(name = "blTranslationService")
protected TranslationService translationService;
@Value("${use.translation.search:false}")
protected boolean useTranslationSearch; |
<<<<<<<
=======
import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
>>>>>>>
import java.io.Serializable;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
<<<<<<<
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
populateValueRequest.getFieldManager().setFieldValue(instance,
populateValueRequest.getProperty().getName(), new BigDecimal(populateValueRequest
.getRequestedValue()));
=======
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
populateValueRequest.getFieldManager()
.setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
format.setParseBigDecimal(true);
>>>>>>>
dirty = checkDirtyState(populateValueRequest, instance, new BigDecimal(populateValueRequest.getRequestedValue()));
DecimalFormat format = populateValueRequest.getDataFormatProvider().getDecimalFormatter();
format.setParseBigDecimal(true);
BigDecimal val = (BigDecimal) format.parse(populateValueRequest.getRequestedValue());
populateValueRequest.getFieldManager()
.setFieldValue(instance, populateValueRequest.getProperty().getName(), val);
format.setParseBigDecimal(true);
<<<<<<<
val = extractValueRequest.getDataFormatProvider().getDecimalFormatter().format(((BigDecimal)
extractValueRequest.getRequestedValue()).doubleValue());
=======
val = extractValueRequest.getDataFormatProvider().getDecimalFormatter().format(extractValueRequest.getRequestedValue());
>>>>>>>
val = extractValueRequest.getDataFormatProvider().getDecimalFormatter().format(extractValueRequest.getRequestedValue()); |
<<<<<<<
import io.nuls.core.rpc.util.TimeUtils;
=======
import io.nuls.core.rpc.protocol.TxRegisterDetail;
import io.nuls.core.rpc.util.NulsDateUtils;
import io.nuls.core.rpc.util.RPCUtil;
>>>>>>>
import io.nuls.core.rpc.util.TimeUtils;
import io.nuls.core.rpc.protocol.TxRegisterDetail;
import io.nuls.core.rpc.util.NulsDateUtils;
import io.nuls.core.rpc.util.RPCUtil; |
<<<<<<<
@Column(name = "HAS_VALIDATION_ERRORS")
protected Boolean hasValidationError;
=======
@Transient
protected Category deproxiedCategory;
>>>>>>>
@Column(name = "HAS_VALIDATION_ERRORS")
protected Boolean hasValidationError;
@Transient
protected Category deproxiedCategory; |
<<<<<<<
public OrderOfferProcessorImpl(PromotableOfferUtility promotableOfferUtility) {
super(promotableOfferUtility);
}
=======
@Resource(name = "blGenericEntityService")
protected GenericEntityService entityService;
>>>>>>>
@Resource(name = "blGenericEntityService")
protected GenericEntityService entityService;
public OrderOfferProcessorImpl(PromotableOfferUtility promotableOfferUtility) {
super(promotableOfferUtility);
} |
<<<<<<<
query.addSort(new SortClause(field, order));
=======
ORDER order = getSortOrder(sortFieldsSegments, sortQuery);
SortClause sortClause = new SortClause(field, order);
if (sortableFieldTypes.contains(fieldType.getFieldType().getType())) {
if (!sortClauses.isEmpty() && !foundNotTokenizedField) {
sortClauses.clear();
}
sortClauses.add(sortClause);
foundNotTokenizedField = true;
} else if (!foundNotTokenizedField) {
sortClauses.add(sortClause);
}
}
if (!foundNotTokenizedField) {
LOG.warn(String.format("Sorting on a tokenized field, this could have adverse effects on the ordering of results. " +
"Add a field type for this field from the following list to ensure proper result ordering: [%s]",
StringUtils.join(sortableFieldTypes, ", ")));
}
if (!sortClauses.isEmpty()) {
for (SortClause sortClause : sortClauses) {
query.addSort(sortClause);
}
>>>>>>>
SortClause sortClause = new SortClause(field, order);
if (sortableFieldTypes.contains(fieldType.getFieldType().getType())) {
if (!sortClauses.isEmpty() && !foundNotTokenizedField) {
sortClauses.clear();
}
sortClauses.add(sortClause);
foundNotTokenizedField = true;
} else if (!foundNotTokenizedField) {
sortClauses.add(sortClause);
}
}
if (!foundNotTokenizedField) {
LOG.warn(String.format("Sorting on a tokenized field, this could have adverse effects on the ordering of results. " +
"Add a field type for this field from the following list to ensure proper result ordering: [%s]",
StringUtils.join(sortableFieldTypes, ", ")));
}
if (!sortClauses.isEmpty()) {
for (SortClause sortClause : sortClauses) {
query.addSort(sortClause);
} |
<<<<<<<
=======
private static String buildLink(Category category, boolean ignoreTopLevel) {
Category myCategory = category;
StringBuilder linkBuffer = new StringBuilder(50);
while (myCategory != null) {
if (!ignoreTopLevel || myCategory.getDefaultParentCategory() != null) {
if (linkBuffer.length() == 0) {
linkBuffer.append(myCategory.getUrlKey());
} else if(myCategory.getUrlKey() != null && !"/".equals(myCategory.getUrlKey())){
linkBuffer.insert(0, myCategory.getUrlKey() + '/');
}
}
myCategory = myCategory.getDefaultParentCategory();
}
return linkBuffer.toString();
}
private static void fillInURLMapForCategory(Map<String, List<Long>> categoryUrlMap, Category category, String startingPath, List<Long> startingCategoryList) throws CacheFactoryException {
String urlKey = category.getUrlKey();
if (urlKey == null) {
throw new CacheFactoryException("Cannot create childCategoryURLMap - the urlKey for a category("+category.getId()+") was null");
}
String currentPath = "";
if (! "/".equals(category.getUrlKey())) {
currentPath = startingPath + "/" + category.getUrlKey();
}
List<Long> newCategoryList = new ArrayList<Long>(startingCategoryList);
newCategoryList.add(category.getId());
categoryUrlMap.put(currentPath, newCategoryList);
for (Category currentCategory : category.getChildCategories()) {
fillInURLMapForCategory(categoryUrlMap, currentCategory, currentPath, newCategoryList);
}
}
@Override
public String getCalculatedMetaDescription(){
if(metaDescription == null){
if(description == null){
return name;
}
return description;
}
return metaDescription;
}
>>>>>>>
@Override
public String getCalculatedMetaDescription(){
if(metaDescription == null){
if(description == null){
return name;
}
return description;
}
return metaDescription;
} |
<<<<<<<
import org.broadleafcommerce.common.event.BroadleafApplicationEventPublisher;
=======
import org.broadleafcommerce.common.extension.ExtensionResultHolder;
import org.broadleafcommerce.common.extension.ExtensionResultStatusType;
>>>>>>>
import org.broadleafcommerce.common.extension.ExtensionResultHolder;
import org.broadleafcommerce.common.extension.ExtensionResultStatusType;
<<<<<<<
import org.broadleafcommerce.openadmin.server.security.event.AdminForgotPasswordEvent;
import org.broadleafcommerce.openadmin.server.security.event.AdminForgotUsernameEvent;
=======
import org.broadleafcommerce.openadmin.server.security.extension.AdminSecurityServiceExtensionManager;
>>>>>>>
import org.broadleafcommerce.openadmin.server.security.extension.AdminSecurityServiceExtensionManager;
<<<<<<<
import org.broadleafcommerce.openadmin.server.security.service.user.AdminUserDetails;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ApplicationContext;
=======
>>>>>>>
import org.broadleafcommerce.openadmin.server.security.service.user.AdminUserDetails;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ApplicationContext;
<<<<<<<
=======
@Resource(name = "blAdminSecurityServiceExtensionManager")
protected AdminSecurityServiceExtensionManager extensionManager;
>>>>>>>
@Resource(name = "blAdminSecurityServiceExtensionManager")
protected AdminSecurityServiceExtensionManager extensionManager;
<<<<<<<
=======
HashMap<String, Object> vars = new HashMap<String, Object>();
vars.put("token", token);
>>>>>>>
<<<<<<<
eventPublisher.publishEvent(new AdminForgotPasswordEvent(this, user.getId(), token, resetPasswordUrl));
=======
vars.put("resetPasswordUrl", resetPasswordUrl);
emailService.sendTemplateEmail(user.getEmail(), getResetPasswordEmailInfo(), vars);
>>>>>>>
eventPublisher.publishEvent(new AdminForgotPasswordEvent(this, user.getId(), token, resetPasswordUrl));
<<<<<<<
return passwordEncoderBean.matches(rawPassword, encodedPassword);
}
/**
* Generate an encoded password from a raw password
=======
return passwordEncoderBean.matches(rawPassword, encodedPassword);
}
/**
* Generate an encoded password from a raw password
>>>>>>>
return passwordEncoderBean.matches(rawPassword, encodedPassword);
}
/**
* Generate an encoded password from a raw password |
<<<<<<<
public BigDecimal getWidth() {
return width;
}
public void setWidth(BigDecimal width) {
this.width = width;
}
public BigDecimal getHeight() {
return height;
}
public void setHeight(BigDecimal height) {
this.height = height;
}
public BigDecimal getDepth() {
return depth;
}
public void setDepth(BigDecimal depth) {
this.depth = depth;
}
public BigDecimal getGirth() {
return girth;
}
public void setGirth(BigDecimal girth) {
this.girth = girth;
}
public String getContainer() {
return container;
}
public void setContainer(String container) {
this.container = container;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getDimensionUnitOfMeasure() {
return dimensionUnitOfMeasure;
}
public void setDimensionUnitOfMeasure(String dimensionUnitOfMeasure) {
this.dimensionUnitOfMeasure = dimensionUnitOfMeasure;
}
public Dimension unwrap(HttpServletRequest request, ApplicationContext context) {
Dimension dim = new Dimension();
dim.setContainer(ContainerShapeType.getInstance(this.container));
dim.setDimensionUnitOfMeasure(DimensionUnitOfMeasureType.getInstance(this.dimensionUnitOfMeasure));
dim.setDepth(this.depth);
dim.setGirth(this.girth);
dim.setHeight(this.height);
dim.setSize(ContainerSizeType.getInstance(this.size));
dim.setWidth(this.width);
return dim;
}
=======
/**
* @return the width
*/
public BigDecimal getWidth() {
return width;
}
/**
* @param width the width to set
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* @return the height
*/
public BigDecimal getHeight() {
return height;
}
/**
* @param height the height to set
*/
public void setHeight(BigDecimal height) {
this.height = height;
}
/**
* @return the depth
*/
public BigDecimal getDepth() {
return depth;
}
/**
* @param depth the depth to set
*/
public void setDepth(BigDecimal depth) {
this.depth = depth;
}
/**
* @return the girth
*/
public BigDecimal getGirth() {
return girth;
}
/**
* @param girth the girth to set
*/
public void setGirth(BigDecimal girth) {
this.girth = girth;
}
/**
* @return the container
*/
public String getContainer() {
return container;
}
/**
* @param container the container to set
*/
public void setContainer(String container) {
this.container = container;
}
/**
* @return the size
*/
public String getSize() {
return size;
}
/**
* @param size the size to set
*/
public void setSize(String size) {
this.size = size;
}
/**
* @return the dimensionUnitOfMeasure
*/
public String getDimensionUnitOfMeasure() {
return dimensionUnitOfMeasure;
}
/**
* @param dimensionUnitOfMeasure the dimensionUnitOfMeasure to set
*/
public void setDimensionUnitOfMeasure(String dimensionUnitOfMeasure) {
this.dimensionUnitOfMeasure = dimensionUnitOfMeasure;
}
>>>>>>>
/**
* @return the width
*/
public BigDecimal getWidth() {
return width;
}
/**
* @param width the width to set
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* @return the height
*/
public BigDecimal getHeight() {
return height;
}
/**
* @param height the height to set
*/
public void setHeight(BigDecimal height) {
this.height = height;
}
/**
* @return the depth
*/
public BigDecimal getDepth() {
return depth;
}
/**
* @param depth the depth to set
*/
public void setDepth(BigDecimal depth) {
this.depth = depth;
}
/**
* @return the girth
*/
public BigDecimal getGirth() {
return girth;
}
/**
* @param girth the girth to set
*/
public void setGirth(BigDecimal girth) {
this.girth = girth;
}
/**
* @return the container
*/
public String getContainer() {
return container;
}
/**
* @param container the container to set
*/
public void setContainer(String container) {
this.container = container;
}
/**
* @return the size
*/
public String getSize() {
return size;
}
/**
* @param size the size to set
*/
public void setSize(String size) {
this.size = size;
}
/**
* @return the dimensionUnitOfMeasure
*/
public String getDimensionUnitOfMeasure() {
return dimensionUnitOfMeasure;
}
/**
* @param dimensionUnitOfMeasure the dimensionUnitOfMeasure to set
*/
public void setDimensionUnitOfMeasure(String dimensionUnitOfMeasure) {
this.dimensionUnitOfMeasure = dimensionUnitOfMeasure;
}
public Dimension unwrap(HttpServletRequest request, ApplicationContext context) {
Dimension dim = new Dimension();
dim.setContainer(ContainerShapeType.getInstance(this.container));
dim.setDimensionUnitOfMeasure(DimensionUnitOfMeasureType.getInstance(this.dimensionUnitOfMeasure));
dim.setDepth(this.depth);
dim.setGirth(this.girth);
dim.setHeight(this.height);
dim.setSize(ContainerSizeType.getInstance(this.size));
dim.setWidth(this.width);
return dim;
} |
<<<<<<<
.withCustomCriteria(new String[] { info.getCriteriaName(), info.getPropertyValue() });
ClassMetadata cmd = service.getClassMetadata(ppr).getDynamicResultSet().getClassMetaData();
=======
.withCustomCriteria(new String[] { info.getCriteriaName(), null, info.getPropertyName(), info.getPropertyValue() });
ClassMetadata cmd = service.getClassMetadata(ppr);
>>>>>>>
.withCustomCriteria(new String[] { info.getCriteriaName(), null, info.getPropertyName(), info.getPropertyValue() });
ClassMetadata cmd = service.getClassMetadata(ppr).getDynamicResultSet().getClassMetaData(); |
<<<<<<<
import java.lang.reflect.Field;
import java.util.List;
import java.util.TimeZone;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
=======
>>>>>>>
import org.apache.commons.lang3.StringUtils;
<<<<<<<
AdminUser adminUser = adminRemoteSecurityService.getPersistentAdminUser();
if (adminUser == null) {
//clear any sandbox
request.removeAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR, WebRequest.SCOPE_GLOBAL_SESSION);
} else {
SandBox sandBox = null;
if (StringUtils.isNotBlank(request.getParameter(SANDBOX_REQ_PARAM))) {
Long sandBoxId = Long.parseLong(request.getParameter(SANDBOX_REQ_PARAM));
sandBox = sandBoxService.retrieveUserSandBoxForParent(adminUser.getId(), sandBoxId);
if (sandBox == null) {
SandBox approvalOrUserSandBox = sandBoxService.retrieveSandBoxById(sandBoxId);
if (approvalOrUserSandBox.getSandBoxType().equals(SandBoxType.USER)) {
sandBox = approvalOrUserSandBox;
} else {
sandBox = sandBoxService.createUserSandBox(adminUser.getId(), approvalOrUserSandBox);
}
}
}
if (sandBox == null) {
Long previouslySetSandBoxId = (Long) request.getAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR,
WebRequest.SCOPE_GLOBAL_SESSION);
if (previouslySetSandBoxId != null) {
sandBox = sandBoxService.retrieveSandBoxById(previouslySetSandBoxId);
}
}
if (sandBox == null) {
List<SandBox> defaultSandBoxes = sandBoxService.retrieveSandBoxesByType(SandBoxType.DEFAULT);
if (defaultSandBoxes.size() > 1) {
throw new IllegalStateException("Only one sandbox should be configured as default");
}
SandBox defaultSandBox;
if (defaultSandBoxes.size() == 1) {
defaultSandBox = defaultSandBoxes.get(0);
} else {
defaultSandBox = sandBoxService.createDefaultSandBox();
}
sandBox = sandBoxService.retrieveUserSandBoxForParent(adminUser.getId(), defaultSandBox.getId());
if (sandBox == null) {
sandBox = sandBoxService.createUserSandBox(adminUser.getId(), defaultSandBox);
}
}
request.setAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR, sandBox.getId(), WebRequest.SCOPE_GLOBAL_SESSION);
brc.setSandBox(sandBox);
brc.getAdditionalProperties().put(ADMIN_USER_PROPERTY, adminUser);
}
=======
BroadleafCurrency currency = currencyResolver.resolveCurrency(request);
brc.setBroadleafCurrency(currency);
>>>>>>>
BroadleafCurrency currency = currencyResolver.resolveCurrency(request);
brc.setBroadleafCurrency(currency);
AdminUser adminUser = adminRemoteSecurityService.getPersistentAdminUser();
if (adminUser == null) {
//clear any sandbox
request.removeAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR, WebRequest.SCOPE_GLOBAL_SESSION);
} else {
SandBox sandBox = null;
if (StringUtils.isNotBlank(request.getParameter(SANDBOX_REQ_PARAM))) {
Long sandBoxId = Long.parseLong(request.getParameter(SANDBOX_REQ_PARAM));
sandBox = sandBoxService.retrieveUserSandBoxForParent(adminUser.getId(), sandBoxId);
if (sandBox == null) {
SandBox approvalOrUserSandBox = sandBoxService.retrieveSandBoxById(sandBoxId);
if (approvalOrUserSandBox.getSandBoxType().equals(SandBoxType.USER)) {
sandBox = approvalOrUserSandBox;
} else {
sandBox = sandBoxService.createUserSandBox(adminUser.getId(), approvalOrUserSandBox);
}
}
}
if (sandBox == null) {
Long previouslySetSandBoxId = (Long) request.getAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR,
WebRequest.SCOPE_GLOBAL_SESSION);
if (previouslySetSandBoxId != null) {
sandBox = sandBoxService.retrieveSandBoxById(previouslySetSandBoxId);
}
}
if (sandBox == null) {
List<SandBox> defaultSandBoxes = sandBoxService.retrieveSandBoxesByType(SandBoxType.DEFAULT);
if (defaultSandBoxes.size() > 1) {
throw new IllegalStateException("Only one sandbox should be configured as default");
}
SandBox defaultSandBox;
if (defaultSandBoxes.size() == 1) {
defaultSandBox = defaultSandBoxes.get(0);
} else {
defaultSandBox = sandBoxService.createDefaultSandBox();
}
sandBox = sandBoxService.retrieveUserSandBoxForParent(adminUser.getId(), defaultSandBox.getId());
if (sandBox == null) {
sandBox = sandBoxService.createUserSandBox(adminUser.getId(), defaultSandBox);
}
}
request.setAttribute(BroadleafSandBoxResolver.SANDBOX_ID_VAR, sandBox.getId(), WebRequest.SCOPE_GLOBAL_SESSION);
brc.setSandBox(sandBox);
brc.getAdditionalProperties().put(ADMIN_USER_PROPERTY, adminUser);
} |
<<<<<<<
import org.broadleafcommerce.core.order.service.call.FulfillmentGroupItemRequest;
import org.broadleafcommerce.core.order.service.type.FulfillmentGroupType;
=======
import org.broadleafcommerce.core.order.service.type.FulfillmentType;
>>>>>>>
import org.broadleafcommerce.core.order.service.call.FulfillmentGroupItemRequest;
import org.broadleafcommerce.core.order.service.type.FulfillmentType; |
<<<<<<<
@Deprecated
protected SearchResult findSearchResults(String qualifiedSolrQuery, List<SearchFacetDTO> facets,
SearchCriteria searchCriteria, String defaultSort) throws ServiceException {
return findSearchResults(qualifiedSolrQuery, facets, searchCriteria, defaultSort, (String[]) null);
=======
@Deprecated
protected ProductSearchResult findProducts(String qualifiedSolrQuery, List<SearchFacetDTO> facets,
ProductSearchCriteria searchCriteria, String defaultSort) throws ServiceException {
return findProducts(qualifiedSolrQuery, facets, searchCriteria, defaultSort, null);
>>>>>>>
@Deprecated
protected SearchResult findSearchResults(String qualifiedSolrQuery, List<SearchFacetDTO> facets,
SearchCriteria searchCriteria, String defaultSort) throws ServiceException {
return findSearchResults(qualifiedSolrQuery, facets, searchCriteria, defaultSort, (String[]) null);
<<<<<<<
.setStart((searchCriteria.getPage() - 1) * searchCriteria.getPageSize());
if (useSku) {
solrQuery.setFields(shs.getSkuIdFieldName());
} else {
solrQuery.setFields(shs.getProductIdFieldName());
}
=======
.setStart((start) * searchCriteria.getPageSize());
>>>>>>>
.setStart((start) * searchCriteria.getPageSize());
if (useSku) {
solrQuery.setFields(shs.getSkuIdFieldName());
} else {
solrQuery.setFields(shs.getProductIdFieldName());
} |
<<<<<<<
public String PriceListImpl_Currenc();
public String PriceListImpl_Is_Default();
public String PriceListImpl_Key();
public String PriceListImpl_Friendly_Name();
public String PriceListImpl_ID();
public String PriceListImpl_Primary_Key();
public String PriceListImpl_Details();
public String PriceListImpl_friendyName();
=======
public String ProductImpl_Can_Sell_Without_Options();
>>>>>>>
public String ProductImpl_Can_Sell_Without_Options();
public String PriceListImpl_Currenc();
public String PriceListImpl_Is_Default();
public String PriceListImpl_Key();
public String PriceListImpl_Friendly_Name();
public String PriceListImpl_ID();
public String PriceListImpl_Primary_Key();
public String PriceListImpl_Details();
public String PriceListImpl_friendyName(); |
<<<<<<<
public boolean isAddOperationInspect() {
return isAddOperationInspect;
}
public void setAddOperationInspect(boolean addOperationInspect) {
isAddOperationInspect = addOperationInspect;
}
=======
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the last primary key value of the previous
* page of records.
*
* @return
*/
public Long getLastId() {
return lastId;
}
public void setLastId(Long lastId) {
this.lastId = lastId;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the first primary key value of the previous
* page or records.
*/
public Long getFirstId() {
return firstId;
}
public void setFirstId(Long firstId) {
this.firstId = firstId;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the cumulative total count of the previous page
* of records. For example, if this was the second page of records and each page contained 5 records, the upperCount
* would be 10.
*
* @return
*/
public Integer getUpperCount() {
return upperCount;
}
public void setUpperCount(Integer upperCount) {
this.upperCount = upperCount;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the cumulative starting count of the previous
* page of records. For example, if this was the second page of records and each page contained 5 records, the lowerCount
* would be 5.
*/
public Integer getLowerCount() {
return lowerCount;
}
public void setLowerCount(Integer lowerCount) {
this.lowerCount = lowerCount;
}
/**
* The number of records to retrieve in a single page. If null, defaults to the "admin.default.max.results" property value.
*
* @return
*/
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
* Whether or not this represents a fetch request from the presentation layer.
*
* @return
*/
public Boolean getPresentationFetch() {
return presentationFetch;
}
public void setPresentationFetch(Boolean presentationFetch) {
this.presentationFetch = presentationFetch;
}
>>>>>>>
public boolean isAddOperationInspect() {
return isAddOperationInspect;
}
public void setAddOperationInspect(boolean addOperationInspect) {
isAddOperationInspect = addOperationInspect;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the last primary key value of the previous
* page of records.
*
* @return
*/
public Long getLastId() {
return lastId;
}
public void setLastId(Long lastId) {
this.lastId = lastId;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the first primary key value of the previous
* page or records.
*/
public Long getFirstId() {
return firstId;
}
public void setFirstId(Long firstId) {
this.firstId = firstId;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the cumulative total count of the previous page
* of records. For example, if this was the second page of records and each page contained 5 records, the upperCount
* would be 10.
*
* @return
*/
public Integer getUpperCount() {
return upperCount;
}
public void setUpperCount(Integer upperCount) {
this.upperCount = upperCount;
}
/**
* Intended for usage with other than {@link FetchType#DEFAULT}. Denotes the cumulative starting count of the previous
* page of records. For example, if this was the second page of records and each page contained 5 records, the lowerCount
* would be 5.
*/
public Integer getLowerCount() {
return lowerCount;
}
public void setLowerCount(Integer lowerCount) {
this.lowerCount = lowerCount;
}
/**
* The number of records to retrieve in a single page. If null, defaults to the "admin.default.max.results" property value.
*
* @return
*/
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
* Whether or not this represents a fetch request from the presentation layer.
*
* @return
*/
public Boolean getPresentationFetch() {
return presentationFetch;
}
public void setPresentationFetch(Boolean presentationFetch) {
this.presentationFetch = presentationFetch;
} |
<<<<<<<
Collections.sort(priceDetails, getTargetItemComparator(promotion.getApplyDiscountToSalePrice()));
for (PromotableOrderItemPriceDetail priceDetail : priceDetails) {
if (receiveQtyNeeded > 0) {
if (relatedQualifier != null) {
// We need to make sure that this item is either a parent, child, or the same as the qualifier root
OrderItem thisItem = priceDetail.getPromotableOrderItem().getOrderItem();
if (!relatedQualifierRoot.isAParentOf(thisItem) && !thisItem.isAParentOf(relatedQualifierRoot) &&
!thisItem.equals(relatedQualifierRoot)) {
continue;
}
}
int itemQtyAvailableToBeUsedAsTarget = priceDetail.getQuantityAvailableToBeUsedAsTarget(itemOffer);
=======
for (OfferItemCriteria itemCriteria : itemOffer.getCandidateTargetsMap().keySet()) {
List<PromotableOrderItem> promotableItems = itemOffer.getCandidateTargetsMap().get(itemCriteria);
List<PromotableOrderItemPriceDetail> priceDetails = buildPriceDetailListFromOrderItems(promotableItems);
Collections.sort(priceDetails, getTargetItemComparator(itemOffer.getOffer().getApplyDiscountToSalePrice()));
int targetQtyNeeded = itemCriteria.getQuantity();
for (PromotableOrderItemPriceDetail detail : priceDetails) {
int itemQtyAvailableToBeUsedAsTarget = detail.getQuantityAvailableToBeUsedAsTarget(itemOffer);
>>>>>>>
for (OfferItemCriteria itemCriteria : itemOffer.getCandidateTargetsMap().keySet()) {
List<PromotableOrderItem> promotableItems = itemOffer.getCandidateTargetsMap().get(itemCriteria);
List<PromotableOrderItemPriceDetail> priceDetails = buildPriceDetailListFromOrderItems(promotableItems);
Collections.sort(priceDetails, getTargetItemComparator(itemOffer.getOffer().getApplyDiscountToSalePrice()));
int targetQtyNeeded = itemCriteria.getQuantity();
for (PromotableOrderItemPriceDetail priceDetail : priceDetails) {
if (relatedQualifier != null) {
// We need to make sure that this item is either a parent, child, or the same as the qualifier root
OrderItem thisItem = priceDetail.getPromotableOrderItem().getOrderItem();
if (!relatedQualifierRoot.isAParentOf(thisItem) && !thisItem.isAParentOf(relatedQualifierRoot) &&
!thisItem.equals(relatedQualifierRoot)) {
continue;
}
}
int itemQtyAvailableToBeUsedAsTarget = priceDetail.getQuantityAvailableToBeUsedAsTarget(itemOffer);
<<<<<<<
int qtyToMarkAsTarget = Math.min(receiveQtyNeeded, itemQtyAvailableToBeUsedAsTarget);
receiveQtyNeeded -= qtyToMarkAsTarget;
if (!checkOnly) {
priceDetail.addPromotionDiscount(itemOffer, itemOffer.getOffer().getTargetItemCriteria(), qtyToMarkAsTarget);
}
=======
int qtyToMarkAsTarget = Math.min(targetQtyNeeded, itemQtyAvailableToBeUsedAsTarget);
targetQtyNeeded -= qtyToMarkAsTarget;
detail.addPromotionDiscount(itemOffer, itemCriteria, qtyToMarkAsTarget);
>>>>>>>
int qtyToMarkAsTarget = Math.min(targetQtyNeeded, itemQtyAvailableToBeUsedAsTarget);
targetQtyNeeded -= qtyToMarkAsTarget;
if (!checkOnly) {
priceDetail.addPromotionDiscount(itemOffer, itemCriteria, qtyToMarkAsTarget);
} |
<<<<<<<
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blStandardElements")
@AdminPresentationClass(friendlyName = "SiteCatalogXrefImpl")
public class SiteCatalogXrefImpl implements SiteCatalogXref, AdminMainEntity {
=======
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blSiteElements")
public class SiteCatalogXrefImpl implements SiteCatalogXref {
>>>>>>>
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blSiteElements")
@AdminPresentationClass(friendlyName = "SiteCatalogXrefImpl")
public class SiteCatalogXrefImpl implements SiteCatalogXref, AdminMainEntity { |
<<<<<<<
=======
package org.broadleafcommerce.core.web.processor;
import net.entropysoft.transmorph.cache.LRUMap;
>>>>>>>
package org.broadleafcommerce.core.web.processor;
import net.entropysoft.transmorph.cache.LRUMap;
<<<<<<<
import java.io.StringWriter;
import java.io.Writer;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
=======
import java.io.StringWriter;
import java.io.Writer;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
>>>>>>>
import java.io.StringWriter;
import java.io.Writer;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map; |
<<<<<<<
/**
* Returns all records for selected tab of the specified request and its primary key
*
* @param cmd
* @param containingEntity
* @return all Entity[] for selected tab for the specified containingClass
* @throws ServiceException
*
* @see #getRecordsForCollection(ClassMetadata, String, Property)
*/
public Map<String, DynamicResultSet> getRecordsForSelectedTab(ClassMetadata cmd , Entity containingEntity,
List<SectionCrumb> sectionCrumb, String currentTabName)
throws ServiceException;
=======
>>>>>>>
/**
* Returns all records for selected tab of the specified request and its primary key
*
* @param cmd
* @param containingEntity
* @return all Entity[] for selected tab for the specified containingClass
* @throws ServiceException
*
* @see #getRecordsForCollection(ClassMetadata, String, Property)
*/
public Map<String, DynamicResultSet> getRecordsForSelectedTab(ClassMetadata cmd , Entity containingEntity,
List<SectionCrumb> sectionCrumb, String currentTabName)
throws ServiceException; |
<<<<<<<
/**
* Returns the type of inventory for this category
* @return the {@link InventoryType} for this category
*/
public InventoryType getInventoryType();
/**
* Sets the type of inventory for this category
* @param inventoryType the {@link InventoryType} for this category
*/
public void setInventoryType(InventoryType inventoryType);
=======
/**
* Convenience method to return the calculated meta-description. Will return description if meta-description is null,
* will return name if description is null.
*
* @return metaDescription
*/
public String getCalculatedMetaDescription();
>>>>>>>
/**
* Convenience method to return the calculated meta-description. Will return description if meta-description is null,
* will return name if description is null.
*
* @return metaDescription
*/
public String getCalculatedMetaDescription();
/**
* Returns the type of inventory for this category
* @return the {@link InventoryType} for this category
*/
public InventoryType getInventoryType();
/**
* Sets the type of inventory for this category
* @param inventoryType the {@link InventoryType} for this category
*/
public void setInventoryType(InventoryType inventoryType); |
<<<<<<<
=======
import org.hibernate.annotations.Type;
>>>>>>>
import org.hibernate.annotations.Type;
import org.hibernate.annotations.Where; |
<<<<<<<
protected String productId;
=======
public static final String ERROR_CODE = "REQUIRED_ATTRIBUTE";
>>>>>>>
protected String productId;
public static final String ERROR_CODE = "REQUIRED_ATTRIBUTE";
<<<<<<<
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
=======
>>>>>>>
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
} |
<<<<<<<
import org.hibernate.Session;
import org.hibernate.Transaction;
=======
import org.springframework.orm.jpa.EntityManagerFactoryUtils;
>>>>>>>
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.springframework.orm.jpa.EntityManagerFactoryUtils;
<<<<<<<
public static void finalizeTransaction(Transaction transaction, boolean isError) {
if (isError) {
try {
transaction.rollback();
} catch (Exception e) {
LOG.error("Rolling back caused exception. Logging and continuing.", e);
}
} else {
transaction.commit();
}
}
=======
public static boolean isTransactionalEntityManager(EntityManager em) {
EntityManager target = EntityManagerFactoryUtils.doGetTransactionalEntityManager(
em.getEntityManagerFactory(), em.getProperties(), true);
return target != null;
}
>>>>>>>
public static boolean isTransactionalEntityManager(EntityManager em) {
EntityManager target = EntityManagerFactoryUtils.doGetTransactionalEntityManager(
em.getEntityManagerFactory(), em.getProperties(), true);
return target != null;
}
public static void finalizeTransaction(Transaction transaction, boolean isError) {
if (isError) {
try {
transaction.rollback();
} catch (Exception e) {
LOG.error("Rolling back caused exception. Logging and continuing.", e);
}
} else {
transaction.commit();
}
} |
<<<<<<<
protected PromotableOfferUtility promotableOfferUtility;
=======
protected GenericEntityService genericEntityServiceMock;
>>>>>>>
protected PromotableOfferUtility promotableOfferUtility;
protected GenericEntityService genericEntityServiceMock;
<<<<<<<
promotableOfferUtility = new PromotableOfferUtilityImpl();
=======
genericEntityServiceMock = EasyMock.createMock(GenericEntityService.class);
>>>>>>>
promotableOfferUtility = new PromotableOfferUtilityImpl();
genericEntityServiceMock = EasyMock.createMock(GenericEntityService.class);
<<<<<<<
offerServiceUtilities.setPromotableItemFactory(new PromotableItemFactoryImpl(promotableOfferUtility));
=======
offerServiceUtilities.setPromotableItemFactory(new PromotableItemFactoryImpl());
offerServiceUtilities.setGenericEntityService(genericEntityServiceMock);
>>>>>>>
offerServiceUtilities.setPromotableItemFactory(new PromotableItemFactoryImpl(promotableOfferUtility));
offerServiceUtilities.setGenericEntityService(genericEntityServiceMock); |
<<<<<<<
private int pickRandomValue() {
return this.randomService.getRandomNumber(100);
}
=======
private boolean isActive(Segmentation segmentation) {
return segmentation.isActive();
}
>>>>>>>
private int pickRandomValue() {
return this.randomService.getRandomNumber(100);
}
private boolean isActive(Segmentation segmentation) {
return segmentation.isActive();
} |
<<<<<<<
=======
import com.fasterxml.jackson.annotation.JsonInclude;
>>>>>>>
import com.fasterxml.jackson.annotation.JsonInclude;
<<<<<<<
private Integer percentage;
=======
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean active;
>>>>>>>
private Integer percentage;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean active;
<<<<<<<
Integer percentage,
=======
Boolean active,
>>>>>>>
Integer percentage,
Boolean active,
<<<<<<<
this.percentage = percentage;
=======
this.active = active;
>>>>>>>
this.percentage = percentage;
this.active = active;
<<<<<<<
metadata.getPercentage(),
=======
metadata.isActive(),
>>>>>>>
metadata.getPercentage(),
metadata.isActive(),
<<<<<<<
public Integer getPercentage() {
return percentage;
}
public void setPercentage(Integer percentage) {
this.percentage = percentage;
}
=======
>>>>>>>
public Integer getPercentage() {
return percentage;
}
public void setPercentage(Integer percentage) {
this.percentage = percentage;
} |
<<<<<<<
import io.charlescd.villager.interactor.registry.DockerHubDockerRegistryAuth;
import io.charlescd.villager.interactor.registry.DockerRegistryConfigurationInput;
import io.charlescd.villager.interactor.registry.GCPDockerRegistryAuth;
=======
import io.charlescd.villager.interactor.registry.*;
>>>>>>>
import io.charlescd.villager.interactor.registry.DockerHubDockerRegistryAuth;
import io.charlescd.villager.interactor.registry.DockerRegistryConfigurationInput;
import io.charlescd.villager.interactor.registry.GCPDockerRegistryAuth;
import io.charlescd.villager.interactor.registry.*; |
<<<<<<<
=======
import io.charlescd.villager.interactor.registry.GCPDockerRegistryAuth;
import io.charlescd.villager.interactor.registry.HarborDockerRegistryAuth;
>>>>>>>
import io.charlescd.villager.interactor.registry.GCPDockerRegistryAuth;
import io.charlescd.villager.interactor.registry.HarborDockerRegistryAuth;
<<<<<<<
=======
private DockerRegistryConfigurationEntity.DockerRegistryConnectionData convertToConnectionData(
DockerRegistryConfigurationInput input) {
DockerRegistryConfigurationEntity.DockerRegistryConnectionData connectionData;
switch (input.getRegistryType()) {
case AWS:
var awsRegistryAuth = ((AWSDockerRegistryAuth) input.getAuth());
connectionData =
new DockerRegistryConfigurationEntity.AWSDockerRegistryConnectionData(
input.getAddress(),
awsRegistryAuth.getAccessKey(),
awsRegistryAuth.getSecretKey(),
awsRegistryAuth.getRegion());
break;
case AZURE:
var azureRegistryAuth = ((AzureDockerRegistryAuth) input.getAuth());
connectionData =
new DockerRegistryConfigurationEntity.AzureDockerRegistryConnectionData(
input.getAddress(),
azureRegistryAuth.getUsername(),
azureRegistryAuth.getPassword());
break;
case GCP:
var gcpRegistryAuth = ((GCPDockerRegistryAuth) input.getAuth());
connectionData =
new DockerRegistryConfigurationEntity.GCPDockerRegistryConnectionData(
input.getAddress(),
gcpRegistryAuth.getOrganization(),
gcpRegistryAuth.getUsername(),
gcpRegistryAuth.getJsonKey());
break;
case DOCKER_HUB:
var dockerHubRegistryAuth = ((DockerHubDockerRegistryAuth) input.getAuth());
connectionData =
new DockerRegistryConfigurationEntity.DockerHubDockerRegistryConnectionData(
input.getAddress(),
dockerHubRegistryAuth.getOrganization(),
dockerHubRegistryAuth.getUsername(),
dockerHubRegistryAuth.getPassword());
break;
case HARBOR:
var harborRegistryAuth = ((HarborDockerRegistryAuth) input.getAuth());
connectionData =
new DockerRegistryConfigurationEntity.HarborDockerRegistryConnectionData(
input.getAddress(),
harborRegistryAuth.getUsername(),
harborRegistryAuth.getPassword());
break;
default:
throw new IllegalStateException("Registry type not supported!");
}
return connectionData;
}
>>>>>>>
@Override
public String execute(DockerRegistryConfigurationInput input) {
var entity = registryService.fromDockerRegistryConfigurationInput(input);
repository.save(entity);
return entity.id;
} |
<<<<<<<
private Integer percentage;
=======
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean active;
>>>>>>>
private Integer percentage;
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean active;
<<<<<<<
this.percentage = segmentation.getPercentage();
=======
this.active = segmentation.isActive();
>>>>>>>
this.percentage = segmentation.getPercentage();
this.active = segmentation.isActive();
<<<<<<<
public boolean isPercentage() {
return type.equals(SegmentationType.PERCENTAGE);
}
public Integer getPercentage() {
return this.percentage;
}
public void setPercentage(Integer percentage) {
this.validatePercentage(percentage, "Percentage must be between 0 and 100");
this.percentage = percentage;
}
private void validatePercentage(Integer percentage, String message) {
if (percentage != null) {
Assert.isTrue(percentage <= 100 && percentage >= 0, message);
}
}
public int sumPercentage(Integer percentageToSum) {
this.validatePercentage(
this.percentage + percentageToSum, "Sum of percentage of circles exceeded 100 or is lower than 0"
);
return this.percentage += percentageToSum;
}
=======
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
}
>>>>>>>
public boolean isPercentage() {
return type.equals(SegmentationType.PERCENTAGE);
}
public Integer getPercentage() {
return this.percentage;
}
public void setPercentage(Integer percentage) {
this.validatePercentage(percentage, "Percentage must be between 0 and 100");
this.percentage = percentage;
}
private void validatePercentage(Integer percentage, String message) {
if (percentage != null) {
Assert.isTrue(percentage <= 100 && percentage >= 0, message);
}
}
public int sumPercentage(Integer percentageToSum) {
this.validatePercentage(
this.percentage + percentageToSum, "Sum of percentage of circles exceeded 100 or is lower than 0"
);
return this.percentage += percentageToSum;
}
public Boolean isActive() {
return active;
}
public void setActive(Boolean active) {
this.active = active;
} |
<<<<<<<
import com.soteradefense.dga.highbetweenness.HBSEComputation;
import com.soteradefense.dga.highbetweenness.HBSEMasterCompute;
=======
import java.io.InputStream;
import java.util.Set;
import java.util.TreeSet;
>>>>>>>
import com.soteradefense.dga.highbetweenness.HBSEComputation;
import com.soteradefense.dga.highbetweenness.HBSEMasterCompute;
import java.io.InputStream;
import java.util.Set;
import java.util.TreeSet;
<<<<<<<
public static void main(String[] args) throws Exception {
=======
public static void main(String [] args) throws Exception {
>>>>>>>
public static void main(String[] args) throws Exception { |
<<<<<<<
import io.nuls.core.parse.HashUtil;
=======
import io.nuls.core.rpc.info.Constants;
import io.nuls.core.rpc.model.message.MessageUtil;
import io.nuls.core.rpc.model.message.Request;
import io.nuls.core.rpc.netty.processor.ResponseMessageProcessor;
import io.nuls.core.rpc.util.RPCUtil;
>>>>>>>
import io.nuls.core.parse.HashUtil;
import io.nuls.core.rpc.info.Constants;
import io.nuls.core.rpc.model.message.MessageUtil;
import io.nuls.core.rpc.model.message.Request;
import io.nuls.core.rpc.netty.processor.ResponseMessageProcessor;
import io.nuls.core.rpc.util.RPCUtil;
<<<<<<<
long endTime = System.currentTimeMillis();
if (endTime - beginTime > 3000) {
LoggerUtil.logger().error("####Deal time too long,message cmd ={},useTime={},hash={}", header.getCommandStr(), (endTime - beginTime), HashUtil.toHex(HashUtil.calcHash(payLoadBody)));
}
=======
>>>>>>> |
<<<<<<<
for (String altName : toAllSetterNames(fieldNode, isBoolean)) {
switch (methodExists(altName, fieldNode, false)) {
=======
for (String altName : TransformationsUtil.toAllSetterNames(new String(field.name), isBoolean)) {
switch (methodExists(altName, fieldNode, false, 1)) {
>>>>>>>
for (String altName : toAllSetterNames(fieldNode, isBoolean)) {
switch (methodExists(altName, fieldNode, false, 1)) { |
<<<<<<<
=======
import lombok.core.BooleanFieldAugment;
import lombok.core.ReferenceFieldAugment;
import lombok.core.TransformationsUtil;
>>>>>>>
import lombok.core.BooleanFieldAugment;
import lombok.core.ReferenceFieldAugment; |
<<<<<<<
FieldDeclaration fieldDeclaration = createField(framework, source, loggingType, logFieldName, useStatic);
=======
FieldDeclaration fieldDeclaration = createField(framework, source, loggingType, loggerCategory);
>>>>>>>
FieldDeclaration fieldDeclaration = createField(framework, source, loggingType, logFieldName, useStatic, loggerTopic);
<<<<<<<
private static FieldDeclaration createField(LoggingFramework framework, Annotation source, ClassLiteralAccess loggingType, String logFieldName, boolean useStatic) {
=======
public static FieldDeclaration createField(LoggingFramework framework, Annotation source, ClassLiteralAccess loggingType, String loggerCategory) {
>>>>>>>
private static FieldDeclaration createField(LoggingFramework framework, Annotation source, ClassLiteralAccess loggingType, String logFieldName, boolean useStatic, String loggerTopic) {
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_COMMONS_FLAG_USAGE, "@apachecommons.CommonsLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_COMMONS_FLAG_USAGE, "@apachecommons.CommonsLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.COMMONS, annotation, source, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JUL_FLAG_USAGE, "@java.Log", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.JUL, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.JUL, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JUL_FLAG_USAGE, "@java.Log", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.JUL, annotation, source, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J_FLAG_USAGE, "@Log4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.LOG4J, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J_FLAG_USAGE, "@Log4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J, annotation, source, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J2_FLAG_USAGE, "@Log4j2", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J2, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.LOG4J2, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J2_FLAG_USAGE, "@Log4j2", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J2, annotation, source, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_SLF4J_FLAG_USAGE, "@Slf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.SLF4J, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.SLF4J, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_SLF4J_FLAG_USAGE, "@Slf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.SLF4J, annotation, source, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_XSLF4J_FLAG_USAGE, "@XSlf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.XSLF4J, annotation, source, annotationNode);
=======
processAnnotation(LoggingFramework.XSLF4J, annotation, source, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_XSLF4J_FLAG_USAGE, "@XSlf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.XSLF4J, annotation, source, annotationNode, annotation.getInstance().topic()); |
<<<<<<<
private static final String TO_BUILDER_METHOD_NAME = "toBuilder";
private static final String FILL_VALUES_METHOD_NAME = "$fillValuesFrom";
private static final String STATIC_FILL_VALUES_METHOD_NAME = "$fillValuesFromInstanceIntoBuilder";
private static final String INSTANCE_VARIABLE_NAME = "instance";
private static final String BUILDER_VARIABLE_NAME = "b";
=======
private static class BuilderFieldData {
List<JCAnnotation> annotations;
JCExpression type;
Name rawName;
Name name;
Name nameOfDefaultProvider;
Name nameOfSetFlag;
SingularData singularData;
ObtainVia obtainVia;
JavacNode obtainViaNode;
JavacNode originalFieldNode;
java.util.List<JavacNode> createdFields = new ArrayList<JavacNode>();
}
>>>>>>>
private static final String TO_BUILDER_METHOD_NAME = "toBuilder";
private static final String FILL_VALUES_METHOD_NAME = "$fillValuesFrom";
private static final String STATIC_FILL_VALUES_METHOD_NAME = "$fillValuesFromInstanceIntoBuilder";
private static final String INSTANCE_VARIABLE_NAME = "instance";
private static final String BUILDER_VARIABLE_NAME = "b";
<<<<<<<
generateSimpleSetterMethodForBuilder(builderType, deprecate, fieldNode.createdFields.get(0), fieldNode.nameOfSetFlag, source, true, returnTypeMaker.make(), returnStatementMaker.make());
=======
generateSimpleSetterMethodForBuilder(builderType, deprecate, fieldNode.createdFields.get(0), fieldNode.nameOfSetFlag, source, true, true, returnTypeMaker.make(), returnStatementMaker.make(), fieldNode.annotations);
>>>>>>>
generateSimpleSetterMethodForBuilder(builderType, deprecate, fieldNode.createdFields.get(0), fieldNode.nameOfSetFlag, source, true, returnTypeMaker.make(), returnStatementMaker.make(), fieldNode.annotations);
<<<<<<<
private void generateSimpleSetterMethodForBuilder(JavacNode builderType, boolean deprecate, JavacNode fieldNode, Name nameOfSetFlag, JavacNode source, boolean fluent, JCExpression returnType, JCStatement returnStatement) {
=======
private void generateSimpleSetterMethodForBuilder(JavacNode builderType, boolean deprecate, JavacNode fieldNode, Name nameOfSetFlag, JavacNode source, boolean fluent, boolean chain, JCExpression returnType, JCStatement returnStatement, List<JCAnnotation> annosOnParam) {
>>>>>>>
private void generateSimpleSetterMethodForBuilder(JavacNode builderType, boolean deprecate, JavacNode fieldNode, Name nameOfSetFlag, JavacNode source, boolean fluent, JCExpression returnType, JCStatement returnStatement, List<JCAnnotation> annosOnParam) { |
<<<<<<<
if (builderClassName.isEmpty()) {
builderClassName = new String(td.name) + "Builder";
}
if (superclassBuilderClassName.isEmpty() && td.superclass != null) {
superclassBuilderClassName = new String(td.superclass.getLastToken()) + "Builder";
}
boolean callBuilderBasedSuperConstructor = inherit && td.superclass != null;
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PROTECTED, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER, true,
Collections.<Annotation>emptyList(), annotationNode, extendable ? builderClassName : null, callBuilderBasedSuperConstructor);
=======
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode);
>>>>>>>
if (builderClassName.isEmpty()) {
builderClassName = new String(td.name) + "Builder";
}
if (superclassBuilderClassName.isEmpty() && td.superclass != null) {
superclassBuilderClassName = new String(td.superclass.getLastToken()) + "Builder";
}
boolean callBuilderBasedSuperConstructor = inherit && td.superclass != null;
new HandleConstructor().generateConstructor(tdParent, extendable ? AccessLevel.PROTECTED : AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode, extendable ? builderClassName : null, callBuilderBasedSuperConstructor);
<<<<<<<
AccessLevel.PACKAGE, builderType, Collections.<EclipseNode>emptyList(), false, null,
annotationNode, Collections.<Annotation>emptyList(), null, false);
=======
AccessLevel.PACKAGE, builderType, Collections.<EclipseNode>emptyList(), false,
annotationNode, Collections.<Annotation>emptyList());
>>>>>>>
AccessLevel.PACKAGE, builderType, Collections.<EclipseNode>emptyList(), false,
annotationNode, Collections.<Annotation>emptyList(), null, false); |
<<<<<<<
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL | Flags.PARAMETER, nonNulls.appendList(nullables)), field.name, field.vartype, null);
=======
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL, nonNulls.appendList(nullables)), fieldName, field.vartype, null);
>>>>>>>
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL | Flags.PARAMETER, nonNulls.appendList(nullables)), fieldName, field.vartype, null);
<<<<<<<
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL | Flags.PARAMETER, nonNulls.appendList(nullables)), field.name, pType, null);
=======
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL, nonNulls.appendList(nullables)), fieldName, pType, null);
>>>>>>>
JCVariableDecl param = maker.VarDef(maker.Modifiers(Flags.FINAL | Flags.PARAMETER, nonNulls.appendList(nullables)), fieldName, pType, null); |
<<<<<<<
if (methodName == null) {
source.addWarning("Not generating setter for this field: It does not fit your @Accessors prefix list.");
return;
}
for (String altName : toAllSetterNames(fieldNode)) {
switch (methodExists(altName, fieldNode, false)) {
=======
for (String altName : toAllSetterNames(fieldDecl)) {
switch (methodExists(altName, fieldNode, false, 1)) {
>>>>>>>
if (methodName == null) {
source.addWarning("Not generating setter for this field: It does not fit your @Accessors prefix list.");
return;
}
for (String altName : toAllSetterNames(fieldNode)) {
switch (methodExists(altName, fieldNode, false, 1)) { |
<<<<<<<
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, null, annotationNode, null, false);
=======
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, annotationNode);
>>>>>>>
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, fields, force, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
<<<<<<<
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode, null, false);
=======
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode);
>>>>>>>
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findRequiredFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
<<<<<<<
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, suppressConstructorProperties, annotationNode, null, false);
=======
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode);
>>>>>>>
new HandleConstructor().generateConstructor(typeNode, level, onConstructor, findAllFields(typeNode), false, staticName, SkipIfConstructorExists.NO, annotationNode, null, false);
<<<<<<<
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, source, null, false);
=======
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, source);
>>>>>>>
generateConstructor(typeNode, level, List.<JCAnnotation>nil(), findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, source, null, false);
<<<<<<<
JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, suppressConstructorProperties, source, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
=======
JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, source);
>>>>>>>
JCMethodDecl constr = createConstructor(staticConstrRequired ? AccessLevel.PRIVATE : level, onConstructor, typeNode, fields, allToDefault, source, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
<<<<<<<
/**
* @param builderClassnameAsParameter
* if {@code != null}, the only parameter of the constructor will
* be a builder with this classname; the constructor will then
* use the values within this builder to assign the fields of new
* instances.
* @param callBuilderBasedSuperConstructor
* if {@code true}, the constructor will explicitly call a super
* constructor with the builder as argument. Requires
* {@code builderClassnameAsParameter != null}.
*/
public static JCMethodDecl createConstructor(AccessLevel level, List<JCAnnotation> onConstructor, JavacNode typeNode, List<JavacNode> fields, boolean allToDefault, Boolean suppressConstructorProperties, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
builderClassnameAsParameter = null;
}
if (callBuilderBasedSuperConstructor && builderClassnameAsParameter == null) {
source.addError("Calling a builder-based superclass constructor ('callBuilderBasedSuperConstructor') requires a non-empty 'builderClassnameAsParameter' value.");
}
=======
public static JCMethodDecl createConstructor(AccessLevel level, List<JCAnnotation> onConstructor, JavacNode typeNode, List<JavacNode> fields, boolean allToDefault, JavacNode source) {
>>>>>>>
/**
* @param builderClassnameAsParameter
* if {@code != null}, the only parameter of the constructor will
* be a builder with this classname; the constructor will then
* use the values within this builder to assign the fields of new
* instances.
* @param callBuilderBasedSuperConstructor
* if {@code true}, the constructor will explicitly call a super
* constructor with the builder as argument. Requires
* {@code builderClassnameAsParameter != null}.
*/
public static JCMethodDecl createConstructor(AccessLevel level, List<JCAnnotation> onConstructor, JavacNode typeNode, List<JavacNode> fields, boolean allToDefault, JavacNode source, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
builderClassnameAsParameter = null;
}
if (callBuilderBasedSuperConstructor && builderClassnameAsParameter == null) {
source.addError("Calling a builder-based superclass constructor ('callBuilderBasedSuperConstructor') requires a non-empty 'builderClassnameAsParameter' value.");
} |
<<<<<<<
new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, null, onConstructor, annotationNode, null, false);
=======
new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, onConstructor, annotationNode);
>>>>>>>
new HandleConstructor().generateConstructor(typeNode, level, fields, force, staticName, SkipIfConstructorExists.NO, onConstructor, annotationNode, null, false);
<<<<<<<
suppressConstructorProperties, onConstructor, annotationNode, null, false);
=======
onConstructor, annotationNode);
>>>>>>>
onConstructor, annotationNode, null, false);
<<<<<<<
suppressConstructorProperties, onConstructor, annotationNode, null, false);
=======
onConstructor, annotationNode);
>>>>>>>
onConstructor, annotationNode, null, false);
<<<<<<<
generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode, null, false);
=======
generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode);
>>>>>>>
generateConstructor(typeNode, level, findRequiredFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode, null, false);
<<<<<<<
generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, null, onConstructor, sourceNode, null, false);
=======
generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode);
>>>>>>>
generateConstructor(typeNode, level, findAllFields(typeNode), false, staticName, skipIfConstructorExists, onConstructor, sourceNode, null, false);
<<<<<<<
Boolean suppressConstructorProperties, List<Annotation> onConstructor, EclipseNode sourceNode, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
=======
List<Annotation> onConstructor, EclipseNode sourceNode) {
>>>>>>>
List<Annotation> onConstructor, EclipseNode sourceNode, String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
<<<<<<<
suppressConstructorProperties, sourceNode, onConstructor, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
=======
sourceNode, onConstructor);
>>>>>>>
sourceNode, onConstructor, builderClassnameAsParameter, callBuilderBasedSuperConstructor);
<<<<<<<
Boolean suppressConstructorProperties, EclipseNode sourceNode, List<Annotation> onConstructor,
String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
builderClassnameAsParameter = null;
}
if (callBuilderBasedSuperConstructor && builderClassnameAsParameter == null) {
type.addError("Calling a builder-based superclass constructor ('callBuilderBasedSuperConstructor') requires a non-empty 'builderClassnameAsParameter' value.");
}
=======
EclipseNode sourceNode, List<Annotation> onConstructor) {
>>>>>>>
EclipseNode sourceNode, List<Annotation> onConstructor,
String builderClassnameAsParameter, boolean callBuilderBasedSuperConstructor) {
if (builderClassnameAsParameter != null && builderClassnameAsParameter.isEmpty()) {
builderClassnameAsParameter = null;
}
if (callBuilderBasedSuperConstructor && builderClassnameAsParameter == null) {
type.addError("Calling a builder-based superclass constructor ('callBuilderBasedSuperConstructor') requires a non-empty 'builderClassnameAsParameter' value.");
} |
<<<<<<<
if ((jmd.mods.flags & Flags.STATIC) == 0) {
annotationNode.addError("@Builder is only supported on types, constructors, and static methods.");
return;
}
JCExpression fullReturnType = jmd.restype;
returnType = fullReturnType;
=======
isStatic = (jmd.mods.flags & Flags.STATIC) != 0;
returnType = jmd.restype;
>>>>>>>
isStatic = (jmd.mods.flags & Flags.STATIC) != 0;
JCExpression fullReturnType = jmd.restype;
returnType = fullReturnType;
<<<<<<<
nameOfStaticBuilderMethod = jmd.name;
if (returnType instanceof JCTypeApply) {
returnType = ((JCTypeApply) returnType).clazz;
}
=======
nameOfBuilderMethod = jmd.name;
>>>>>>>
nameOfBuilderMethod = jmd.name;
if (returnType instanceof JCTypeApply) {
returnType = ((JCTypeApply) returnType).clazz;
} |
<<<<<<<
if (fieldExists(logFieldName, typeNode)!= MemberExistsResult.NOT_EXISTS) {
annotationNode.addWarning("Field '" + logFieldName + "' already exists.");
=======
if (fieldExists("log", typeNode)!= MemberExistsResult.NOT_EXISTS) {
annotationNode.addWarning("Field 'log' already exists.");
>>>>>>>
if (fieldExists(logFieldName, typeNode) != MemberExistsResult.NOT_EXISTS) {
annotationNode.addWarning("Field '" + logFieldName + "' already exists.");
<<<<<<<
createField(framework, typeNode, loggingType, annotationNode.get(), logFieldName, useStatic);
=======
createField(framework, typeNode, loggingType, annotationNode.get(), loggerCategory);
>>>>>>>
createField(framework, typeNode, loggingType, annotationNode.get(), logFieldName, useStatic, loggerTopic);
<<<<<<<
private static boolean createField(LoggingFramework framework, JavacNode typeNode, JCFieldAccess loggingType, JCTree source, String logFieldName, boolean useStatic) {
=======
public static boolean createField(LoggingFramework framework, JavacNode typeNode, JCFieldAccess loggingType, JCTree source, String loggerCategory) {
>>>>>>>
private static boolean createField(LoggingFramework framework, JavacNode typeNode, JCFieldAccess loggingType, JCTree source, String logFieldName, boolean useStatic, String loggerTopic) {
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_COMMONS_FLAG_USAGE, "@apachecommons.CommonsLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_COMMONS_FLAG_USAGE, "@apachecommons.CommonsLog", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.COMMONS, annotation, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JUL_FLAG_USAGE, "@java.Log", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.JUL, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.JUL, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_JUL_FLAG_USAGE, "@java.Log", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.JUL, annotation, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J_FLAG_USAGE, "@Log4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.LOG4J, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J_FLAG_USAGE, "@Log4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J, annotation, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J2_FLAG_USAGE, "@Log4j2", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J2, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.LOG4J2, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_LOG4J2_FLAG_USAGE, "@Log4j2", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.LOG4J2, annotation, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_SLF4J_FLAG_USAGE, "@Slf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.SLF4J, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.SLF4J, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_SLF4J_FLAG_USAGE, "@Slf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.SLF4J, annotation, annotationNode, annotation.getInstance().topic());
<<<<<<<
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_XSLF4J_FLAG_USAGE, "@XSlf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.XSLF4J, annotation, annotationNode);
=======
processAnnotation(LoggingFramework.XSLF4J, annotation, annotationNode, annotation.getInstance().topic());
>>>>>>>
handleFlagUsage(annotationNode, ConfigurationKeys.LOG_XSLF4J_FLAG_USAGE, "@XSlf4j", ConfigurationKeys.LOG_ANY_FLAG_USAGE, "any @Log");
processAnnotation(LoggingFramework.XSLF4J, annotation, annotationNode, annotation.getInstance().topic()); |
<<<<<<<
public abstract void generateMethods(SingularData data, boolean deprecate, JavacNode builderType, JCTree source, boolean fluent, boolean chain);
public abstract void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName);
=======
public abstract void generateMethods(SingularData data, JavacNode builderType, JCTree source, boolean fluent, boolean chain);
public abstract void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName, String builderVariable);
>>>>>>>
public abstract void generateMethods(SingularData data, boolean deprecate, JavacNode builderType, JCTree source, boolean fluent, boolean chain);
public abstract void appendBuildCode(SingularData data, JavacNode builderType, JCTree source, ListBuffer<JCStatement> statements, Name targetVariableName, String builderVariable); |
<<<<<<<
handleConstructor.generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode);
=======
if (builderClassName.isEmpty()) {
builderClassName = new String(td.name) + "Builder";
}
if (superclassBuilderClassName.isEmpty() && td.superclass != null) {
superclassBuilderClassName = new String(td.superclass.getLastToken()) + "Builder";
}
if (extendable) {
boolean callBuilderBasedSuperConstructor = td.superclass != null;
generateBuilderBasedConstructor(tdParent, builderFields, annotationNode,
builderClassName, callBuilderBasedSuperConstructor);
} else {
new HandleConstructor().generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode);
}
>>>>>>>
if (builderClassName.isEmpty()) builderClassName = new String(td.name) + "Builder";
if (extensible) {
boolean callBuilderBasedSuperConstructor = td.superclass != null;
generateBuilderBasedConstructor(tdParent, builderFields, annotationNode, builderClassName, callBuilderBasedSuperConstructor);
} else {
handleConstructor.generateConstructor(tdParent, AccessLevel.PACKAGE, allFields, false, null, SkipIfConstructorExists.I_AM_BUILDER,
Collections.<Annotation>emptyList(), annotationNode);
}
<<<<<<<
MethodDeclaration md = generateBuildMethod(tdParent, isStatic, buildMethodName, nameOfStaticBuilderMethod, returnType, builderFields, builderType, thrownExceptions, addCleaning, ast);
=======
boolean useBuilderBasedConstructor = parent.get() instanceof TypeDeclaration && extendable;
MethodDeclaration md = generateBuildMethod(isStatic, buildMethodName, nameOfStaticBuilderMethod, returnType, builderFields, builderType, thrownExceptions, addCleaning, ast, useBuilderBasedConstructor);
>>>>>>>
MethodDeclaration md = generateBuildMethod(tdParent, isStatic, buildMethodName, nameOfStaticBuilderMethod, returnType, builderFields, builderType, thrownExceptions, addCleaning, ast, extensible);
<<<<<<<
public MethodDeclaration generateBuildMethod(EclipseNode tdParent, boolean isStatic, String name, char[] staticName, TypeReference returnType, List<BuilderFieldData> builderFields, EclipseNode type, TypeReference[] thrownExceptions, boolean addCleaning, ASTNode source) {
=======
/**
* @param useBuilderBasedConstructor
* if true, the {@code build()} method will use a constructor
* that takes the builder instance as parameter (instead of a
* constructor with all relevant fields as parameters)
*/
public MethodDeclaration generateBuildMethod(boolean isStatic, String name, char[] staticName, TypeReference returnType, List<BuilderFieldData> builderFields, EclipseNode type, TypeReference[] thrownExceptions, boolean addCleaning, ASTNode source, boolean useBuilderBasedConstructor) {
>>>>>>>
/**
* @param useBuilderBasedConstructor
* if true, the {@code build()} method will use a constructor
* that takes the builder instance as parameter (instead of a
* constructor with all relevant fields as parameters)
*/
public MethodDeclaration generateBuildMethod(EclipseNode tdParent, boolean isStatic, String name, char[] staticName, TypeReference returnType, List<BuilderFieldData> builderFields, EclipseNode type, TypeReference[] thrownExceptions, boolean addCleaning, ASTNode source, boolean useBuilderBasedConstructor) { |
<<<<<<<
if ( !isDirectDescendentOfObject && !callSuper && implicit ) {
errorNode.addWarning("Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type.");
=======
if ( !isDirectDescendantOfObject && !callSuper ) {
errorNode.addWarning("Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object.");
>>>>>>>
if ( !isDirectDescendantOfObject && !callSuper && implicit ) {
errorNode.addWarning("Generating equals/hashCode implementation but without a call to superclass, even though this class does not extend java.lang.Object. If this is intentional, add '@EqualsAndHashCode(callSuper=false)' to your type."); |
<<<<<<<
=======
import cpw.mods.fml.client.config.GuiConfig;
import cpw.mods.fml.client.config.IConfigElement;
>>>>>>> |
<<<<<<<
hungerNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), "func_150905_g", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")I"));
=======
hungerNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), isObfuscated ? "g" : "func_150905_g", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")I", false));
>>>>>>>
hungerNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), "func_150905_g", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")I", false));
<<<<<<<
saturationNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), "func_150906_h", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")F"));
=======
saturationNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), isObfuscated ? "h" : "func_150906_h", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")F", false));
>>>>>>>
saturationNeedle.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.item.ItemFood"), "func_150906_h", "(" + ObfHelper.getDescriptor("net.minecraft.item.ItemStack") + ")F", false));
<<<<<<<
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "field_75126_c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionTickEvent", "(Lnet/minecraft/entity/player/EntityPlayer;F)F"));
=======
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionTickEvent", "(Lnet/minecraft/entity/player/EntityPlayer;F)F", false));
>>>>>>>
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "field_75126_c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionTickEvent", "(Lnet/minecraft/entity/player/EntityPlayer;F)F", false));
<<<<<<<
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "field_75126_c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionMaxEvent", "(Lnet/minecraft/entity/player/EntityPlayer;FF)Lsqueek/applecore/api/hunger/ExhaustionEvent$Exhausted;"));
=======
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionMaxEvent", "(Lnet/minecraft/entity/player/EntityPlayer;FF)Lsqueek/applecore/api/hunger/ExhaustionEvent$Exhausted;", false));
>>>>>>>
toInject.add(new FieldInsnNode(GETFIELD, internalFoodStatsName, isObfuscated ? "field_75126_c" : "foodExhaustionLevel", "F"));
toInject.add(new MethodInsnNode(INVOKESTATIC, Type.getInternalName(Hooks.class), "fireExhaustionMaxEvent", "(Lnet/minecraft/entity/player/EntityPlayer;FF)Lsqueek/applecore/api/hunger/ExhaustionEvent$Exhausted;", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(FF)F"));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "field_75125_b" : "foodSaturationLevel", "F"));
=======
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(FF)F", false));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "b" : "foodSaturationLevel", "F"));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(FF)F", false));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "field_75125_b" : "foodSaturationLevel", "F"));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(II)I"));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "field_75127_a" : "foodLevel", "I"));
=======
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(II)I", false));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "a" : "foodLevel", "I"));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKESTATIC, "java/lang/Math", "max", "(II)I", false));
toInject.add(new FieldInsnNode(PUTFIELD, internalFoodStatsName, isObfuscated ? "field_75127_a" : "foodLevel", "I"));
<<<<<<<
toInject.add(new FieldInsnNode(GETFIELD, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "field_70170_p" : "worldObj", "Lnet/minecraft/world/World;"));
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.World"), isObfuscated ? "func_82736_K" : "getGameRules", "()Lnet/minecraft/world/GameRules;"));
=======
toInject.add(new FieldInsnNode(GETFIELD, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "o" : "worldObj", isObfuscated ? "Lahb;" : "Lnet/minecraft/world/World;"));
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.World"), isObfuscated ? "O" : "getGameRules", isObfuscated ? "()Lagy;" : "()Lnet/minecraft/world/GameRules;", false));
>>>>>>>
toInject.add(new FieldInsnNode(GETFIELD, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "field_70170_p" : "worldObj", "Lnet/minecraft/world/World;"));
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.World"), isObfuscated ? "func_82736_K" : "getGameRules", "()Lnet/minecraft/world/GameRules;", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.GameRules"), isObfuscated ? "func_82758_b" : "getGameRuleBooleanValue", "(Ljava/lang/String;)Z"));
=======
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.GameRules"), isObfuscated ? "b" : "getGameRuleBooleanValue", "(Ljava/lang/String;)Z", false));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.world.GameRules"), isObfuscated ? "func_82758_b" : "getGameRuleBooleanValue", "(Ljava/lang/String;)Z", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "func_70996_bM" : "shouldHeal", "()Z"));
=======
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "bR" : "shouldHeal", "()Z", false));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "func_70996_bM" : "shouldHeal", "()Z", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.EntityLivingBase"), isObfuscated ? "func_70691_i" : "heal", "(F)V"));
=======
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.EntityLivingBase"), isObfuscated ? "f" : "heal", "(F)V", false));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.EntityLivingBase"), isObfuscated ? "func_70691_i" : "heal", "(F)V", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, internalFoodStatsName, isObfuscated ? "func_75113_a" : "addExhaustion", "(F)V"));
=======
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, internalFoodStatsName, isObfuscated ? "a" : "addExhaustion", "(F)V", false));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, internalFoodStatsName, isObfuscated ? "func_75113_a" : "addExhaustion", "(F)V", false));
<<<<<<<
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "func_70097_a" : "attackEntityFrom","(Lnet/minecraft/util/DamageSource;F)Z"));
=======
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "a" : "attackEntityFrom", isObfuscated ? "(Lro;F)Z" : "(Lnet/minecraft/util/DamageSource;F)Z", false));
>>>>>>>
toInject.add(new MethodInsnNode(INVOKEVIRTUAL, ObfHelper.getInternalClassName("net.minecraft.entity.player.EntityPlayer"), isObfuscated ? "func_70097_a" : "attackEntityFrom","(Lnet/minecraft/util/DamageSource;F)Z", false)); |
<<<<<<<
import org.objectweb.asm.ClassWriter;
=======
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
>>>>>>>
import org.objectweb.asm.ClassWriter;
<<<<<<<
return ASMHelper.writeClassToBytes(classNode, ClassWriter.COMPUTE_FRAMES);
=======
addAlwaysEdibleCheck(classNode, methodNode);
return ASMHelper.writeClassToBytes(classNode);
>>>>>>>
addAlwaysEdibleCheck(classNode, methodNode);
return ASMHelper.writeClassToBytes(classNode, ClassWriter.COMPUTE_FRAMES); |
<<<<<<<
=======
import java.util.Random;
>>>>>>>
<<<<<<<
import squeek.applecore.api.plants.FertilizationEvent;
import squeek.applecore.asm.util.IAppleCoreFertilizable;
import squeek.applecore.asm.util.IAppleCoreFoodStats;
import java.lang.reflect.Method;
import java.util.Random;
=======
>>>>>>>
import squeek.applecore.asm.util.IAppleCoreFoodStats;
import java.lang.reflect.Method;
import java.util.Random; |
<<<<<<<
import fr.arnaudguyon.smartgl.tools.ObjectReader;
=======
import fr.arnaudguyon.smartgl.opengl.SmartGLRenderer;
>>>>>>>
import fr.arnaudguyon.smartgl.tools.ObjectReader;
import fr.arnaudguyon.smartgl.opengl.SmartGLRenderer; |
<<<<<<<
public String buildNullQuery(FeasibilityStudy study, BuildExpressionQueryOptions options)
{
String resultSql = PERFORM_NULL_QUERY_TEMPLATE;
if (options != null)
{
// replease query parameters with tokens
resultSql = StringUtils.replace(resultSql, "@ohdsi_database_schema", options.ohdsiSchema);
resultSql = StringUtils.replace(resultSql, "@cohortTable", options.cohortTable);
}
resultSql = StringUtils.replace(resultSql, "@indexCohortId", "" + study.getIndexRule().getId());
resultSql = StringUtils.replace(resultSql, "@studyId", study.getId().toString());
return resultSql;
}
=======
public String buildNullQuery(FeasibilityStudy study, BuildExpressionQueryOptions options)
{
String resultSql = PERFORM_NULL_QUERY_TEMPLATE;
if (options != null)
{
// replease query parameters with tokens
resultSql = StringUtils.replace(resultSql, "@cdm_database_schema", options.cdmSchema);
resultSql = StringUtils.replace(resultSql, "@cohortTable", options.cohortTable);
}
resultSql = StringUtils.replace(resultSql, "@indexCohortId", "" + study.getIndexRule().getId());
resultSql = StringUtils.replace(resultSql, "@studyId", study.getId().toString());
return resultSql;
}
>>>>>>>
public String buildNullQuery(FeasibilityStudy study, BuildExpressionQueryOptions options)
{
String resultSql = PERFORM_NULL_QUERY_TEMPLATE;
if (options != null)
{
// replease query parameters with tokens
resultSql = StringUtils.replace(resultSql, "@cdm_database_schema", options.cdmSchema);
resultSql = StringUtils.replace(resultSql, "@ohdsi_database_schema", options.ohdsiSchema);
resultSql = StringUtils.replace(resultSql, "@cohortTable", options.cohortTable);
}
resultSql = StringUtils.replace(resultSql, "@indexCohortId", "" + study.getIndexRule().getId());
resultSql = StringUtils.replace(resultSql, "@studyId", study.getId().toString());
return resultSql;
} |
<<<<<<<
@Path("drugeratreemap")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<DrugPrevalence> getDrugEraTreemap(@PathParam("sourceKey") String sourceKey, String[] identifiers) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = "'" + identifiers[i] + "'";
}
String identifierList = StringUtils.join(identifiers, ",");
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getDrugEraTreemap.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptList"}, new String[]{tableQualifier, cdmTableQualifier, identifierList});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<DrugPrevalence> listOfResults = new ArrayList<DrugPrevalence>();
for (Map rs : rows) {
DrugPrevalence d = new DrugPrevalence();
d.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
d.conceptPath = String.valueOf(rs.get("concept_path"));
d.lengthOfEra = Float.valueOf(String.valueOf(rs.get("length_of_era")));
d.numPersons = Long.valueOf(String.valueOf(rs.get("num_persons")));
d.percentPersons = Float.valueOf(String.valueOf(rs.get("length_of_era")));
listOfResults.add(d);
}
return listOfResults;
}
@Path("{conceptId}/drugeraprevalence")
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<DrugEraPrevalence> getDrugEraPrevalenceByGenderAgeYear(@PathParam("sourceKey") String sourceKey, @PathParam("conceptId") String conceptId) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getDrugEraPrevalenceByGenderAgeYear.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptId"}, new String[]{tableQualifier, cdmTableQualifier, conceptId});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<DrugEraPrevalence> listOfResults = new ArrayList<DrugEraPrevalence>();
for (Map rs : rows) {
DrugEraPrevalence d = new DrugEraPrevalence();
d.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
d.trellisName = String.valueOf(rs.get("trellis_name"));
d.seriesName = String.valueOf(rs.get("series_name"));
d.xCalendarYear = Long.valueOf(String.valueOf(rs.get("x_calendar_year")));
d.yPrevalencePer1kPeople = Float.valueOf(String.valueOf(rs.get("y_prevalence_1000pp")));
listOfResults.add(d);
}
return listOfResults;
}
@Path("conditionoccurrencetreemap")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<ConditionOccurrenceTreemapNode> getConditionOccurrenceTreemap(@PathParam("sourceKey") String sourceKey, String[] identifiers) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = "'" + identifiers[i] + "'";
}
String identifierList = StringUtils.join(identifiers, ",");
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getConditionOccurrenceTreemap.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptIdList"}, new String[]{tableQualifier, cdmTableQualifier, identifierList});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<ConditionOccurrenceTreemapNode> listOfResults = new ArrayList<ConditionOccurrenceTreemapNode>();
for (Map rs : rows) {
ConditionOccurrenceTreemapNode c = new ConditionOccurrenceTreemapNode();
c.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
c.conceptPath = String.valueOf(rs.get("concept_path"));
c.numPersons = Long.valueOf(String.valueOf(rs.get("num_persons")));
c.percentPersons = Float.valueOf(String.valueOf(rs.get("percent_persons")));
c.recordsPerPerson = Float.valueOf(String.valueOf(rs.get("records_per_person")));
listOfResults.add(c);
}
return listOfResults;
}
=======
>>>>>>>
@Path("drugeratreemap")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<DrugPrevalence> getDrugEraTreemap(@PathParam("sourceKey") String sourceKey, String[] identifiers) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = "'" + identifiers[i] + "'";
}
String identifierList = StringUtils.join(identifiers, ",");
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getDrugEraTreemap.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptList"}, new String[]{tableQualifier, cdmTableQualifier, identifierList});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<DrugPrevalence> listOfResults = new ArrayList<DrugPrevalence>();
for (Map rs : rows) {
DrugPrevalence d = new DrugPrevalence();
d.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
d.conceptPath = String.valueOf(rs.get("concept_path"));
d.lengthOfEra = Float.valueOf(String.valueOf(rs.get("length_of_era")));
d.numPersons = Long.valueOf(String.valueOf(rs.get("num_persons")));
d.percentPersons = Float.valueOf(String.valueOf(rs.get("length_of_era")));
listOfResults.add(d);
}
return listOfResults;
}
@Path("{conceptId}/drugeraprevalence")
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<DrugEraPrevalence> getDrugEraPrevalenceByGenderAgeYear(@PathParam("sourceKey") String sourceKey, @PathParam("conceptId") String conceptId) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getDrugEraPrevalenceByGenderAgeYear.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptId"}, new String[]{tableQualifier, cdmTableQualifier, conceptId});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<DrugEraPrevalence> listOfResults = new ArrayList<DrugEraPrevalence>();
for (Map rs : rows) {
DrugEraPrevalence d = new DrugEraPrevalence();
d.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
d.trellisName = String.valueOf(rs.get("trellis_name"));
d.seriesName = String.valueOf(rs.get("series_name"));
d.xCalendarYear = Long.valueOf(String.valueOf(rs.get("x_calendar_year")));
d.yPrevalencePer1kPeople = Float.valueOf(String.valueOf(rs.get("y_prevalence_1000pp")));
listOfResults.add(d);
}
return listOfResults;
}
@Path("conditionoccurrencetreemap")
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public List<ConditionOccurrenceTreemapNode> getConditionOccurrenceTreemap(@PathParam("sourceKey") String sourceKey, String[] identifiers) {
Source source = getSourceRepository().findBySourceKey(sourceKey);
String tableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.Results);
String cdmTableQualifier = source.getTableQualifier(SourceDaimon.DaimonType.CDM);
for (int i = 0; i < identifiers.length; i++) {
identifiers[i] = "'" + identifiers[i] + "'";
}
String identifierList = StringUtils.join(identifiers, ",");
String sql_statement = ResourceHelper.GetResourceAsString("/resources/cdmresults/sql/getConditionOccurrenceTreemap.sql");
sql_statement = SqlRender.renderSql(sql_statement, new String[]{"ohdsi_database_schema", "cdm_database_schema", "conceptIdList"}, new String[]{tableQualifier, cdmTableQualifier, identifierList});
sql_statement = SqlTranslate.translateSql(sql_statement, "sql server", source.getSourceDialect());
List<Map<String, Object>> rows = getSourceJdbcTemplate(source).queryForList(sql_statement);
List<ConditionOccurrenceTreemapNode> listOfResults = new ArrayList<ConditionOccurrenceTreemapNode>();
for (Map rs : rows) {
ConditionOccurrenceTreemapNode c = new ConditionOccurrenceTreemapNode();
c.conceptId = Long.valueOf(String.valueOf(rs.get("concept_id")));
c.conceptPath = String.valueOf(rs.get("concept_path"));
c.numPersons = Long.valueOf(String.valueOf(rs.get("num_persons")));
c.percentPersons = Float.valueOf(String.valueOf(rs.get("percent_persons")));
c.recordsPerPerson = Float.valueOf(String.valueOf(rs.get("records_per_person")));
listOfResults.add(c);
}
return listOfResults;
} |
<<<<<<<
// Resort from breakend position ordering to VCF position ordering
breakendIt = new VariantContextWindowedSortingIterator<VariantContextDirectedEvidence>(processContext, maxWindowSize, breakendIt);
=======
breakendIt = new PairedEvidenceTracker<VariantContextDirectedEvidence>(breakendIt);
>>>>>>>
breakendIt = new PairedEvidenceTracker<VariantContextDirectedEvidence>(breakendIt);
// Resort from breakend position ordering to VCF position ordering
breakendIt = new VariantContextWindowedSortingIterator<VariantContextDirectedEvidence>(processContext, maxWindowSize, breakendIt); |
<<<<<<<
// ZAP: 2012/06/29 Added OptionsWebSocketParam.
=======
// ZAP: 2012/06/30 Added the instance variable databaseParam and the method
// getDatabaseParam() and changed the method parse() to also load the database
// configurations.
>>>>>>>
// ZAP: 2012/06/29 Added OptionsWebSocketParam.
// ZAP: 2012/06/30 Added the instance variable databaseParam and the method
// getDatabaseParam() and changed the method parse() to also load the database
// configurations. |
<<<<<<<
// ZAP: 2018/07/09 No longer need cast on SiteMap.getRoot
=======
// ZAP: 2018/07/04 Don't open the report if it was not generated.
>>>>>>>
// ZAP: 2018/07/04 Don't open the report if it was not generated.
// ZAP: 2018/07/09 No longer need cast on SiteMap.getRoot |
<<<<<<<
// ZAP: 2012/07/02 Wraps no HttpMessage object, but more generalized Message.
// new map of supported message types; removed history list; removed unused
// methods.
=======
// ZAP: 2012/07/16 Issue 326: Add response time and total length to manual request dialog
>>>>>>>
// ZAP: 2012/07/02 Wraps no HttpMessage object, but more generalized Message.
// new map of supported message types; removed history list; removed unused
// methods.
// ZAP: 2012/07/16 Issue 326: Add response time and total length to manual request dialog
<<<<<<<
// ZAP: introduced map of supported message types
private Map<Class<? extends Message>, MessageSender> mapMessageSenders;
=======
private static JLabel labelTimeElapse = null;
private static JLabel labelContentLength = null;
private static JLabel labelTotalLength = null;
private static JToolBar footerToolbar = null;
>>>>>>>
// ZAP: introduced map of supported message types
private Map<Class<? extends Message>, MessageSender> mapMessageSenders;
private static JLabel labelTimeElapse = null;
private static JLabel labelContentLength = null;
private static JLabel labelTotalLength = null;
private static JToolBar footerToolbar = null;
<<<<<<<
=======
this.historyList = ((ExtensionHistory)Control.getSingleton().getExtensionLoader().getExtension("ExtensionHistory")).getHistoryList();
>>>>>>>
<<<<<<<
// ZAP: Removed the method setExtension(Extension), not used anymore.
=======
public void setExtension(Extension extension) {
requestPanel.setExtension(extension);
responsePanel.setExtension(extension);
}
>>>>>>>
// ZAP: Removed the method setExtension(Extension), not used anymore.
<<<<<<<
getRequestPanel().setMessage(aMessage);
getResponsePanel().setMessage(aMessage);
=======
getRequestPanel().setMessage(httpMessage);
getResponsePanel().setMessage(httpMessage);
//reload footer status
setFooterStatus(null);
>>>>>>>
getRequestPanel().setMessage(aMessage);
getResponsePanel().setMessage(aMessage);
//reload footer status
setFooterStatus(null);
<<<<<<<
private void send(final Message aMessage) {
final MessageSender sender = mapMessageSenders.get(aMessage.getClass());
if (sender != null) {
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
sender.handleSendMessage(aMessage);
// FIXME change to the HttpPanelSender
switchToTab(1);
} catch (Exception e) {
extension.getView().showWarningDialog(e.getMessage());
} finally {
btnSend.setEnabled(true);
}
}
});
t.setPriority(Thread.NORM_PRIORITY);
t.start();
}
=======
/**
* Return the footer status bar object
* @return
*/
private JToolBar getFooterStatusBar() {
if (footerToolbar == null) {
footerToolbar = new JToolBar();
footerToolbar.setEnabled(true);
footerToolbar.setFloatable(false);
footerToolbar.setRollover(true);
footerToolbar.setName("Footer Toolbar Left");
footerToolbar.setBorder(BorderFactory.createEtchedBorder());
}
return footerToolbar;
}
/**
* Set footer status bar
* @param msg
*/
private void setFooterStatus(HttpMessage msg){
if (msg != null) {
//get values
long totalLength = msg.getResponseBody().toString().length()+msg.getResponseHeader().getHeadersAsString().length();
long contentLength = msg.getResponseBody().toString().length();
long timeLapse =msg.getTimeElapsedMillis();
// show time lapse and content length between request and response Constant.messages.getString("manReq.label.timeLapse")
getLabelTimeLapse().setText(Constant.messages.getString("manReq.label.timeLapse")+String.valueOf(timeLapse)+" ms");
getLabelContentLength().setText(Constant.messages.getString("manReq.label.contentLength")+String.valueOf(contentLength)+" "+Constant.messages.getString("manReq.label.totalLengthBytes"));
getLabelTotalLength().setText(Constant.messages.getString("manReq.label.totalLength") +String.valueOf(totalLength)+" "+Constant.messages.getString("manReq.label.totalLengthBytes"));
}else{
getLabelTimeLapse().setText(Constant.messages.getString("manReq.label.timeLapse"));
getLabelContentLength().setText(Constant.messages.getString("manReq.label.contentLength"));
getLabelTotalLength().setText(Constant.messages.getString("manReq.label.totalLength"));
}
}
/**
*
* The footer should really be a javax.swing.JToolBar containing one or more JLabels
It might be clearer if you separate the info in the toolbar with using toolbar.addSeparator() -
* @param msg
*/
private void send(final HttpMessage msg) {
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
getHttpSender().sendAndReceive(msg, getButtonFollowRedirect().isSelected());
EventQueue.invokeAndWait(new Runnable() {
@Override
public void run() {
if (!msg.getResponseHeader().isEmpty()) {
setFooterStatus(getResponsePanel().getHttpMessage());
// Indicate UI new response arrived
switchToTab(1);
responsePanel.updateContent();
final int finalType = HistoryReference.TYPE_MANUAL;
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
addHistory(msg, finalType);
}
});
t.start();
}
}
});
} catch (final HttpMalformedHeaderException mhe) {
requestPanel.getExtension().getView().showWarningDialog("Malformed header error.");
} catch (final IOException ioe) {
requestPanel.getExtension().getView().showWarningDialog("IO error in sending request.");
} catch (final Exception e) {
// ZAP: Log exceptions
log.error(e.getMessage(), e);
} finally {
btnSend.setEnabled(true);
}
}
});
t.setPriority(Thread.NORM_PRIORITY);
t.start();
>>>>>>>
/**
* Return the footer status bar object
* @return
*/
private JToolBar getFooterStatusBar() {
if (footerToolbar == null) {
footerToolbar = new JToolBar();
footerToolbar.setEnabled(true);
footerToolbar.setFloatable(false);
footerToolbar.setRollover(true);
footerToolbar.setName("Footer Toolbar Left");
footerToolbar.setBorder(BorderFactory.createEtchedBorder());
}
return footerToolbar;
}
/**
* Set footer status bar
* @param msg
*/
private void setFooterStatus(HttpMessage msg){
if (msg != null) {
//get values
long totalLength = msg.getResponseBody().toString().length()+msg.getResponseHeader().getHeadersAsString().length();
long contentLength = msg.getResponseBody().toString().length();
long timeLapse =msg.getTimeElapsedMillis();
// show time lapse and content length between request and response Constant.messages.getString("manReq.label.timeLapse")
getLabelTimeLapse().setText(Constant.messages.getString("manReq.label.timeLapse")+String.valueOf(timeLapse)+" ms");
getLabelContentLength().setText(Constant.messages.getString("manReq.label.contentLength")+String.valueOf(contentLength)+" "+Constant.messages.getString("manReq.label.totalLengthBytes"));
getLabelTotalLength().setText(Constant.messages.getString("manReq.label.totalLength") +String.valueOf(totalLength)+" "+Constant.messages.getString("manReq.label.totalLengthBytes"));
}else{
getLabelTimeLapse().setText(Constant.messages.getString("manReq.label.timeLapse"));
getLabelContentLength().setText(Constant.messages.getString("manReq.label.contentLength"));
getLabelTotalLength().setText(Constant.messages.getString("manReq.label.totalLength"));
}
}
private void send(final Message aMessage) {
final MessageSender sender = mapMessageSenders.get(aMessage.getClass());
if (sender != null) {
final Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
sender.handleSendMessage(aMessage);
// FIXME change to the HttpPanelSender
switchToTab(1);
setFooterStatus((HttpMessage) getResponsePanel().getMessage());
} catch (Exception e) {
extension.getView().showWarningDialog(e.getMessage());
} finally {
btnSend.setEnabled(true);
}
}
});
t.setPriority(Thread.NORM_PRIORITY);
t.start();
} |
<<<<<<<
public static final String ADD_DIMENSION = "addCustomDimension";
public static final String ADD_TRANSACTION = "addTransaction";
public static final String ADD_TRANSACTION_ITEM = "addTransactionItem";
=======
public static final String SET_USER_ID = "setUserId";
public static final String DEBUG_MODE = "debugMode";
>>>>>>>
public static final String ADD_DIMENSION = "addCustomDimension";
public static final String ADD_TRANSACTION = "addTransaction";
public static final String ADD_TRANSACTION_ITEM = "addTransactionItem";
public static final String SET_USER_ID = "setUserId";
public static final String DEBUG_MODE = "debugMode"; |
<<<<<<<
import android.content.Context;
=======
import com.google.wireless.speed.speedometer.SpeedometerApp;
import com.google.wireless.speed.speedometer.util.MeasurementJsonConvertor;
import com.google.wireless.speed.speedometer.util.RuntimeUtil;
import android.util.Log;
>>>>>>>
import com.google.wireless.speed.speedometer.SpeedometerApp;
import com.google.wireless.speed.speedometer.util.MeasurementJsonConvertor;
import com.google.wireless.speed.speedometer.util.RuntimeUtil;
import android.content.Context;
import android.util.Log; |
<<<<<<<
// The default checkin interval in seconds
private static final boolean DEFAULT_CHECKIN_ENABLED = false;
private static final int DEDAULT_CHECKIN_INTERVAL_SEC = 2 * 60;
private static final long PAUSE_BETWEEN_CHECKIN_CHANGE_SEC = 2L;
//default minimum battery percentage to run measurements
private static final int DEFAULT_BATTERY_THRES_PRECENT = 60;
=======
>>>>>>>
<<<<<<<
=======
this.checkinIntervalSec = Config.DEFAULT_CHECKIN_INTERVAL_SEC;
>>>>>>>
<<<<<<<
updateFromPreference();
=======
this.powerManager = new BatteryCapPowerManager(Config.DEFAULT_BATTERY_THRESH_PRECENT, this);
>>>>>>>
this.powerManager = new BatteryCapPowerManager(Config.DEFAULT_BATTERY_THRESH_PRECENT, this);
updateFromPreference(); |
<<<<<<<
import com.dogecoin.dogecoinj.core.*;
=======
import javafx.scene.layout.HBox;
import org.bitcoinj.core.*;
>>>>>>>
import javafx.scene.layout.HBox;
import com.dogecoin.dogecoinj.core.*; |
<<<<<<<
import io.eventuate.tram.messaging.common.sql.SqlDialectConfiguration;
import io.eventuate.tram.messaging.common.sql.SqlDialectSelector;
=======
import io.eventuate.tram.jdbc.CommonJdbcMessagingConfiguration;
>>>>>>>
import io.eventuate.tram.jdbc.CommonJdbcMessagingConfiguration;
<<<<<<<
@Import(SqlDialectConfiguration.class)
=======
@Import(CommonJdbcMessagingConfiguration.class)
>>>>>>>
@Import({SqlDialectConfiguration.class, CommonJdbcMessagingConfiguration.class})
<<<<<<<
public EventuateSchema eventuateSchema(@Value("${eventuate.database.schema:#{null}}") String eventuateDatabaseSchema) {
return new EventuateSchema(eventuateDatabaseSchema);
}
@Bean
public MessageProducer messageProducer(EventuateSchema eventuateSchema,
SqlDialectSelector sqlDialectSelector) {
return new MessageProducerJdbcImpl(eventuateSchema,
sqlDialectSelector.getDialect().getCurrentTimeInMillisecondsExpression(), messageInterceptors);
=======
public MessageProducer messageProducer(EventuateSchema eventuateSchema) {
return new MessageProducerJdbcImpl(eventuateSchema, messageInterceptors);
>>>>>>>
public MessageProducer messageProducer(EventuateSchema eventuateSchema,
SqlDialectSelector sqlDialectSelector) {
return new MessageProducerJdbcImpl(eventuateSchema,
sqlDialectSelector.getDialect().getCurrentTimeInMillisecondsExpression(), messageInterceptors); |
<<<<<<<
import io.eventuate.tram.messaging.common.Message;
=======
import io.eventuate.tram.events.common.DefaultDomainEventNameMapping;
>>>>>>>
import io.eventuate.tram.messaging.common.Message;
import io.eventuate.tram.events.common.DefaultDomainEventNameMapping; |
<<<<<<<
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setWasInQuarantineBeforeIsolation(source.getWasInQuarantineBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil());
target.setReportingDistrict(districtService.getByReferenceDto(source.getReportingDistrict()));
target.setBloodOrganOrTissueDonated(source.getBloodOrganOrTissueDonated());
target.setNotACaseReasonNegativeTest(source.isNotACaseReasonNegativeTest());
target.setNotACaseReasonPhysicianInformation(source.isNotACaseReasonPhysicianInformation());
target.setNotACaseReasonDifferentPathogen(source.isNotACaseReasonDifferentPathogen());
target.setNotACaseReasonOther(source.isNotACaseReasonOther());
target.setNotACaseReasonDetails(source.getNotACaseReasonDetails());
return target;
=======
return entity.toReference();
>>>>>>>
target.setCaseIdIsm(source.getCaseIdIsm());
target.setCovidTestReason(source.getCovidTestReason());
target.setCovidTestReasonDetails(source.getCovidTestReasonDetails());
target.setContactTracingFirstContactType(source.getContactTracingFirstContactType());
target.setContactTracingFirstContactDate(source.getContactTracingFirstContactDate());
target.setQuarantineReasonBeforeIsolation(source.getQuarantineReasonBeforeIsolation());
target.setWasInQuarantineBeforeIsolation(source.getWasInQuarantineBeforeIsolation());
target.setQuarantineReasonBeforeIsolationDetails(source.getQuarantineReasonBeforeIsolationDetails());
target.setEndOfIsolationReason(source.getEndOfIsolationReason());
target.setEndOfIsolationReasonDetails(source.getEndOfIsolationReasonDetails());
target.setNosocomialOutbreak(source.isNosocomialOutbreak());
target.setInfectionSetting(source.getInfectionSetting());
target.setProhibitionToWork(source.getProhibitionToWork());
target.setProhibitionToWorkFrom(source.getProhibitionToWorkFrom());
target.setProhibitionToWorkUntil(source.getProhibitionToWorkUntil());
target.setReportingDistrict(districtService.getByReferenceDto(source.getReportingDistrict()));
target.setBloodOrganOrTissueDonated(source.getBloodOrganOrTissueDonated());
target.setNotACaseReasonNegativeTest(source.isNotACaseReasonNegativeTest());
target.setNotACaseReasonPhysicianInformation(source.isNotACaseReasonPhysicianInformation());
target.setNotACaseReasonDifferentPathogen(source.isNotACaseReasonDifferentPathogen());
target.setNotACaseReasonOther(source.isNotACaseReasonOther());
target.setNotACaseReasonDetails(source.getNotACaseReasonDetails());
return entity.toReference(); |
<<<<<<<
private final boolean hasOptions;
public SormasToSormasOptionsForm(boolean isForCase, List<String> excludedOrganizationIds) {
this(isForCase, excludedOrganizationIds, true);
}
public SormasToSormasOptionsForm(boolean hasOptions) {
this(false, null, hasOptions);
}
public SormasToSormasOptionsForm(boolean isForCase, List<String> excludedOrganizationIds, boolean hasOptions) {
=======
private final Consumer<SormasToSormasOptionsForm> customFieldDependencies;
public static SormasToSormasOptionsForm forCase(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(
Arrays.asList(SormasToSormasOptionsDto.WITH_ASSOCIATED_CONTACTS, SormasToSormasOptionsDto.WITH_SAMPLES),
excludedOrganizationIds,
null);
}
public static SormasToSormasOptionsForm forContact(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(Collections.singletonList(SormasToSormasOptionsDto.WITH_SAMPLES), excludedOrganizationIds, null);
}
public static SormasToSormasOptionsForm forEvent(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(
Arrays.asList(SormasToSormasOptionsDto.WITH_EVENT_PARTICIPANTS, SormasToSormasOptionsDto.WITH_SAMPLES),
excludedOrganizationIds,
(form) -> FieldHelper.setVisibleWhen(
form.getFieldGroup(),
SormasToSormasOptionsDto.WITH_SAMPLES,
SormasToSormasOptionsDto.WITH_EVENT_PARTICIPANTS,
Boolean.TRUE,
true));
}
private SormasToSormasOptionsForm(
List<String> customOptions,
List<String> excludedOrganizationIds,
Consumer<SormasToSormasOptionsForm> customFieldDependencies) {
>>>>>>>
private final boolean hasOptions;
private final Consumer<SormasToSormasOptionsForm> customFieldDependencies;
public static SormasToSormasOptionsForm forCase(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(
Arrays.asList(SormasToSormasOptionsDto.WITH_ASSOCIATED_CONTACTS, SormasToSormasOptionsDto.WITH_SAMPLES),
excludedOrganizationIds,
null);
}
public static SormasToSormasOptionsForm forContact(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(Collections.singletonList(SormasToSormasOptionsDto.WITH_SAMPLES), excludedOrganizationIds, null);
}
public static SormasToSormasOptionsForm forEvent(List<String> excludedOrganizationIds) {
return new SormasToSormasOptionsForm(
Arrays.asList(SormasToSormasOptionsDto.WITH_EVENT_PARTICIPANTS, SormasToSormasOptionsDto.WITH_SAMPLES),
excludedOrganizationIds,
(form) -> FieldHelper.setVisibleWhen(
form.getFieldGroup(),
SormasToSormasOptionsDto.WITH_SAMPLES,
SormasToSormasOptionsDto.WITH_EVENT_PARTICIPANTS,
Boolean.TRUE,
true));
}
private SormasToSormasOptionsForm(
List<String> customOptions,
List<String> excludedOrganizationIds,
Consumer<SormasToSormasOptionsForm> customFieldDependencies) {
<<<<<<<
this.hasOptions = hasOptions;
=======
this.customFieldDependencies = customFieldDependencies;
>>>>>>>
this.customFieldDependencies = customFieldDependencies;
this.hasOptions = hasOptions;
<<<<<<<
CheckBox pseudonymizeSensitiveData = addField(SormasToSormasOptionsDto.PSEUDONYMIZE_SENSITIVE_DATA);
pseudonymizeSensitiveData.addStyleNames(CssStyles.VSPACE_3);
TextArea comment = addField(SormasToSormasOptionsDto.COMMENT, TextArea.class);
comment.setRows(3);
}
=======
TextArea comment = addField(SormasToSormasOptionsDto.COMMENT, TextArea.class);
comment.setRows(3);
if (customFieldDependencies != null) {
customFieldDependencies.accept(this);
}
>>>>>>>
CheckBox pseudonymizeSensitiveData = addField(SormasToSormasOptionsDto.PSEUDONYMIZE_SENSITIVE_DATA);
pseudonymizeSensitiveData.addStyleNames(CssStyles.VSPACE_3);
TextArea comment = addField(SormasToSormasOptionsDto.COMMENT, TextArea.class);
comment.setRows(3);
if (customFieldDependencies != null) {
customFieldDependencies.accept(this);
}
} |
<<<<<<<
public static final String EVENT_LOCATION = "eventLocationString";
=======
public static final String EVENT_LOCATION = "eventLocation";
public static final String SRC_TYPE = "srcType";
>>>>>>>
public static final String EVENT_LOCATION = "eventLocationString";
public static final String SRC_TYPE = "srcType";
<<<<<<<
private Date eventDate;
@SensitiveData
=======
private Date startDate;
private Date endDate;
>>>>>>>
private Date startDate;
private Date endDate;
@SensitiveData
<<<<<<<
private EventIndexLocation eventIndexLocation;
@SensitiveData
=======
private LocationReferenceDto eventLocation;
private EventSourceType srcType;
>>>>>>>
private EventIndexLocation eventIndexLocation;
private EventSourceType srcType;
@SensitiveData
<<<<<<<
Date reportDateTime,
String reportingUserUuid,
String surveillanceOfficerUuid) {
=======
String srcMediaWebsite,
String srcMediaName,
Date reportDateTime) {
>>>>>>>
String srcMediaWebsite,
String srcMediaName,
Date reportDateTime,
String reportingUserUuid,
String surveillanceOfficerUuid) {
<<<<<<<
this.eventIndexLocation = new EventIndexLocation(regionName, districtName, communityName, city, address);
=======
this.eventLocation = new LocationReferenceDto(locationUuid, regionName, districtName, communityName, city, address);
this.srcType = srcType;
>>>>>>>
this.eventIndexLocation = new EventIndexLocation(regionName, districtName, communityName, city, address);
this.srcType = srcType; |
<<<<<<<
Result getConsensusConfig(Map<String,Object> params);
=======
Result getSeedNodeList(Map<String,Object> params);
/**
* 获取共识两轮次间节点变化信息
* @param params
* @return Result
* */
Result getAgentChangeInfo(Map<String,Object> params);
>>>>>>>
Result getConsensusConfig(Map<String,Object> params);
Result getSeedNodeList(Map<String,Object> params);
/**
* 获取共识两轮次间节点变化信息
* @param params
* @return Result
* */
Result getAgentChangeInfo(Map<String,Object> params); |
<<<<<<<
import de.symeda.sormas.ui.caze.eventLink.EventListComponent;
import de.symeda.sormas.ui.caze.messaging.SmsListComponent;
=======
import de.symeda.sormas.ui.events.eventLink.EventListComponent;
>>>>>>>
import de.symeda.sormas.ui.caze.eventLink.EventListComponent;
import de.symeda.sormas.ui.caze.messaging.SmsListComponent;
import de.symeda.sormas.ui.events.eventLink.EventListComponent;
<<<<<<<
boolean externalMessagesEnabled = FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.MANUAL_EXTERNAL_MESSAGES);
if (externalMessagesEnabled && UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
SmsListComponent smsList = new SmsListComponent(getCaseRef());
smsList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(smsList, SMS_LOC);
}
if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) && !caze.isUnreferredPortHealthCase()) {
=======
if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) && !caze.checkIsUnreferredPortHealthCase()) {
>>>>>>>
boolean externalMessagesEnabled = FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.MANUAL_EXTERNAL_MESSAGES);
if (externalMessagesEnabled && UserProvider.getCurrent().hasUserRight(UserRight.SEND_MANUAL_EXTERNAL_MESSAGES)) {
SmsListComponent smsList = new SmsListComponent(getCaseRef());
smsList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(smsList, SMS_LOC);
}
if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) && !caze.checkIsUnreferredPortHealthCase()) { |
<<<<<<<
import de.symeda.sormas.api.user.UserRight;
import org.apache.commons.lang3.ArrayUtils;
import java.util.stream.Stream;
import static de.symeda.sormas.ui.utils.LayoutUtil.*;
=======
>>>>>>>
<<<<<<<
super(type, propertyI18nPrefix, null,
new SormasFieldGroupFieldFactory(null, null, null), true);
=======
super(type, propertyI18nPrefix, true);
>>>>>>>
super(type, propertyI18nPrefix,
new SormasFieldGroupFieldFactory(null, null, null), true); |
<<<<<<<
private Join<Location, Community> personAddressCommunity;
=======
private Join<Location, Facility> personAddressFacility;
>>>>>>>
private Join<Location, Community> personAddressCommunity;
private Join<Location, Facility> personAddressFacility;
<<<<<<<
public Join<Location, Community> getPersonAddressCommunity() {
return getOrCreate(personAddressCommunity, Location.COMMUNITY, JoinType.LEFT, getPersonAddress(), this::setPersonAddressCommunity);
}
private void setPersonAddressCommunity(Join<Location, Community> personAddressCommunity) {
this.personAddressCommunity = personAddressCommunity;
}
public Join<Person, Facility> getOccupationFacility() {
return getOrCreate(occupationFacility, Person.OCCUPATION_FACILITY, JoinType.LEFT, getPerson(), this::setOccupationFacility);
=======
public Join<Location, Facility> getPersonAddressFacility() {
return getOrCreate(personAddressFacility, Location.FACILITY, JoinType.LEFT, getAddress(), this::setPersonAddressFacility);
>>>>>>>
public Join<Location, Community> getPersonAddressCommunity() {
return getOrCreate(personAddressCommunity, Location.COMMUNITY, JoinType.LEFT, getPersonAddress(), this::setPersonAddressCommunity);
}
private void setPersonAddressCommunity(Join<Location, Community> personAddressCommunity) {
this.personAddressCommunity = personAddressCommunity;
}
public Join<Location, Facility> getPersonAddressFacility() {
return getOrCreate(personAddressFacility, Location.FACILITY, JoinType.LEFT, getAddress(), this::setPersonAddressFacility); |
<<<<<<<
import java.util.List;
import java.util.stream.Collectors;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.ui.Alignment;
=======
import java.util.Optional;
>>>>>>>
import java.util.Optional;
import java.util.List;
import java.util.stream.Collectors;
import com.vaadin.shared.ui.MarginInfo;
import com.vaadin.ui.Alignment;
<<<<<<<
import de.symeda.sormas.api.FacadeProvider;
=======
import de.symeda.sormas.api.ConfigFacade;
import de.symeda.sormas.api.FacadeProvider;
>>>>>>>
import de.symeda.sormas.api.ConfigFacade;
import de.symeda.sormas.api.FacadeProvider;
<<<<<<<
import de.symeda.sormas.ui.utils.CssStyles;
=======
import de.symeda.sormas.ui.dashboard.visualisation.DashboardNetworkComponent;
>>>>>>>
import de.symeda.sormas.ui.dashboard.visualisation.DashboardNetworkComponent;
import de.symeda.sormas.ui.utils.CssStyles;
<<<<<<<
private VerticalLayout mapLayout;
// Case counts
private Label minLabel = new Label();
private Label maxLabel = new Label();
private Label avgLabel = new Label();
private Label sourceCasesLabel = new Label();
=======
private Optional<VerticalLayout> mapLayout;
private Optional<VerticalLayout> networkDiagramLayout;
private VerticalLayout rowsLayout;
>>>>>>>
private Optional<VerticalLayout> mapLayout;
private Optional<VerticalLayout> networkDiagramLayout;
private VerticalLayout rowsLayout;
// Case counts
private Label minLabel = new Label();
private Label maxLabel = new Label();
private Label avgLabel = new Label();
private Label sourceCasesLabel = new Label();
<<<<<<<
dashboardLayout.addComponent(statisticsComponent);
dashboardLayout.setExpandRatio(statisticsComponent, 0);
HorizontalLayout caseStatisticsLayout = createCaseStatisticsLayout();
dashboardLayout.addComponent(caseStatisticsLayout);
dashboardLayout.setExpandRatio(caseStatisticsLayout, 0);
=======
rowsLayout.addComponent(statisticsComponent);
rowsLayout.setExpandRatio(statisticsComponent, 0);
>>>>>>>
rowsLayout.addComponent(statisticsComponent);
rowsLayout.setExpandRatio(statisticsComponent, 0);
HorizontalLayout caseStatisticsLayout = createCaseStatisticsLayout();
dashboardLayout.addComponent(caseStatisticsLayout);
dashboardLayout.setExpandRatio(caseStatisticsLayout, 0); |
<<<<<<<
@Order(46)
@ExportProperty(EventParticipantDto.INVOLVEMENT_DESCRIPTION)
=======
@Order(61)
@ExportProperty(EventParticipantExportDto.EVENT_PARTICIPANT_INVOLVMENT_DESCRIPTION)
>>>>>>>
@Order(61)
@ExportProperty(EventParticipantDto.INVOLVEMENT_DESCRIPTION)
<<<<<<<
@Order(50)
@ExportEntity(EventDto.class)
=======
@Order(62)
>>>>>>>
@Order(62)
@ExportEntity(EventDto.class)
<<<<<<<
@Order(51)
@ExportEntity(EventDto.class)
=======
@Order(63)
>>>>>>>
@Order(63)
@ExportEntity(EventDto.class)
<<<<<<<
@Order(52)
@ExportEntity(EventDto.class)
=======
@Order(64)
>>>>>>>
@Order(64)
@ExportEntity(EventDto.class)
<<<<<<<
@Order(53)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.DISEASE)
=======
@Order(65)
@ExportProperty(EventParticipantExportDto.EVENT_DISEASE)
>>>>>>>
@Order(65)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.DISEASE)
<<<<<<<
@Order(54)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.TYPE_OF_PLACE)
=======
@Order(66)
@ExportProperty(EventParticipantExportDto.EVENT_TYPE_OF_PLACE)
>>>>>>>
@Order(66)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.TYPE_OF_PLACE)
<<<<<<<
@Order(55)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.START_DATE)
=======
@Order(67)
@ExportProperty(EventParticipantExportDto.EVENT_START_DATE)
>>>>>>>
@Order(67)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.START_DATE)
<<<<<<<
@Order(56)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.END_DATE)
=======
@Order(68)
@ExportProperty(EventParticipantExportDto.EVENT_END_DATE)
>>>>>>>
@Order(68)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.END_DATE)
<<<<<<<
@Order(57)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.EVENT_TITLE)
=======
@Order(69)
@ExportProperty(EventParticipantExportDto.EVENT_TITLE)
>>>>>>>
@Order(69)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.EVENT_TITLE)
<<<<<<<
@Order(58)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.EVENT_DESC)
=======
@Order(70)
@ExportProperty(EventParticipantExportDto.EVENT_DESCRIPTION)
>>>>>>>
@Order(70)
@ExportEntity(EventDto.class)
@ExportProperty(EventDto.EVENT_DESC)
<<<<<<<
@Order(59)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.REGION })
=======
@Order(71)
@ExportProperty(EventParticipantExportDto.EVENT_REGION)
>>>>>>>
@Order(71)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.REGION })
<<<<<<<
@Order(60)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.DISTRICT })
=======
@Order(72)
@ExportProperty(EventParticipantExportDto.EVENT_DISTRICT)
>>>>>>>
@Order(72)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.DISTRICT })
<<<<<<<
@Order(61)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.COMMUNITY })
=======
@Order(73)
@ExportProperty(EventParticipantExportDto.EVENT_COMMUNITY)
>>>>>>>
@Order(73)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.COMMUNITY })
<<<<<<<
@Order(62)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.CITY })
=======
@Order(74)
@ExportProperty(EventParticipantExportDto.EVENT_CITY)
>>>>>>>
@Order(74)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.CITY })
<<<<<<<
@Order(63)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.STREET })
=======
@Order(75)
@ExportProperty(EventParticipantExportDto.EVENT_STREET)
>>>>>>>
@Order(75)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.STREET })
<<<<<<<
@Order(64)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.HOUSE_NUMBER })
=======
@Order(76)
@ExportProperty(EventParticipantExportDto.EVENT_HOUSE_NUMBER)
>>>>>>>
@Order(76)
@ExportEntity(LocationDto.class)
@ExportProperty({
EventDto.EVENT_LOCATION,
LocationDto.HOUSE_NUMBER }) |
<<<<<<<
import de.symeda.sormas.ui.caze.eventLink.EventListComponent;
import de.symeda.sormas.ui.docgeneration.CaseDocumentsComponent;
=======
import de.symeda.sormas.ui.events.eventLink.EventListComponent;
import de.symeda.sormas.ui.docgeneration.DocGenerationComponent;
>>>>>>>
import de.symeda.sormas.ui.events.eventLink.EventListComponent;
import de.symeda.sormas.ui.docgeneration.CaseDocumentsComponent; |
<<<<<<<
public static final String FOLLOW_UP_UNTIL_TO = "followUpUntilTo";
=======
public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup";
public static final String FACILITY_TYPE = "facilityType";
>>>>>>>
public static final String FOLLOW_UP_UNTIL_TO = "followUpUntilTo";
public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup";
public static final String FACILITY_TYPE = "facilityType";
<<<<<<<
private FollowUpStatus followUpStatus;
private Date followUpUntilTo;
private Date followUpUntilFrom;
private Date reportDateTo;
=======
private FacilityTypeGroup facilityTypeGroup;
private FacilityType facilityType;
>>>>>>>
private FollowUpStatus followUpStatus;
private Date followUpUntilTo;
private Date followUpUntilFrom;
private Date reportDateTo;
private FacilityTypeGroup facilityTypeGroup;
private FacilityType facilityType;
<<<<<<<
public FollowUpStatus getFollowUpStatus() {
return followUpStatus;
}
public void setFollowUpStatus(FollowUpStatus followUpStatus) {
this.followUpStatus = followUpStatus;
}
public void setFollowUpUntilTo(Date followUpUntilTo) {
this.followUpUntilTo = followUpUntilTo;
}
public CaseCriteria followUpUntilTo(Date followUpUntilTo) {
this.followUpUntilTo = followUpUntilTo;
return this;
}
public Date getFollowUpUntilTo() {
return followUpUntilTo;
}
public CaseCriteria followUpUntilFrom(Date followUpUntilFrom) {
this.followUpUntilFrom = followUpUntilFrom;
return this;
}
public Date getFollowUpUntilFrom() {
return followUpUntilFrom;
}
public CaseCriteria reportDateTo(Date reportDateTo) {
this.reportDateTo = reportDateTo;
return this;
}
public Date getReportDateTo() {
return reportDateTo;
}
public void setReportDateTo(Date reportDateTo) {
this.reportDateTo = reportDateTo;
}
=======
public FacilityTypeGroup getFacilityTypeGroup() {
return facilityTypeGroup;
}
public void setFacilityTypeGroup(FacilityTypeGroup typeGroup) {
this.facilityTypeGroup = typeGroup;
}
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType type) {
this.facilityType = type;
}
>>>>>>>
public FollowUpStatus getFollowUpStatus() {
return followUpStatus;
}
public void setFollowUpStatus(FollowUpStatus followUpStatus) {
this.followUpStatus = followUpStatus;
}
public void setFollowUpUntilTo(Date followUpUntilTo) {
this.followUpUntilTo = followUpUntilTo;
}
public CaseCriteria followUpUntilTo(Date followUpUntilTo) {
this.followUpUntilTo = followUpUntilTo;
return this;
}
public Date getFollowUpUntilTo() {
return followUpUntilTo;
}
public CaseCriteria followUpUntilFrom(Date followUpUntilFrom) {
this.followUpUntilFrom = followUpUntilFrom;
return this;
}
public Date getFollowUpUntilFrom() {
return followUpUntilFrom;
}
public CaseCriteria reportDateTo(Date reportDateTo) {
this.reportDateTo = reportDateTo;
return this;
}
public Date getReportDateTo() {
return reportDateTo;
}
public void setReportDateTo(Date reportDateTo) {
this.reportDateTo = reportDateTo;
}
public FacilityTypeGroup getFacilityTypeGroup() {
return facilityTypeGroup;
}
public void setFacilityTypeGroup(FacilityTypeGroup typeGroup) {
this.facilityTypeGroup = typeGroup;
}
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType type) {
this.facilityType = type;
} |
<<<<<<<
public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup";
public static final String FACILITY_TYPE = "facilityType";
=======
public static final String BIRTHDATE_YYYY = "birthdateYYYY";
public static final String BIRTHDATE_MM = "birthdateMM";
public static final String BIRTHDATE_DD = "birthdateDD";
>>>>>>>
public static final String BIRTHDATE_YYYY = "birthdateYYYY";
public static final String BIRTHDATE_MM = "birthdateMM";
public static final String BIRTHDATE_DD = "birthdateDD";
public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup";
public static final String FACILITY_TYPE = "facilityType";
<<<<<<<
private FacilityTypeGroup facilityTypeGroup;
private FacilityType facilityType;
=======
private Integer birthdateYYYY;
private Integer birthdateMM;
private Integer birthdateDD;
>>>>>>>
private Integer birthdateYYYY;
private Integer birthdateMM;
private Integer birthdateDD;
private FacilityTypeGroup facilityTypeGroup;
private FacilityType facilityType;
<<<<<<<
public FacilityTypeGroup getFacilityTypeGroup() {
return facilityTypeGroup;
}
public void setFacilityTypeGroup(FacilityTypeGroup typeGroup) {
this.facilityTypeGroup = typeGroup;
}
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType type) {
this.facilityType = type;
}
=======
public Integer getBirthdateYYYY() {
return birthdateYYYY;
}
public void setBirthdateYYYY(Integer birthdateYYYY) {
this.birthdateYYYY = birthdateYYYY;
}
public Integer getBirthdateMM() {
return birthdateMM;
}
public void setBirthdateMM(Integer birthdateMM) {
this.birthdateMM = birthdateMM;
}
public Integer getBirthdateDD() {
return birthdateDD;
}
public void setBirthdateDD(Integer birthdateDD) {
this.birthdateDD = birthdateDD;
}
>>>>>>>
public Integer getBirthdateYYYY() {
return birthdateYYYY;
}
public void setBirthdateYYYY(Integer birthdateYYYY) {
this.birthdateYYYY = birthdateYYYY;
}
public Integer getBirthdateMM() {
return birthdateMM;
}
public void setBirthdateMM(Integer birthdateMM) {
this.birthdateMM = birthdateMM;
}
public Integer getBirthdateDD() {
return birthdateDD;
}
public void setBirthdateDD(Integer birthdateDD) {
this.birthdateDD = birthdateDD;
}
public FacilityTypeGroup getFacilityTypeGroup() {
return facilityTypeGroup;
}
public void setFacilityTypeGroup(FacilityTypeGroup typeGroup) {
this.facilityTypeGroup = typeGroup;
}
public FacilityType getFacilityType() {
return facilityType;
}
public void setFacilityType(FacilityType type) {
this.facilityType = type;
} |
<<<<<<<
=======
import de.symeda.sormas.api.contact.ContactClassification;
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.contact.ContactExportDto;
import de.symeda.sormas.api.contact.ContactLogic;
import de.symeda.sormas.api.contact.ContactSimilarityCriteria;
import de.symeda.sormas.api.contact.ContactStatus;
import de.symeda.sormas.api.contact.MapContactDto;
import de.symeda.sormas.api.contact.SimilarContactDto;
import de.symeda.sormas.api.i18n.I18nProperties;
>>>>>>>
import de.symeda.sormas.api.contact.ContactClassification;
import de.symeda.sormas.api.contact.ContactDto;
import de.symeda.sormas.api.contact.ContactExportDto;
import de.symeda.sormas.api.contact.ContactLogic;
import de.symeda.sormas.api.contact.ContactSimilarityCriteria;
import de.symeda.sormas.api.contact.ContactStatus;
import de.symeda.sormas.api.contact.MapContactDto;
import de.symeda.sormas.api.contact.SimilarContactDto;
import de.symeda.sormas.api.i18n.I18nProperties; |
<<<<<<<
public EventParticipantService getEventParticipantService() {
return getBean(EventParticipantService.class);
}
=======
public ActionFacade getActionFacade() {
return getBean(ActionFacadeEjb.ActionFacadeEjbLocal.class);
}
>>>>>>>
public EventParticipantService getEventParticipantService() {
return getBean(EventParticipantService.class);
}
public ActionFacade getActionFacade() {
return getBean(ActionFacadeEjb.ActionFacadeEjbLocal.class);
} |
<<<<<<<
protected AbstractForm(Class<T> type, String propertyI18nPrefix, UserRight editOrCreateUserRight,
SormasFieldGroupFieldFactory fieldFactory, boolean addFields) {
=======
protected AbstractForm(Class<T> type, String propertyI18nPrefix) {
this(type, propertyI18nPrefix, true);
}
protected AbstractForm(Class<T> type, String propertyI18nPrefix, boolean addFields) {
>>>>>>>
protected AbstractForm(Class<T> type, String propertyI18nPrefix,
SormasFieldGroupFieldFactory fieldFactory, boolean addFields) {
<<<<<<<
fieldGroup.setFieldFactory(fieldFactory);
=======
fieldGroup.setFieldFactory(new SormasFieldGroupFieldFactory());
>>>>>>>
fieldGroup.setFieldFactory(fieldFactory); |
<<<<<<<
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, EventDocumentsComponent.DOCGENERATION_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, CASES_LINK_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, CONTACTS_LINK_LOC));
=======
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SUPERORDINATE_EVENT_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SUBORDINATE_EVENTS_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SHORTCUT_LINKS_LOC));
>>>>>>>
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, EventDocumentsComponent.DOCGENERATION_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SUPERORDINATE_EVENT_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SUBORDINATE_EVENTS_LOC),
LayoutUtil.fluidColumnLoc(4, 0, 6, 0, SHORTCUT_LINKS_LOC));
<<<<<<<
EventDocumentsComponent eventDocuments = new EventDocumentsComponent(getEventRef());
eventDocuments.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(eventDocuments, EventDocumentsComponent.DOCGENERATION_LOC);
=======
SuperordinateEventComponent superordinateEventComponent = new SuperordinateEventComponent(event, () -> editComponent.discard());
superordinateEventComponent.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(superordinateEventComponent, SUPERORDINATE_EVENT_LOC);
EventListComponent subordinateEventList = new EventListComponent(event.toReference());
subordinateEventList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(subordinateEventList, SUBORDINATE_EVENTS_LOC);
VerticalLayout shortcutLinksLayout = new VerticalLayout();
shortcutLinksLayout.setMargin(false);
shortcutLinksLayout.setSpacing(true);
>>>>>>>
EventDocumentsComponent eventDocuments = new EventDocumentsComponent(getEventRef());
eventDocuments.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(eventDocuments, EventDocumentsComponent.DOCGENERATION_LOC);
SuperordinateEventComponent superordinateEventComponent = new SuperordinateEventComponent(event, () -> editComponent.discard());
superordinateEventComponent.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(superordinateEventComponent, SUPERORDINATE_EVENT_LOC);
EventListComponent subordinateEventList = new EventListComponent(event.toReference());
subordinateEventList.addStyleName(CssStyles.SIDE_COMPONENT);
layout.addComponent(subordinateEventList, SUBORDINATE_EVENTS_LOC);
VerticalLayout shortcutLinksLayout = new VerticalLayout();
shortcutLinksLayout.setMargin(false);
shortcutLinksLayout.setSpacing(true); |
<<<<<<<
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_BIG;
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_DEFAULT;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
=======
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_BIG;
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_DEFAULT;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
>>>>>>>
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_BIG;
import static de.symeda.sormas.api.EntityDto.COLUMN_LENGTH_DEFAULT;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
<<<<<<<
public static final String SORMAS_TO_SORMAS_SHARES = "sormasToSormasShares";
=======
public static final String RETURNING_TRAVELER = "returningTraveler";
>>>>>>>
public static final String SORMAS_TO_SORMAS_SHARES = "sormasToSormasShares";
public static final String RETURNING_TRAVELER = "returningTraveler";
<<<<<<<
@ManyToOne(cascade = CascadeType.ALL)
@AuditedIgnore
public SormasToSormasOriginInfo getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}
public void setSormasToSormasOriginInfo(SormasToSormasOriginInfo originInfo) {
this.sormasToSormasOriginInfo = originInfo;
}
@OneToMany(mappedBy = SormasToSormasShareInfo.CONTACT, fetch = FetchType.LAZY)
public List<SormasToSormasShareInfo> getSormasToSormasShares() {
return sormasToSormasShares;
}
public void setSormasToSormasShares(List<SormasToSormasShareInfo> sormasToSormasShares) {
this.sormasToSormasShares = sormasToSormasShares;
}
=======
@Enumerated(EnumType.STRING)
public EndOfQuarantineReason getEndOfQuarantineReason() {
return endOfQuarantineReason;
}
public void setEndOfQuarantineReason(EndOfQuarantineReason endOfQuarantineReason) {
this.endOfQuarantineReason = endOfQuarantineReason;
}
@Column(length = COLUMN_LENGTH_DEFAULT)
public String getEndOfQuarantineReasonDetails() {
return endOfQuarantineReasonDetails;
}
public void setEndOfQuarantineReasonDetails(String endOfQuarantineReasonDetails) {
this.endOfQuarantineReasonDetails = endOfQuarantineReasonDetails;
}
@Enumerated(EnumType.STRING)
public YesNoUnknown getReturningTraveler() {
return returningTraveler;
}
public void setReturningTraveler(YesNoUnknown returningTraveler) {
this.returningTraveler = returningTraveler;
}
>>>>>>>
@ManyToOne(cascade = CascadeType.ALL)
@AuditedIgnore
public SormasToSormasOriginInfo getSormasToSormasOriginInfo() {
return sormasToSormasOriginInfo;
}
public void setSormasToSormasOriginInfo(SormasToSormasOriginInfo originInfo) {
this.sormasToSormasOriginInfo = originInfo;
}
@OneToMany(mappedBy = SormasToSormasShareInfo.CONTACT, fetch = FetchType.LAZY)
public List<SormasToSormasShareInfo> getSormasToSormasShares() {
return sormasToSormasShares;
}
public void setSormasToSormasShares(List<SormasToSormasShareInfo> sormasToSormasShares) {
this.sormasToSormasShares = sormasToSormasShares;
}
@Enumerated(EnumType.STRING)
public EndOfQuarantineReason getEndOfQuarantineReason() {
return endOfQuarantineReason;
}
public void setEndOfQuarantineReason(EndOfQuarantineReason endOfQuarantineReason) {
this.endOfQuarantineReason = endOfQuarantineReason;
}
@Column(length = COLUMN_LENGTH_DEFAULT)
public String getEndOfQuarantineReasonDetails() {
return endOfQuarantineReasonDetails;
}
public void setEndOfQuarantineReasonDetails(String endOfQuarantineReasonDetails) {
this.endOfQuarantineReasonDetails = endOfQuarantineReasonDetails;
}
@Enumerated(EnumType.STRING)
public YesNoUnknown getReturningTraveler() {
return returningTraveler;
}
public void setReturningTraveler(YesNoUnknown returningTraveler) {
this.returningTraveler = returningTraveler;
} |
<<<<<<<
@Diseases({Disease.NEW_INFLUENCA, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
=======
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.UNDEFINED, Disease.OTHER})
>>>>>>>
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
<<<<<<<
@Diseases({Disease.NEW_INFLUENCA, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
=======
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.UNDEFINED, Disease.OTHER})
>>>>>>>
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
<<<<<<<
@Diseases({Disease.NEW_INFLUENCA, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
=======
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.UNDEFINED, Disease.OTHER})
>>>>>>>
@Diseases({Disease.NEW_INFLUENCA, Disease.RABIES, Disease.ANTHRAX, Disease.UNDEFINED, Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX, Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA, Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.UNSPECIFIED_VHF, Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.UNSPECIFIED_VHF, Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA, Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown rabbits;
@Diseases({Disease.EVD,Disease.LASSA,Disease.UNSPECIFIED_VHF, Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown rabbits;
@Diseases({Disease.EVD,Disease.LASSA,Disease.UNSPECIFIED_VHF, Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX, Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown dogs;
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown cats;
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown canidae;
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown dogs;
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown cats;
@Diseases({Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
private YesNoUnknown canidae;
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER})
<<<<<<<
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX, Disease.ANTHRAX,Disease.UNSPECIFIED_VHF,Disease.UNDEFINED,Disease.OTHER})
=======
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES,Disease.UNDEFINED,Disease.OTHER})
>>>>>>>
@Diseases({Disease.EVD,Disease.LASSA,Disease.MONKEYPOX,Disease.UNSPECIFIED_VHF, Disease.RABIES, Disease.ANTHRAX,Disease.UNDEFINED,Disease.OTHER}) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.