instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public at.erpel.schemas._1p0.documents.extensions.edifact.DeliveryDetailsExtensionType getDeliveryDetailsExtension() {
return deliveryDetailsExtension;
}
/**
* Sets the value of the deliveryDetailsExtension property.
*
* @param value
* allowed object is
* {@link at.erp... | *
*/
public CustomType getErpelDeliveryDetailsExtension() {
return erpelDeliveryDetailsExtension;
}
/**
* Sets the value of the erpelDeliveryDetailsExtension property.
*
* @param value
* allowed object is
* {@link CustomType }
*
*/
publ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\DeliveryDetailsExtensionType.java | 2 |
请完成以下Java代码 | private static String normalizeSingleArgumentBeforeFormat_Iterable(
@NonNull final Iterable<Object> iterable,
final String adLanguage)
{
final StringBuilder result = new StringBuilder();
for (final Object item : iterable)
{
String itemNormStr;
try
{
final Object itemNormObj = normalizeSingleA... | s_log.warn("Failed normalizing argument `{}`. Using toString().", item, ex);
itemNormStr = item.toString();
}
if (!(result.length() == 0))
{
result.append(", ");
}
result.append(itemNormStr);
}
return result.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\MessageFormatter.java | 1 |
请完成以下Java代码 | public void setBeanClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
@Override
public void afterPropertiesSet() {
this.registered = register();
}
@Override
public void destroy() throws Exception {
unregister(this.registered);
}
private Collection<ObjectName> register() {
return... | private void unregister(Collection<ObjectName> objectNames) {
objectNames.forEach(this::unregister);
}
private void unregister(ObjectName objectName) {
try {
if (logger.isDebugEnabled()) {
logger.debug("Unregister endpoint with ObjectName '" + objectName + "' from the JMX domain");
}
this.mBeanServe... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\jmx\JmxEndpointExporter.java | 1 |
请完成以下Java代码 | public Object remove(Object key) {
if (UNSTORED_KEYS.contains(key)) {
return null;
}
return wrappedBindings.remove(key);
}
public void clear() {
wrappedBindings.clear();
}
public boolean containsValue(Object value) {
return calculateBindingMap().containsValue(value);
}
public bo... | protected Map<String, Object> calculateBindingMap() {
Map<String, Object> bindingMap = new HashMap<String, Object>();
for (Resolver resolver : scriptResolvers) {
for (String key : resolver.keySet()) {
bindingMap.put(key, resolver.get(key));
}
}
Set<java.util.Map.Entry<String, Obje... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\scripting\engine\ScriptBindings.java | 1 |
请完成以下Java代码 | public class InvalidIdentifierException extends AdempiereException
{
public InvalidIdentifierException(final IdentifierString invalidIdentifier)
{
this(invalidIdentifier != null ? invalidIdentifier.toJson() : null,
null,
null);
}
public InvalidIdentifierException(@Nullable final String invalidIdentifierS... | {
this(invalidIdentifierString, objectWithInvalidIdentifier, null);
}
public InvalidIdentifierException(
@Nullable final String invalidIdentifierString,
@Nullable final Object objectWithInvalidIdentifier,
@Nullable final Throwable cause)
{
super("Unable to interpret identifierString=" + invalidIdentifi... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\exception\InvalidIdentifierException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_Order
{
private final OrderAvailableToPromiseTool orderAvailableToPromiseTool;
public C_Order(
@NonNull final AvailableToPromiseRepository stockRepository,
@NonNull final ModelProductDescriptorExtractor productDescriptorFactory)
{
orderAvailableToPromiseTool = OrderAvailableToPromiseTool.buil... | public void resetQtyAvailableToPromise(final I_C_Order orderRecord)
{
if (!orderRecord.isSOTrx())
{
return; // as of now, ATP values are only of interest for the sales side
}
orderAvailableToPromiseTool.resetQtyAvailableToPromise(orderRecord);
}
@ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE, i... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\interceptor\C_Order.java | 2 |
请完成以下Java代码 | public void updateDocActions(final DocActionOptionsContext optionsCtx)
{
final IDocActionOptionsCustomizer customizers = getDocActionOptionsCustomizers(optionsCtx.getTableName());
customizers.customizeValidActions(optionsCtx);
//
// Apply role access
final DocTypeId docTypeId = optionsCtx.getDocTypeId();
... | {
final IDocActionOptionsCustomizer tableSpecificCustomizer = _docActionOptionsCustomizerByTableName.get().get(contextTableName);
if (tableSpecificCustomizer != null)
{
customizers.add(tableSpecificCustomizer);
}
}
return CompositeDocActionOptionsCustomizer.ofList(customizers);
}
private static ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\engine\impl\DocActionOptionsBL.java | 1 |
请完成以下Java代码 | public void setCM_Template_ID (int CM_Template_ID)
{
if (CM_Template_ID < 1)
set_ValueNoCheck (COLUMNNAME_CM_Template_ID, null);
else
set_ValueNoCheck (COLUMNNAME_CM_Template_ID, Integer.valueOf(CM_Template_ID));
}
/** Get Template.
@return Template defines how content is displayed
*/
public int g... | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Other SQL Clause.
@param OtherClause
Other SQL Clause
*/
public void setOtherClause (String OtherClause)
{
set_Value (C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_TemplateTable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserDetails loadUserByUsername(final String username) throws UsernameNotFoundException {
logger.info("Load user by username " + username);
final UserDetails user = availableUsers.get(username);
if (user == null) {
throw new UsernameNotFoundException(username);
}
... | private void populateDemoUsers() {
logger.info("Populate demo users");
availableUsers.put("user", createUser("user", "password", Arrays.asList(SecurityRole.ROLE_USER)));
availableUsers.put("admin", createUser("admin", "password", Arrays.asList(SecurityRole.ROLE_ADMIN)));
}
private User... | repos\tutorials-master\spring-security-modules\spring-security-web-persistent-login\src\main\java\com\baeldung\service\MyUserDetailsService.java | 2 |
请完成以下Java代码 | public class LUIdsAndTopLevelTUIdsCollector
{
private final HashSet<HuId> allTopLevelHUIds = new HashSet<>();
private final HashSet<HuId> luIds = new HashSet<>();
private final HashSet<HuId> topLevelTUIds = new HashSet<>();
public void addLUId(@NonNull final HuId luId)
{
allTopLevelHUIds.add(luId);
luIds.add(... | return allTopLevelHUIds.isEmpty();
}
public ImmutableSet<HuId> getAllTopLevelHUIds()
{
return ImmutableSet.copyOf(allTopLevelHUIds);
}
public ImmutableSet<HuId> getLUIds()
{
return ImmutableSet.copyOf(luIds);
}
public ImmutableSet<HuId> getTopLevelTUIds()
{
return ImmutableSet.copyOf(topLevelTUIds);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\LUIdsAndTopLevelTUIdsCollector.java | 1 |
请完成以下Java代码 | public int getSupervisor_ID()
{
return get_ValueAsInt(COLUMNNAME_Supervisor_ID);
}
@Override
public void setTimestamp (final @Nullable java.sql.Timestamp Timestamp)
{
throw new IllegalArgumentException ("Timestamp is virtual column"); }
@Override
public java.sql.Timestamp getTimestamp()
{
return get_V... | set_Value (COLUMNNAME_UserPIN, UserPIN);
}
@Override
public java.lang.String getUserPIN()
{
return get_ValueAsString(COLUMNNAME_UserPIN);
}
@Override
public void setValue (final @Nullable java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User.java | 1 |
请完成以下Java代码 | public void setId(Long id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(Long timestamp) {
t... | public void setCreator(Player creator) {
this.creator = creator;
addPlayer(creator);
}
public void addPlayer(Player player) {
this.players.add(player);
}
public List<Player> getPlayers() {
return Collections.unmodifiableList(this.players);
}
public GameSettings... | repos\tutorials-master\libraries-data\src\main\java\com\baeldung\modelmapper\domain\Game.java | 1 |
请完成以下Java代码 | default HUPackingAwareCopy prepareCopyFrom(final IHUPackingAware from)
{
return HUPackingAwareCopy.from(from);
}
/**
* Copies all fields from one {@link IHUPackingAware} to another.
*/
default void copy(final IHUPackingAware to, final IHUPackingAware from)
{
prepareCopyFrom(from).copyTo(to);
}
/**
* ... | /**
* This method verifies if the qtyCU given as parameter fits the qtyPacks. If it does, the record will not be updated.
* In case the QtyCU is too big or too small to fit in the QtyPacks, it will be changed to the maximum capacity required by the QtyPacks and the M_HU_PI_Item_Product of the record
*/
void upda... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\IHUPackingAwareBL.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setDay(int value) {
this.day = value;
}
/**
* Gets the value of the fromTime1 property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getFromTime1() {
return fromTime1;
}
/**
* Sets the valu... | *
*/
public void setToTime2(Integer value) {
this.toTime2 = value;
}
/**
* Gets the value of the extraPickup property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isExtraPickup() {
return extraPickup;... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Pickup.java | 2 |
请完成以下Java代码 | public String getActionName()
{
return ACTION_Name;
}
public boolean isEnabled()
{
final Properties ctx = Env.getCtx();
final UserId loggedUserId = Env.getLoggedUserId(ctx);
return userId2enabled.getOrLoad(loggedUserId, this::retrieveEnabledNoFail);
}
private boolean retrieveEnabledNoFail(final UserId l... | }
public void save(final GridTab gridTab)
{
Services.get(ITrxManager.class).runInNewTrx(() -> save0(gridTab));
}
private void save0(final GridTab gridTab)
{
Check.assumeNotNull(gridTab, "gridTab not null");
for (final GridField gridField : gridTab.getFields())
{
save(gridField);
}
}
private void ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\AWindowSaveStateModel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
... | }
public void setPassWord(String passWord) {
this.passWord = passWord;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", userName='" + userName + '\'' +
", pass... | repos\spring-boot-leaning-master\2.x_42_courses\第 4-7 课:Spring Boot 简单集成 MongoDB\spring-boot-mongodb-repository\src\main\java\com\neo\model\User.java | 2 |
请完成以下Java代码 | default LookupDataSourceContext.Builder newContextForFetchingByIds(@NonNull final Collection<?> ids)
{
return newContextForFetchingById(null)
.putFilterById(IdsToFilter.ofMultipleValues(ids));
}
default LookupValuesList retrieveLookupValueByIdsInOrder(@NonNull final LookupDataSourceContext evalCtx)
{
retur... | boolean isCached();
/** @return cache prefix; relevant only if {@link #isCached()} returns <code>false</code> */
@Nullable String getCachePrefix();
default List<CCacheStats> getCacheStats() { return ImmutableList.of(); }
//@formatter:on
/**
* @return tableName if available
*/
Optional<String> getLookupTableN... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LookupDataSourceFetcher.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public R<IPage<Notice>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport... | @ApiOperationSupport(order = 5)
@Operation(summary = "新增或修改", description = "传入notice")
public R submit(@RequestBody Notice notice) {
return R.status(noticeService.saveOrUpdate(notice));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 6)
@Operation(summary = "逻辑删除", description = "传入not... | repos\SpringBlade-master\blade-service\blade-demo\src\main\java\com\example\demo\controller\NoticeController.java | 2 |
请完成以下Java代码 | public int size() {
return delegate.size();
}
};
}
private class DecoratingEntryIterator implements Iterator<Entry<String, Object>> {
private final Iterator<Entry<String, Object>> delegate;
DecoratingEntryIterator(Iterator<Entry<String, Object>> delegate) {
... | DecoratingEntryValueIterator(Iterator<Entry<String, Object>> entryIterator) {
this.entryIterator = entryIterator;
}
@Override
public boolean hasNext() {
return entryIterator.hasNext();
}
@Override
public Object next() {
Entry<String, ... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\EncryptableMapWrapper.java | 1 |
请完成以下Java代码 | public static SysConfigUIDefaultsRepository ofCurrentLookAndFeelId()
{
final String lookAndFeelId = UIManager.getLookAndFeel().getID();
return new SysConfigUIDefaultsRepository(lookAndFeelId);
}
// services
private static final transient Logger logger = LogManager.getLogger(SysConfigUIDefaultsRepository.class... | public void loadAllFromSysConfigTo(final UIDefaults uiDefaults)
{
if (!DB.isConnected())
{
return;
}
final String prefix = createSysConfigPrefix() + ".";
final boolean removePrefix = true;
final Properties ctx = Env.getCtx();
final ClientAndOrgId clientAndOrgId = ClientAndOrgId.ofClientAndOrg(Env.get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\SysConfigUIDefaultsRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractProcessEngineConfiguration {
public ProcessEngineFactoryBean springProcessEngineBean(SpringProcessEngineConfiguration configuration) {
ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
processEngineFactoryBean.setProcessEngineConfigura... | }
public HistoryService historyServiceBean(ProcessEngine processEngine) {
return processEngine.getHistoryService();
}
public ManagementService managementServiceBeanBean(ProcessEngine processEngine) {
return processEngine.getManagementService();
}
public IntegrationContextManager i... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AbstractProcessEngineConfiguration.java | 2 |
请完成以下Java代码 | public int getUnitsPerPallet()
{
return get_ValueAsInt(COLUMNNAME_UnitsPerPallet);
}
@Override
public void setUOM_MultiplierRate (final @Nullable BigDecimal UOM_MultiplierRate)
{
set_Value (COLUMNNAME_UOM_MultiplierRate, UOM_MultiplierRate);
}
@Override
public BigDecimal getUOM_MultiplierRate()
{
fin... | public BigDecimal getVolume()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setWeight (final @Nullable BigDecimal Weight)
{
set_Value (COLUMNNAME_Weight, Weight);
}
@Override
public BigDecimal getWeight()
{
final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Product.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setBankFee(BigDecimal bankFee) {
this.bankFee = bankFee;
}
public String getErrType() {
return errType;
}
public void setErrType(String errType) {
this.errType = errType == null ? null : errType.trim();
}
public String getHandleStatus() {
return handleStatus;
}
public void setHandleStatu... | public void setHandleRemark(String handleRemark) {
this.handleRemark = handleRemark == null ? null : handleRemark.trim();
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName == null ? null : operatorName.trim();
}
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistake.java | 2 |
请完成以下Java代码 | public void setPointsSum_Invoiceable (final BigDecimal PointsSum_Invoiceable)
{
set_ValueNoCheck (COLUMNNAME_PointsSum_Invoiceable, PointsSum_Invoiceable);
}
@Override
public BigDecimal getPointsSum_Invoiceable()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PointsSum_Invoiceable);
return bd != ... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PointsSum_Settled);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setPointsSum_ToSettle (final BigDecimal PointsSum_ToSettle)
{
set_Value (COLUMNNAME_PointsSum_ToSettle, PointsSum_ToSettle);
}
@Override
public BigDecimal getPoin... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Commission_Share.java | 1 |
请完成以下Java代码 | public AnnotatedTableFactory setModel(final TableModel model)
{
this.model = model;
return this;
}
/**
* @param selectionMode
* @see ListSelectionModel#setSelectionMode(int)
*/
public AnnotatedTableFactory setSelectionMode(final int selectionMode)
{
this.selectionMode = selectionMode;
return this;
... | * NOTE to developer: you can easily implement table popup actions by extending {@link AnnotatedTableAction}.
*
* @param action
* @return this
*/
public AnnotatedTableFactory addPopupAction(final Action action)
{
Check.assumeNotNull(action, "action not null");
if (!popupActions.contains(action))
{
po... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTableFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getModeOfDispatch() {
return modeOfDispatch;
}
/**
* Sets the value of the modeOfDispatch property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setModeOfDispatch(String value) {
this.modeOfDispatch = ... | }
/**
* The license plate number of the vehicle performing the delivery.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTransportVehicleLicenseNumber() {
return transportVehicleLicenseNumber;
}
/**
* Sets the value... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DeliveryDetailsType.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setDescription (final @Nullable java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescrip... | set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID);
}
@Override
public int getExternalSystem_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSystem_ID);
}
@Override
public void setExternalSystem_Service_ID (final int ExternalSystem_Service_ID)
{
if (ExternalSystem_Service_ID < 1)
set_ValueNo... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Service.java | 1 |
请完成以下Java代码 | public Optional<DocSequenceId> getSerialNoSequenceId(@NonNull final PPOrderId ppOrderId)
{
final I_PP_Order_BOM orderBOM = orderBOMsRepo.getByOrderIdOrNull(ppOrderId);
if (orderBOM == null)
{
throw new AdempiereException("@NotFound@ @PP_Order_BOM_ID@: " + ppOrderId);
}
return DocSequenceId.optionalOfRepoI... | .filter(bomLine -> BOMComponentType.ofNullableCodeOrComponent(bomLine.getComponentType()).isIssue())
.map(bomLine -> ProductId.ofRepoId(bomLine.getM_Product_ID()))
.collect(ImmutableSet.toImmutableSet());
}
@Override
public ImmutableSet<WarehouseId> getIssueFromWarehouseIds(@NonNull final I_PP_Order ppOrder... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\impl\PPOrderBOMBL.java | 1 |
请完成以下Java代码 | public static <BT, T extends BT> void registerJUnitBeans(@NonNull final Class<BT> beanType, @NonNull final List<T> beansToAdd)
{
instance.junitRegisteredBeans.registerJUnitBeans(beanType, beansToAdd);
}
public static <T> Lazy<T> lazyBean(@NonNull final Class<T> requiredType)
{
return new Lazy<>(requiredType, n... | //
@ToString
public static final class Lazy<T>
{
private final Class<T> requiredType;
private T bean;
private Lazy(@NonNull final Class<T> requiredType, @Nullable final T initialBean)
{
this.requiredType = requiredType;
this.bean = initialBean;
}
@NonNull
public T get()
{
T bean = this.be... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\SpringContextHolder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public User get(@PathVariable Long id) {
log.info("获取用户id为 " + id + "的信息");
return new User(id, "mrbird", "123456");
}
@GetMapping
public List<User> get() {
List<User> list = new ArrayList<>();
list.add(new User(1L, "mrbird", "123456"));
list.add(new User(2L, "scott"... | public void add(@RequestBody User user) {
log.info("新增用户成功 " + user);
}
@PutMapping
public void update(@RequestBody User user) {
log.info("更新用户成功 " + user);
}
@DeleteMapping("/{id:\\d+}")
public void delete(@PathVariable Long id) {
log.info("删除用户成功 " + id);
}
} | repos\SpringAll-master\29.Spring-Cloud-Ribbon-LoadBalance\Eureka-Client\src\main\java\com\example\demo\controller\UserController.java | 2 |
请完成以下Java代码 | public boolean isGraphicalNotationDefined() {
return isGraphicalNotationDefined;
}
public boolean hasGraphicalNotation() {
return isGraphicalNotationDefined;
}
public void setGraphicalNotationDefined(boolean isGraphicalNotationDefined) {
this.isGraphicalNotationDefined = isGrap... | return ioSpecification;
}
public void setIoSpecification(IOSpecification ioSpecification) {
this.ioSpecification = ioSpecification;
}
public String toString() {
return "ProcessDefinitionEntity[" + id + "]";
}
public void setAppVersion(Integer appVersion) {
this.appVers... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java | 1 |
请完成以下Java代码 | public class User {
private Long userId;
private String userName;
private Integer userAge;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserName() { | return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Integer getUserAge() {
return userAge;
}
public void setUserAge(Integer userAge) {
this.userAge = userAge;
}
} | repos\Spring-Boot-In-Action-master\springbt_ehcache\src\main\java\cn\codesheep\springbt_ehcache\entity\User.java | 1 |
请完成以下Java代码 | public SqlLookupDescriptorFactory setCtxTableName(@Nullable final String ctxTableName)
{
this.ctxTableName = ctxTableName;
this.filtersBuilder.setCtxTableName(ctxTableName);
return this;
}
public SqlLookupDescriptorFactory setDisplayType(final ReferenceId displayType)
{
this.displayType = displayType;
th... | * Advice the lookup to show all records on which current user has at least read only access
*/
public SqlLookupDescriptorFactory setReadOnlyAccess()
{
this.requiredAccess = Access.READ;
return this;
}
private Access getRequiredAccess(@NonNull final TableName tableName)
{
if (requiredAccess != null)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlLookupDescriptorFactory.java | 1 |
请完成以下Java代码 | public class CafeAddress extends WebPage {
private String selectedCafe;
private Address address;
private Map<String, Address> cafeNamesAndAddresses = new HashMap<>();
public CafeAddress(final PageParameters parameters) {
super(parameters);
initCafes();
ArrayList<String> cafeNam... | }
private void initCafes() {
this.cafeNamesAndAddresses.put("Linda's Cafe", new Address("35 Bower St."));
this.cafeNamesAndAddresses.put("Old Tree", new Address("2 Edgware Rd."));
}
class Address implements Serializable {
private String sAddress = "";
public Address(String... | repos\tutorials-master\web-modules\wicket\src\main\java\com\baeldung\wicket\examples\cafeaddress\CafeAddress.java | 1 |
请完成以下Java代码 | public class CookieStoreCleanupTrigger extends AbstractEventHandler<InstanceDeregisteredEvent> {
private final PerInstanceCookieStore cookieStore;
/**
* Creates a trigger to cleanup the cookie store on deregistering of an
* {@link de.codecentric.boot.admin.server.domain.entities.Instance}.
* @param publisher ... | this.cookieStore = cookieStore;
}
@Override
protected Publisher<Void> handle(final Flux<InstanceDeregisteredEvent> publisher) {
return publisher.flatMap((event) -> {
cleanupCookieStore(event);
return Mono.empty();
});
}
private void cleanupCookieStore(final InstanceDeregisteredEvent event) {
cookieSt... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\client\cookies\CookieStoreCleanupTrigger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String createOrder(String outTradeNo, String totalAmount, String subject) throws AlipayApiException {
AlipayClient alipayClient = new DefaultAlipayClient(alipayConfig.getGatewayUrl(), alipayConfig.getAppId(), alipayConfig.getMerchantPrivateKey(), "json", "UTF-8", alipayConfig.getAlipayPublicKey(), "RSA2"... | AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();
request.setBizContent("{\"out_trade_no\":\"" + outTradeNo + "\"}");
try {
AlipayTradeQueryResponse response = alipayClient.execute(request);
if (response.isSuccess()) {
return response.getTradeStatu... | repos\springboot-demo-master\Alipay-facetoface\src\main\java\com\et\service\AlipayService.java | 2 |
请完成以下Java代码 | public void setPriceStd (BigDecimal PriceStd)
{
set_Value (COLUMNNAME_PriceStd, PriceStd);
}
/** Get Standard Price.
@return Standard Price
*/
public BigDecimal getPriceStd ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceStd);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set P... | @param ProductValue
Key of the Product
*/
public void setProductValue (String ProductValue)
{
set_Value (COLUMNNAME_ProductValue, ProductValue);
}
/** Get Product Key.
@return Key of the Product
*/
public String getProductValue ()
{
return (String)get_Value(COLUMNNAME_ProductValue);
}
/** Set ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_PriceList.java | 1 |
请完成以下Java代码 | public ClientSetup setIBAN(final String iban)
{
if (!Check.isEmpty(iban, true))
{
orgBankAccount.setIBAN(iban.trim());
}
return this;
}
public ClientSetup setC_Bank_ID(final int bankId)
{
if (bankId > 0)
{
orgBankAccount.setC_Bank_ID(bankId);
}
return this;
}
public final int getC_Bank_ID(... | {
return orgContact.getFax();
}
public ClientSetup setEMail(final String email)
{
if (!Check.isEmpty(email, true))
{
// NOTE: we are not setting the Phone, Fax, EMail on C_BPartner_Location because those fields are hidden in BPartner window
orgContact.setEMail(email.trim());
}
return this;
}
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\setup\process\ClientSetup.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public String getAssigneeId() {
return assigneeId;
}
public void setAssigneeId(String assigneeId) {
this.assigneeId = assigneeId;
}
public List<String> getGroups() {
return groups;
}
public void setGroups(List<Strin... | public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
public String getParentTaskId() {
return parentTaskId;
}
public void setParentTaskId(String par... | repos\Activiti-develop\activiti-api\activiti-api-task-model\src\main\java\org\activiti\api\task\model\payloads\GetTasksPayload.java | 1 |
请完成以下Java代码 | public IInvoiceCandInvalidUpdater setRecomputeTagToUse(final InvoiceCandRecomputeTag tag)
{
assertNotExecuted();
icTagger.setRecomputeTag(tag);
return this;
}
@Override
public IInvoiceCandInvalidUpdater setOnlyInvoiceCandidateIds(@NonNull final InvoiceCandidateIdsSelection onlyInvoiceCandidateIds)
{
asser... | {
return getSummary();
}
public String getSummary()
{
return "Updated " + countOk + " invoice candidates, " + countErrors + " errors";
}
}
/**
* IC update exception handler
*/
private final class ICTrxItemExceptionHandler extends FailTrxItemExceptionHandler
{
private final ICUpdateResult resul... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandInvalidUpdater.java | 1 |
请完成以下Java代码 | public LwM2m.Version getSupportedObjectVersion(Integer objectid) {
return this.supportedClientObjects != null ? this.supportedClientObjects.get(objectid) : null;
}
private void setSupportedClientObjects(){
if (this.registration.getSupportedObject() != null && this.registration.getSupportedObjec... | this.supportedClientObjects.put(objectId, versionParamValue.getValue());
} else {
// there is no version attribute attached.
// In this case we use the DEFAULT_VERSION only if this object stored as supported object.
... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\client\LwM2mClient.java | 1 |
请完成以下Java代码 | public void setEntityType (java.lang.String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entitäts-Art.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
@Override
public java.lang.String getEntityType ()
{
return (java.lang.String)get_Value(COLUMNNAM... | /** Set jsp-URL.
@param JSPURL
Web URL of the jsp function
*/
@Override
public void setJSPURL (java.lang.String JSPURL)
{
set_Value (COLUMNNAME_JSPURL, JSPURL);
}
/** Get jsp-URL.
@return Web URL of the jsp function
*/
@Override
public java.lang.String getJSPURL ()
{
return (java.lang.String)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Form.java | 1 |
请完成以下Java代码 | public ClientSoftwareId getClientSoftwareIdFromClientRequest(final Object soapRequestObj)
{
final BestellstatusAbfragen soapRequest = castToRequestFromClient(soapRequestObj);
return ClientSoftwareId.of(soapRequest.getClientSoftwareKennung());
}
private static BestellstatusAbfragen castToRequestFromClient(final ... | private JAXBElement<BestellstatusAbfragenResponse> toJAXB(final OrderStatusResponse response)
{
final BestellstatusAntwort soapResponseContent = jaxbObjectFactory.createBestellstatusAntwort();
soapResponseContent.setId(response.getOrderId().getValueAsString());
soapResponseContent.setBestellSupportId(response.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\v1\OrderStatusJAXBConvertersV1.java | 1 |
请完成以下Java代码 | public void setUserCodeGenerator(OAuth2TokenGenerator<OAuth2UserCode> userCodeGenerator) {
Assert.notNull(userCodeGenerator, "userCodeGenerator cannot be null");
this.userCodeGenerator = userCodeGenerator;
}
private static void throwError(String errorCode, String parameterName) {
OAuth2Error error = new OAuth2... | byte[] bytes = this.keyGenerator.generateKey();
StringBuilder sb = new StringBuilder();
for (byte b : bytes) {
int offset = Math.abs(b % 20);
sb.append(VALID_CHARS[offset]);
}
sb.insert(4, '-');
return sb.toString();
}
}
private static final class OAuth2UserCodeGenerator implements OAuth2To... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2DeviceAuthorizationRequestAuthenticationProvider.java | 1 |
请完成以下Java代码 | public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
} | public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getNum() {
return num;
}
public void setNum(String num) {
this.num = num;
}
} | repos\spring-boot-quick-master\quick-swagger\src\main\java\com\quick\po\Address.java | 1 |
请完成以下Java代码 | public String toString()
{
return ObjectUtils.toString(this);
}
@Override
public String getId()
{
return id;
}
@Override
public String getDisplayName()
{
return displayName;
}
@Override
public IQueryFilter<ModelType> getFilter()
{
return filter;
}
@Override
public IFacetCategory getFacetCate... | super();
}
public Facet<ModelType> build()
{
return new Facet<>(this);
}
public Builder<ModelType> setId(final String id)
{
this.id = id;
return this;
}
public Builder<ModelType> setDisplayName(final String displayName)
{
this.displayName = displayName;
return this;
}
public Bui... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\impl\Facet.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected String doIt()
{
final Quantity qtyToReserve = getQtyToReserveParam();
final ImmutableSet<HuId> huIds = getSelectedTopLevelHUIds();
final ServiceRepairProjectTaskId taskId = getTaskId();
projectService.reserveSparePartsFromHUs(taskId, qtyToReserve, huIds);
tasksCache.clear();
return MSG_OK;
}
... | final HUsToIssueViewContext husToIssueViewContext = getHusToIssueViewContext();
return husToIssueViewContext.getTaskId();
}
private ImmutableSet<HuId> getSelectedTopLevelHUIds()
{
return streamSelectedHUIds(HUEditorRowFilter.Select.ONLY_TOPLEVEL).collect(ImmutableSet.toImmutableSet());
}
private HUsToIssueVi... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\HUsToIssueView_IssueHUs.java | 2 |
请完成以下Java代码 | public String getHostname() throws UnknownHostException {
return InetAddress.getLocalHost().getHostName();
}
public String getBaseUrl() {
return urlResolver.getBaseUrl();
}
protected String getWorkerId() {
return workerId;
}
protected List<ClientRequestInterceptor> getInterceptors() {
ret... | return dateFormat;
}
public ObjectMapper getObjectMapper() {
return objectMapper;
}
public ValueMappers getValueMappers() {
return valueMappers;
}
public TypedValues getTypedValues() {
return typedValues;
}
public EngineClient getEngineClient() {
return engineClient;
}
} | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\ExternalTaskClientBuilderImpl.java | 1 |
请完成以下Java代码 | public class ProjectManifest {
private String createdBy;
private String creationDate;
private String lastModifiedBy;
private String lastModifiedDate;
private String id;
private String name;
private String description;
private String version;
public String getCreatedBy() {
... | return lastModifiedDate;
}
public void setLastModifiedDate(String lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;... | repos\Activiti-develop\activiti-core-common\activiti-project-model\src\main\java\org\activiti\core\common\project\model\ProjectManifest.java | 1 |
请完成以下Java代码 | private PrintOptions createPrintOptions(
@NonNull final DpdOrderCustomDeliveryData customDeliveryData)
{
final PrintOptions printOptions = shipmentServiceOF.createPrintOptions();
printOptions.setPaperFormat(customDeliveryData.getPaperFormat().getCode());
printOptions.setPrinterLanguage(customDeliveryData.getP... | epicLogger.addLog("Finished login Request");
return login;
}
/**
* no idea what this does, but tobias sais it's useful to have this special log, so here it is!
*/
@NonNull
private ILoggable getEpicLogger()
{
return Loggables.withLogger(logger, Level.TRACE);
}
@Override
public @NonNull JsonDeliveryAdv... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java\de\metas\shipper\gateway\dpd\DpdShipperGatewayClient.java | 1 |
请完成以下Java代码 | protected int[] extractFeature(String[] wordArray, String[] posArray, FeatureMap featureMap, int position)
{
StringBuilder sbFeature = new StringBuilder();
List<Integer> featureVec = new LinkedList<Integer>();
for (int i = 0; i < featureTemplateArray.length; i... | {
return "# Unigram\n" +
// form
"U0:%x[-2,0]\n" +
"U1:%x[-1,0]\n" +
"U2:%x[0,0]\n" +
"U3:%x[1,0]\n" +
"U4:%x[2,0]\n" +
// pos
"U5:%x[-2,1]\n" +
"U6:%x[-1,1]\n" +
"U7:%x[0,1]\n" +
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\CRFNERecognizer.java | 1 |
请完成以下Java代码 | public void setValues(ValuedDataObject otherElement) {
super.setValues(otherElement);
if (otherElement.getValue() != null) {
setValue(otherElement.getValue());
}
}
public String getType() {
String structureRef = itemSubjectRef.getStructureRef();
return struct... | return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ValuedDataObject otherObject = (ValuedDataObject) o;
if (!otherObject.getItemSubjectRef().getStructureRef().equals(this.itemSubjectRef.getStructureRef())) {
return false;
... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\ValuedDataObject.java | 1 |
请完成以下Java代码 | public static ListenableFuture<Long> factorialUsingGuavaServiceSubmit(int number) {
ListeningExecutorService service = MoreExecutors.listeningDecorator(threadpool);
ListenableFuture<Long> factorialFuture = (ListenableFuture<Long>) service.submit(()-> factorial(number));
return factorialFuture;
... | return Futures.submitAsync(asyncCallable, service);
}
/**
* Finds factorial of a number using @Async of jcabi-aspects
* @param number
* @return
*/
@Async
@Loggable
public static Future<Long> factorialUsingJcabiAspect(int number) {
Future<Long> factorialFuture = Completab... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced\src\main\java\com\baeldung\async\JavaAsync.java | 1 |
请完成以下Java代码 | public String toEdit(Model model,Long id) {
User user=userRepository.findById(id);
model.addAttribute("user", user);
return "user/userEdit";
}
@RequestMapping("/edit")
public String edit(@Valid UserParam userParam, BindingResult result,ModelMap model) {
String errorMsg="";
... | }
User user=new User();
BeanUtils.copyProperties(userParam,user);
user.setRegTime(new Date());
userRepository.save(user);
return "redirect:/list";
}
@RequestMapping("/delete")
public String delete(Long id) {
userRepository.delete(id);
return "redirec... | repos\spring-boot-leaning-master\1.x\第06课:Jpa 和 Thymeleaf 实践\spring-boot-jpa-thymeleaf\src\main\java\com\neo\web\UserController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class BackoffConfig {
private Duration firstBackoff = Duration.ofMillis(5);
private @Nullable Duration maxBackoff;
private int factor = 2;
private boolean basedOnPreviousValue = true;
public BackoffConfig() {
}
public BackoffConfig(Duration firstBackoff, Duration maxBackoff, int factor... | .append("basedOnPreviousValue", basedOnPreviousValue)
.toString();
}
}
public static class JitterConfig {
private double randomFactor = 0.5;
public void validate() {
Assert.isTrue(randomFactor >= 0 && randomFactor <= 1,
"random factor must be between 0 and 1 (default 0.5)");
}
public Jitter... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RetryGatewayFilterFactory.java | 2 |
请完成以下Java代码 | public class MyRepoJdbc extends BaseRepo {
static {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
private HikariDataSource ds;
private SplittableRandom random = new SplittableRand... | } finally {
ds.close();
}
}
private void runSql(AtomicLong count, Boolean autoCommit, Boolean readOnly) {
if (Thread.interrupted()) {
return;
}
try (Connection connect = getConnection(); PreparedStatement statement = connect.prepareStatement("select * fr... | repos\tutorials-master\persistence-modules\read-only-transactions\src\main\java\com\baeldung\readonlytransactions\mysql\dao\MyRepoJdbc.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getRootScopeId() {
return rootScopeId;
}
public void setRootScopeId(String rootScopeId) {
this.rootScopeId = rootScopeId;
}
public String getParentScopeId() {
return parentScopeId;
}
public void setParentScopeId(String parentScopeId) {
this.parent... | public Set<String> getScopeIds() {
return scopeIds;
}
public void setScopeIds(Set<String> scopeIds) {
this.scopeIds = scopeIds;
}
public String getScopeId() {
return scopeId;
}
public void setScopeId(String scopeId) {
this.scopeId = scopeId;
}
} | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricTaskInstanceQueryRequest.java | 2 |
请完成以下Spring Boot application配置 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/myDb
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.properties.hibernat... | defaults=false
h2.datasource.url=jdbc:h2:mem:testdb
h2.datasource.driver-class-name=org.h2.Driver
h2.datasource.username=sa
h2.datasource.password= | repos\tutorials-master\spring-boot-modules\spring-boot-data-3\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private static final class TableColumnInfo2TableColumnExtSynchronizer implements PropertyChangeListener
{
private final WeakReference<TableColumnExt> columnExtRef;
private boolean running = false;
public TableColumnInfo2TableColumnExtSynchronizer(final TableColumnExt columnExt)
{
super();
columnExtRef =... | running = true;
try
{
final TableColumnInfo columnMetaInfo = (TableColumnInfo)evt.getSource();
final TableColumnExt columnExt = getTableColumnExt();
if (columnExt == null)
{
// ColumnExt reference expired:
// * remove this listener because there is no point to have this listener invoked... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTableColumnFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
private final BookRepository bookRepository;
public BookstoreService(AuthorRepository authorRepository,
BookRepository bookRepository) {
this.authorRepository = authorRepository;
this.bookReposito... | Book book = new Book();
book.setTitle("A History of Ancient Prague");
book.setIsbn("001-JN");
// this will set the id of the book as the id of the author
book.setAuthor(author);
bookRepository.save(book);
}
@Transactional(readOnly = true)
public Book fetchBookByAut... | repos\Hibernate-SpringBoot-master\HibernateSpringBootOneToOneMapsId\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public int getPort() {
return this.port;
}
@Override
public void setPort(int port) {
this.port = port;
this.isEphemeral = port == 0;
}
@Override
public void destroy() {
stop();
}
@Override
public void afterPropertiesSet() {
start();
}
@Override
public void setApplicationContext(@NonNull Applic... | catch (LDAPException ex) {
throw new RuntimeException("Server startup failed", ex);
}
}
private void importLdif(InMemoryDirectoryServer directoryServer) {
if (StringUtils.hasText(this.ldif)) {
try {
Resource[] resources = this.context.getResources(this.ldif);
if (resources.length > 0) {
if (!r... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\server\UnboundIdContainer.java | 1 |
请完成以下Java代码 | protected String createRedirectUrl(String serviceUrl) {
return CommonUtils.constructRedirectUrl(this.loginUrl, this.serviceProperties.getServiceParameter(), serviceUrl,
this.serviceProperties.isSendRenew(), false);
}
/**
* Template method for you to do your own pre-processing before the redirect occurs.
* ... | public final void setEncodeServiceUrlWithSessionId(boolean encodeServiceUrlWithSessionId) {
this.encodeServiceUrlWithSessionId = encodeServiceUrlWithSessionId;
}
/**
* Sets whether to encode the service url with the session id or not.
* @return whether to encode the service url with the session id or not.
*
... | repos\spring-security-main\cas\src\main\java\org\springframework\security\cas\web\CasAuthenticationEntryPoint.java | 1 |
请完成以下Java代码 | public List<CaseExecutionDto> getCaseExecutions(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
CaseExecutionQueryDto queryDto = new CaseExecutionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
return queryCaseExecutions(queryDto, firstResult, maxResults);
}
@Override
public List<C... | @Override
public CountResultDto getCaseExecutionsCount(UriInfo uriInfo) {
CaseExecutionQueryDto queryDto = new CaseExecutionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
return queryCaseExecutionsCount(queryDto);
}
@Override
public CountResultDto queryCaseExecutionsCount(CaseExecutionQuery... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\CaseExecutionRestServiceImpl.java | 1 |
请完成以下Java代码 | final class SortedSetReactiveRedisSessionExpirationStore {
private final ReactiveRedisOperations<String, Object> sessionRedisOperations;
private String namespace;
private int retrieveCount = 100;
SortedSetReactiveRedisSessionExpirationStore(ReactiveRedisOperations<String, Object> sessionRedisOperations,
Stri... | * in {@code expiredBefore}.
* @param expiredBefore the expiration time
* @return a {@link Flux} that emits the session ids
*/
Flux<String> retrieveExpiredSessions(Instant expiredBefore) {
Range<Double> range = Range.closed(0D, (double) expiredBefore.toEpochMilli());
Limit limit = Limit.limit().count(this.ret... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\SortedSetReactiveRedisSessionExpirationStore.java | 1 |
请完成以下Java代码 | public void setId(int id) {
this.id = id;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + id;
result = prime * result + ((name == null) ? 0 : name.hashCode());
long temp;
temp = Double.doubleToLongBi... | if (getClass() != obj.getClass())
return false;
Product other = (Product) obj;
if (id != other.id)
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\springbootmvc\model\Product.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Oauth2AuthorizationTokenConfig {
/**
* 声明 内存 TokenStore 实现,用来存储 token 相关.
* 默认实现有 mysql、redis
*
* @return InMemoryTokenStore
*/
@Bean
@Primary
public TokenStore tokenStore() {
return new InMemoryTokenStore();
}
/**
* jwt 令牌 配置,非对称加密
*
... | /**
* 密钥 keyPair.
* 可用于生成 jwt / jwk.
*
* @return keyPair
*/
@Bean
public KeyPair keyPair() {
KeyStoreKeyFactory keyStoreKeyFactory = new KeyStoreKeyFactory(new ClassPathResource("oauth2.jks"), "123456".toCharArray());
return keyStoreKeyFactory.getKeyPair("oauth2");
... | repos\spring-boot-demo-master\demo-oauth\oauth-authorization-server\src\main\java\com\xkcoding\oauth\config\Oauth2AuthorizationTokenConfig.java | 2 |
请完成以下Java代码 | private void saveRpcResponseToEdgeQueue(TbContext ctx, TbMsg msg, String serviceIdStr, String sessionIdStr, String requestIdStr) {
EdgeId edgeId;
DeviceId deviceId;
try {
edgeId = new EdgeId(UUID.fromString(msg.getMetaData().getValue(DataConstants.EDGE_ID)));
deviceId = n... | EdgeEvent edgeEvent = EdgeUtils.constructEdgeEvent(ctx.getTenantId(), edgeId, EdgeEventType.DEVICE,
EdgeEventActionType.RPC_CALL, deviceId, JacksonUtil.valueToTree(body));
ListenableFuture<Void> future = ctx.getEdgeEventService().saveAsync(edgeEvent);
Futures.addCallback(future, new Futu... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\rpc\TbSendRPCReplyNode.java | 1 |
请完成以下Java代码 | public Builder setFacetFilter(final boolean facetFilter)
{
this.facetFilter = facetFilter;
return this;
}
public boolean hasParameters()
{
return !parameters.isEmpty();
}
public Builder addParameter(final DocumentFilterParamDescriptor.Builder parameter)
{
parameters.add(parameter);
return... | public Builder addInternalParameter(final DocumentFilterParam parameter)
{
internalParameters.add(parameter);
return this;
}
public Builder putDebugProperty(final String name, final Object value)
{
Check.assumeNotEmpty(name, "name is not empty");
if (debugProperties == null)
{
debugPropertie... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private PropertyResolver getPropertyResolver(ConditionContext context) {
return context.getEnvironment();
}
private List<String> collectPropertyNames(AnnotationAttributes annotationAttributes) {
String prefix = getPrefix(annotationAttributes);
String[] names = getNames(annotationAttributes);
return Arrays... | private String getPrefix(AnnotationAttributes annotationAttributes) {
String prefix = annotationAttributes.getString("prefix");
return StringUtils.hasText(prefix) ? prefix.trim().endsWith(".") ? prefix.trim() : prefix.trim() + "." : "";
}
private Collection<String> findMatchingProperties(PropertyResolver prope... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\condition\OnMissingPropertyCondition.java | 2 |
请完成以下Java代码 | public boolean isEmptyGroup()
{
return JSONMenuNodeType.group.equals(type) && (children == null || children.isEmpty());
}
public static final class Builder
{
private final MenuNode node;
private int maxDepth = Integer.MAX_VALUE;
private int maxChildrenPerNode = Integer.MAX_VALUE;
private int maxLeafNodes... | this.maxDepth = maxDepth > 0 ? maxDepth : Integer.MAX_VALUE;
return this;
}
public Builder setMaxChildrenPerNode(final int maxChildrenPerNode)
{
this.maxChildrenPerNode = maxChildrenPerNode > 0 ? maxChildrenPerNode : Integer.MAX_VALUE;
return this;
}
public Builder setMaxLeafNodes(final int maxLeaf... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\datatypes\json\JSONMenuNode.java | 1 |
请完成以下Java代码 | public Student mapRow(ResultSet rs, int rowNum) throws SQLException {
var student = new Student();
student.setId(rs.getLong("id"));
student.setName(rs.getString("name"));
student.setPassportNumber(rs.getString("passport_number"));
return student;
}
... | }
public void deleteById(long id) {
jdbcTemplate.update(StudentQueries.getDeleteStudentById(), id);
}
public int insert(Student student) {
return jdbcTemplate.update(StudentQueries.getInsertStudent(),
student.getId(), student.getName(), student.getPassportNumber());
}
... | repos\spring-boot-examples-master\spring-boot-2-jdbc-with-h2\src\main\java\com\in28minutes\springboot\jdbc\h2\example\student\StudentJdbcTemplateRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Student {
@Id
private int id;
@Column(name = "full_name")
private String fullName;
@ManyToOne
// switch these two lines to reproduce the exception
// @Column(name = "university")
@JoinColumn(name = "university_id")
private University university;
public int getId()... | public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public University getUniversity() {
return university;
}
public void setUniversity(University university) {
this.university = university;
... | repos\tutorials-master\persistence-modules\hibernate-exceptions-2\src\main\java\com\baeldung\hibernate\annotationexception\Student.java | 2 |
请完成以下Java代码 | public List<ProcessDefinition> getDeployedProcessDefinitions() {
return deployedArtifacts == null ? null : deployedArtifacts.get(ProcessDefinitionEntity.class);
}
@Override
public List<CaseDefinition> getDeployedCaseDefinitions() {
return deployedArtifacts == null ? null : deployedArtifacts.get(CaseDefin... | }
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[id=" + id
+ ", name=" + name
+ ", resources=" + resources
+ ", deploymentTime=" + deploymentTime
+ ", validatingSchema=" + validatingSchema
+ ", isNew=" + isNew
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\DeploymentEntity.java | 1 |
请完成以下Java代码 | public Map<String, Set<String>> getCustomUserIdentityLinks() {
return customUserIdentityLinks;
}
public void setCustomUserIdentityLinks(Map<String, Set<String>> customUserIdentityLinks) {
this.customUserIdentityLinks = customUserIdentityLinks;
}
public Map<String, Set<String>> getCusto... | public void setValues(UserTask otherElement) {
super.setValues(otherElement);
setAssignee(otherElement.getAssignee());
setOwner(otherElement.getOwner());
setFormKey(otherElement.getFormKey());
setDueDate(otherElement.getDueDate());
setPriority(otherElement.getPriority());... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\UserTask.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setNewValues(final I_AD_Sequence sequence)
{
Check.assumeNotNull(sequence, "sequence not null");
this.sequenceNameNew = sequence.getName();
this.currentNextNew = sequence.getCurrentNext();
this.currentNextSysNew = sequence.getCurrentNextSys();
this.newValuesSet = true;
}
public boolean... | changes.append("CurrentNext=").append(currentNext).append("->").append(currentNextNew);
}
if (newValuesSet && currentNextSys != currentNextSysNew)
{
if (changes.length() > 0)
{
changes.append(", ");
}
changes.append("CurrentNextSys=").append(currentNextSys).append("->").append(currentNext... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\service\impl\TableSequenceChecker.java | 2 |
请完成以下Java代码 | private DataImportRunId getOrCreateDataImportRunId()
{
if (_dataImportRunId == null)
{
_dataImportRunId = dataImportRunService.createNewRun(DataImportRunCreateRequest.builder()
.orgId(orgId)
.userId(userId)
.completeDocuments(completeDocuments)
.importFormatId(importFormat.getId())
.dat... | private PInstanceId getOrCreateRecordsToImportSelectionId()
{
if (_recordsToImportSelectionId == null)
{
final ImportTableDescriptor importTableDescriptor = importFormat.getImportTableDescriptor();
final DataImportRunId dataImportRunId = getOrCreateDataImportRunId();
final IQuery<Object> query = queryBL.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\DataImportCommand.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CollectionConfig {
@Bean
public CollectionsBean getCollectionsBean() {
return new CollectionsBean(new HashSet<>(Arrays.asList("John", "Adam", "Harry")));
}
@Bean
public List<String> nameList(){
return Arrays.asList("John", "Adam", "Harry", null);
}
@Bean
p... | public BaeldungBean getElement() {
return new BaeldungBean("John");
}
@Bean
@Order(3)
public BaeldungBean getAnotherElement() {
return new BaeldungBean("Adam");
}
@Bean
@Order(1)
public BaeldungBean getOneMoreElement() {
return new BaeldungBean("Harry");
}
} | repos\tutorials-master\spring-di-2\src\main\java\com\baeldung\collection\CollectionConfig.java | 2 |
请完成以下Java代码 | public IAttributeSetInstanceAware getM_Product()
{
return attributeSetInstanceAware;
}
public I_C_UOM getC_UOM()
{
return uom;
}
public BigDecimal getQty()
{
return qty;
}
public Timestamp getDateOrdered()
{
return dateOrdered;
}
/**
* @return locator where Quantity currently is
*/
public I... | public I_M_Locator getRawMaterialsLocator()
{
loadIfNeeded();
return rawMaterialsLocator;
}
public OrgId getOrgId()
{
loadIfNeeded();
return orgId;
}
public BPartnerLocationId getOrgBPLocationId()
{
loadIfNeeded();
return orgBPLocationId;
}
public UserId getPlannerId()
{
loadIfNeeded();
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\process\RawMaterialsReturnDDOrderLineCandidate.java | 1 |
请完成以下Java代码 | public class BaseFeatureData
{
/**
* 样本数量
*/
public int n;
/**
* 一个特征在类目中分别出现几次(键是特征,值的键是类目)
*/
public int[][] featureCategoryJointCount;
/**
* 每个类目中的文档数量
*/
public int[] categoryCounts;
/**
* 新的特征映射表
*/
public BinTrie<Integer> wordIdTrie; | /**
* 构造一个空白的统计对象
*/
public BaseFeatureData(IDataSet dataSet)
{
Catalog catalog = dataSet.getCatalog();
Lexicon lexicon = dataSet.getLexicon();
n = dataSet.size();
featureCategoryJointCount = new int[lexicon.size()][catalog.size()];
categoryCounts = new int[cata... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\features\BaseFeatureData.java | 1 |
请完成以下Java代码 | public class DmnElementReferenceImpl extends DmnModelElementInstanceImpl implements DmnElementReference {
protected static Attribute<String> hrefAttribute;
public DmnElementReferenceImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public String getHref() {
return hrefAttribu... | .namespaceUri(LATEST_DMN_NS)
.instanceProvider(new ModelTypeInstanceProvider<DmnElementReference>() {
public DmnElementReference newInstance(ModelTypeInstanceContext instanceContext) {
return new DmnElementReferenceImpl(instanceContext);
}
});
hrefAttribute = typeBuilder.strin... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DmnElementReferenceImpl.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
@Override
public void setType(String type) {
this.type = type;
}
@Override
public String getUserId() {
return userId;
}
@Override
public void setUserId(String userId) {
this.userId = userId;
}
@Overr... | }
@Override
public String getUsername() {
return value;
}
@Override
public String getParentId() {
return parentId;
}
@Override
public void setParentId(String parentId) {
this.parentId = parentId;
}
@Override
public Map<String, String> getDetails() ... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\IdentityInfoEntityImpl.java | 1 |
请完成以下Java代码 | private ShipperId getPartnerShipperId(@NonNull final BPartnerId partnerId)
{
return partnerDAO.getShipperId(partnerId);
}
@Override
public PaymentTermId getPaymentTermId(@NonNull final I_C_Order orderRecord)
{
return PaymentTermId.ofRepoId(orderRecord.getC_PaymentTerm_ID());
}
@Override
public Money getGr... | save(order);
}
@Override
public void syncDateInvoicedFromInvoice(@NonNull final OrderId orderId, @NonNull final I_C_Invoice invoice)
{
final I_C_Order order = getById(orderId);
order.setInvoiceDate(invoice.getDateInvoiced());
save(order);
}
public List<I_C_Order> getByQueryFilter(final IQueryFilter<I_C_Or... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderBL.java | 1 |
请完成以下Java代码 | private static void discardAllLinesFromSameGroupIfIncomplete(@NonNull final DeliveryLineCandidate deliveryLineCandidate)
{
if (CompleteStatus.OK.equals(deliveryLineCandidate.getCompleteStatus()))
{
return;
}
try (final IAutoCloseable shipmentScheduleMDCRestorer = ShipmentSchedulesMDC.removeCurrentShipmentS... | final StringBuilder statusInfos = line2StatusInfo.get(inOutLine);
if (statusInfos == null)
{
return "";
}
return statusInfos.toString();
}
public ImmutableList<DeliveryLineCandidate> getAllLines()
{
return ImmutableList.copyOf(deliveryLineCandidates);
}
@Value
private static class ShipperKey
{
p... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\inout\util\ShipmentSchedulesDuringUpdate.java | 1 |
请完成以下Java代码 | public void iterateUsingCollections(final List<String> list) {
Collections.reverse(list);
for (final String item : list) {
System.out.println(item);
}
}
/**
* Iterate using Apache Commons {@link ReverseListIterator}.
*
* @param list the list
*/
publi... | }
}
/**
* Iterate using Guava {@link Lists} API.
*
* @param list the list
*/
public void iterateUsingGuava(final List<String> list) {
final List<String> reversedList = Lists.reverse(list);
for (final String item : reversedList) {
System.out.println(item);
... | repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\list\ReverseIterator.java | 1 |
请完成以下Java代码 | public class AuthorClassDto {
private String genre;
private String name;
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public String getName() {
return name;
}
public void setName(String name) {
... | if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AuthorClassDto other = (AuthorClassDto) obj;
if (!Objects.equals(this.genr... | repos\Hibernate-SpringBoot-master\HibernateSpringBootNestedVsVirtualProjection\src\main\java\com\bookstore\dto\AuthorClassDto.java | 1 |
请完成以下Java代码 | public Set<String> getFieldNames()
{
return values.getFieldNames();
}
@Override
public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues()
{
return values.get(this);
}
@Override
public Map<String, ViewEditorRenderMode> getViewEditorRenderModeByFieldName()
{
return values.getViewEditorRenderModeBy... | return bpartner.getIdAs(BPartnerId::ofRepoId);
}
public InvoiceRow withPreparedForAllocationSet() { return withPreparedForAllocation(true); }
public InvoiceRow withPreparedForAllocationUnset() { return withPreparedForAllocation(false); }
public InvoiceRow withPreparedForAllocation(final boolean isPreparedForAllo... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRow.java | 1 |
请完成以下Java代码 | public long getInit() {
return this.memoryUsage.getInit();
}
public long getUsed() {
return this.memoryUsage.getUsed();
}
public long getCommitted() {
return this.memoryUsage.getCommitted();
}
public long getMax() {
return this.memoryUsage.getMax();
}
}
/**
* Garbage col... | private final String name;
private final long collectionCount;
GarbageCollectorInfo(GarbageCollectorMXBean garbageCollectorMXBean) {
this.name = garbageCollectorMXBean.getName();
this.collectionCount = garbageCollectorMXBean.getCollectionCount();
}
public String getName() {
return this.name;
... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\ProcessInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isDateMoved()
{
if (previousTime == null)
{
return false;
}
return !DateAndSeqNo.equals(previousTime, DateAndSeqNo.ofCandidate(candidate));
}
public boolean isDateMovedForwards()
{
if (previousTime == null)
{
return false;
}
return previousTime.isBefore(DateAndSeqNo.ofCandidate... | return toBuilder()
.candidate(candidate.withId(candidateId))
.build();
}
/**
* Convenience method that returns a new instance with negated candidate quantity and previousQty
*/
public CandidateSaveResult withNegatedQuantity()
{
return toBuilder()
.candidate(candidate.withNegatedQuantity())
.p... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\CandidateSaveResult.java | 2 |
请完成以下Java代码 | public class Country {
@SerializedName(value = "name")
private String countryName;
@SerializedName(value = "capital")
private String countryCapital;
@SerializedName(value = "continent")
private String continentName;
public Country(String countryName, String countryCapital, String continentN... | public void setCountryName(String countryName) {
this.countryName = countryName;
}
public String getCountryCapital() {
return countryCapital;
}
public void setCountryCapital(String countryCapital) {
this.countryCapital = countryCapital;
}
public String getContinentName... | repos\tutorials-master\json-modules\gson-2\src\main\java\com\baeldung\gson\entities\Country.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static ItemMetadata newGroup(String name, String type, String sourceType, String sourceMethod) {
return new ItemMetadata(ItemType.GROUP, name, null, type, sourceType, sourceMethod, null, null, null);
}
public static ItemMetadata newProperty(String prefix, String name, String type, String sourceType,
Stri... | */
public enum ItemType {
/**
* Group item type.
*/
GROUP,
/**
* Property item type.
*/
PROPERTY
}
} | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\ItemMetadata.java | 2 |
请完成以下Java代码 | public String getF_NAME() {
return F_NAME;
}
public void setF_NAME(String f_NAME) {
F_NAME = f_NAME;
}
public String getF_PARENTID() {
return F_PARENTID;
}
public void setF_PARENTID(String f_PARENTID) {
F_PARENTID = f_PARENTID;
}
public String getF_FIN... | F_USINGDATE = f_USINGDATE;
}
public Integer getF_LEVEL() {
return F_LEVEL;
}
public void setF_LEVEL(Integer f_LEVEL) {
F_LEVEL = f_LEVEL;
}
public String getF_END() {
return F_END;
}
public void setF_END(String f_END) {
F_END = f_END;
}
public... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscCanton.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TilesApplicationConfiguration implements WebMvcConfigurer {
/**
* Configure TilesConfigurer.
*/
@Bean
public TilesConfigurer tilesConfigurer() {
TilesConfigurer tilesConfigurer = new TilesConfigurer();
tilesConfigurer.setDefinitions("/WEB-INF/views/**/tiles.xml");
... | public void configureViewResolvers(ViewResolverRegistry registry) {
TilesViewResolver viewResolver = new TilesViewResolver();
registry.viewResolver(viewResolver);
}
/**
* Configure ResourceHandlers to serve static resources
*/
@Override
public void addResourceHandlers(Resourc... | repos\tutorials-master\spring-web-modules\spring-mvc-views\src\main\java\com\baeldung\themes\config\TilesApplicationConfiguration.java | 2 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Macro.
@param Macro
Macro
... | }
/** TokenType AD_Reference_ID=397 */
public static final int TOKENTYPE_AD_Reference_ID=397;
/** SQL Command = Q */
public static final String TOKENTYPE_SQLCommand = "Q";
/** Internal Link = I */
public static final String TOKENTYPE_InternalLink = "I";
/** External Link = E */
public static final String TOKEN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WikiToken.java | 1 |
请完成以下Java代码 | public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return l... | public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
... | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonoptimization\Customer.java | 1 |
请完成以下Java代码 | public <T> T mapInternalToJava(Object parameter, String typeIdentifier) {
return mapInternalToJava(parameter, typeIdentifier, null);
}
@Override
public <T> T mapInternalToJava(Object parameter, String typeIdentifier, DeserializationTypeValidator validator) {
try {
//sometimes the class identifier i... | throw new SpinRuntimeException("The following classes are not whitelisted for deserialization: " + invalidTypes);
}
}
}
protected void validateType(JavaType type, DeserializationTypeValidator validator, List<String> invalidTypes) {
if (!type.isPrimitive()) {
if (!type.isArrayType()) {
v... | repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\format\JacksonJsonDataFormatMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LocalContainerEntityManagerFactoryBean entityManagerFactory() throws NamingException {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
em.setPackagesToScan("com.baeldung.hibernate.cache.model");
em.set... | }
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
return new PersistenceExceptionTranslationPostProcessor();
}
final Properties additionalProperties() {
final Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("... | repos\tutorials-master\persistence-modules\spring-hibernate-5\src\main\java\com\baeldung\spring\PersistenceJNDIConfig.java | 2 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public void setResources(Map<String, ResourceEntity> resources) {
this.resources = resources;
}
public Date getDeploymentTime() {
return deploymentTime;
}
public void setDeploymentTime(Date deploymentTime) {
this.deploymentTime = depl... | this.tenantId = tenantId;
}
@Override
public List<ProcessDefinition> getDeployedProcessDefinitions() {
return deployedArtifacts == null ? null : deployedArtifacts.get(ProcessDefinitionEntity.class);
}
@Override
public List<CaseDefinition> getDeployedCaseDefinitions() {
return deployedArtifacts == ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\DeploymentEntity.java | 1 |
请完成以下Java代码 | public void setProcessInstanceIds(List<String> processInstanceIds) {
this.processInstanceIds = processInstanceIds;
}
public ProcessInstanceQueryDto getProcessInstanceQuery() {
return processInstanceQuery;
}
public void setProcessInstanceQuery(ProcessInstanceQueryDto processInstanceQuery) {
this.pr... | instruction.applyTo(builder, processEngine, objectMapper);
}
}
public String getAnnotation() {
return annotation;
}
public void setAnnotation(String annotation) {
this.annotation = annotation;
}
public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() {
return historicPro... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ModificationDto.java | 1 |
请完成以下Java代码 | public Tree build(String expression) throws TreeBuilderException {
try {
return createParser(expression).tree();
} catch (Scanner.ScanException e) {
throw new TreeBuilderException(expression, e.position, e.encountered, e.expected, e.getMessage());
} catch (ParseException ... | System.exit(0);
}
NodePrinter.dump(out, tree.getRoot());
if (!tree.getFunctionNodes().iterator().hasNext() && !tree.getIdentifierNodes().iterator().hasNext()) {
ELContext context = new ELContext() {
@Override
public VariableMapper getVariableMapper() {... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\Builder.java | 1 |
请完成以下Java代码 | public Collection<GrantedAuthority> convert(Jwt jwt) {
Collection<GrantedAuthority> grantedAuthorities = new ArrayList<>();
for (String authority : getAuthorities(jwt)) {
grantedAuthorities.add(new SimpleGrantedAuthority(this.authorityPrefix + authority));
}
return grantedAuthorities;
}
/**
* Sets the p... | Assert.hasText(authoritiesClaimName, "authoritiesClaimName cannot be empty");
this.authoritiesClaimNames = Collections.singletonList(authoritiesClaimName);
}
private String getAuthoritiesClaimName(Jwt jwt) {
for (String claimName : this.authoritiesClaimNames) {
if (jwt.hasClaim(claimName)) {
return claimN... | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\JwtGrantedAuthoritiesConverter.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.