instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public KeyManagerFactory getKeyManagerFactory() {
try {
KeyStore store = this.storeBundle.getKeyStore();
this.key.assertContainsAlias(store);
String alias = this.key.getAlias();
String algorithm = KeyManagerFactory.getDefaultAlgorithm();
KeyManagerFactory factory = getKeyManagerFactoryInstance(algorith... | String algorithm = TrustManagerFactory.getDefaultAlgorithm();
TrustManagerFactory factory = getTrustManagerFactoryInstance(algorithm);
factory.init(store);
return factory;
}
catch (Exception ex) {
throw new IllegalStateException("Could not load trust manager factory: " + ex.getMessage(), ex);
}
}
p... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\DefaultSslManagerBundle.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static boolean verifySign(SortedMap<String, String> params,String headerSign) {
if (params == null || StringUtils.isEmpty(headerSign)) {
return false;
}
// 把参数加密
String paramsSign = getParamsSign(params);
log.debug("Param Sign : {}", paramsSign);
return... | JeecgBaseConfig jeecgBaseConfig = SpringContextUtils.getBean(JeecgBaseConfig.class);
String signatureSecret = jeecgBaseConfig.getSignatureSecret();
String curlyBracket = SymbolConstant.DOLLAR + SymbolConstant.LEFT_CURLY_BRACKET;
if(oConvertUtils.isEmpty(signatureSecret) || signatureSecret.contai... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\sign\util\SignUtil.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 Comment/Help.
@param Help
Co... | {
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_FreightCategory.java | 1 |
请完成以下Java代码 | public int compare(ProcessEngineLookup o1, ProcessEngineLookup o2) {
return (-1) * ((Integer) o1.getPrecedence()).compareTo(o2.getPrecedence());
}
});
ProcessEngine processEngine = null;
for (ProcessEngineLookup processEngineLookup : discoveredLookups) {
... | }
FlowableServices services = ProgrammaticBeanLookup.lookup(FlowableServices.class, beanManager);
services.setProcessEngine(processEngine);
return processEngine;
}
private void deployProcesses(ProcessEngine processEngine) {
new ProcessDeployer(processEngine).deployProcesses();... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\FlowableExtension.java | 1 |
请完成以下Java代码 | public void actionPerformed(ActionEvent e)
{
if (e.getSource() == bShowDay)
m_days = 1;
else if (e.getSource() == bShowWeek)
m_days = 7;
else if (e.getSource() == bShowMonth)
m_days = 31;
else if (e.getSource() == bShowYear)
m_days = 365;
else
m_days = 0; // all
dispose();
} // actionPerfo... | * Get selected number of days
* @return days or -1 for all
*/
public int getCurrentDays()
{
return m_days;
} // getCurrentDays
/**
* @return true if user has canceled this form
*/
public boolean isCancel() {
return m_isCancel;
}
} // VOnlyCurrentDays | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\VOnlyCurrentDays.java | 1 |
请完成以下Java代码 | private void setExecutionStatus()
{
// Success
if (exception == null)
{
Check.assumeNotNull(executionResult, "executionResult not null");
step.setErrorMsg(null);
if (executionResult == ExecutionResult.Executed)
{
if (action == Action.Apply)
{
step.setStatusCode(X_AD_MigrationStep.STATUS... | {
throw new AdempiereException("Unknown execution result: " + executionResult);
}
}
// Error / Warning
else
{
logger.error("Action " + action + " of " + step + " failed.", exception);
step.setErrorMsg(exception.getLocalizedMessage());
if (action == Action.Apply)
{
step.setStatusCode(X_AD... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationStepExecutorRunnable.java | 1 |
请完成以下Java代码 | public PizzaStatusEnum getStatus() {
return status;
}
public void setStatus(PizzaStatusEnum status) {
this.status = status;
}
public boolean isDeliverable() {
return this.status.isReady();
}
public void printTimeToDeliver() {
System.out.println("Time to deliver... | public static EnumMap<PizzaStatusEnum, List<Pizza>> groupPizzaByStatus(List<Pizza> pzList) {
return pzList.stream().collect(Collectors.groupingBy(Pizza::getStatus, () -> new EnumMap<>(PizzaStatusEnum.class), Collectors.toList()));
}
public void deliver() {
if (isDeliverable()) {
Piz... | repos\tutorials-master\core-java-modules\core-java-lang-oop-types\src\main\java\com\baeldung\enums\Pizza.java | 1 |
请完成以下Java代码 | public class Lwm2mController extends BaseController {
@Autowired
private DeviceController deviceController;
@Autowired
private LwM2MService lwM2MService;
public static final String IS_BOOTSTRAP_SERVER = "isBootstrapServer";
@ApiOperation(value = "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBoo... | public LwM2MServerSecurityConfigDefault getLwm2mBootstrapSecurityInfo(
@Parameter(description = IS_BOOTSTRAP_SERVER_PARAM_DESCRIPTION)
@PathVariable(IS_BOOTSTRAP_SERVER) boolean bootstrapServer) throws ThingsboardException {
return lwM2MService.getServerSecurityInfo(bootstrapServer);
}
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\Lwm2mController.java | 1 |
请完成以下Java代码 | public class SwingUtils
{
/**
* @return JFrame of component or null
*/
public static JFrame getFrame(final Component component)
{
Component element = component;
while (element != null)
{
if (element instanceof JFrame)
{
return (JFrame)element;
}
element = element.getParent();
}
return n... | * @param container Container
* @return Graphics of container or null
*/
public static Graphics getGraphics(final Container container)
{
Container element = container;
while (element != null)
{
final Graphics g = element.getGraphics();
if (g != null)
{
return g;
}
element = element.getPare... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\SwingUtils.java | 1 |
请完成以下Java代码 | public String getTablePrefix() {
return tablePrefix;
}
public void setTablePrefix(String tablePrefix) {
this.tablePrefix = tablePrefix;
}
public static List<String> getSchemaUpdateValues() {
return SCHEMA_UPDATE_VALUES;
}
public String getSchemaName() {
return schemaName;
}
public vo... | }
public void setJdbcBatchProcessing(boolean jdbcBatchProcessing) {
this.jdbcBatchProcessing = jdbcBatchProcessing;
}
@Override
public String toString() {
return joinOn(this.getClass())
.add("type=" + type)
.add("schemaUpdate=" + schemaUpdate)
.add("schemaName=" + schemaName)
.... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\DatabaseProperty.java | 1 |
请完成以下Java代码 | public static JsonAddress.JsonAddressBuilder buildNShiftAddressBuilder(@NonNull final de.metas.common.delivery.v1.json.JsonAddress commonAddress, @NonNull final JsonAddressKind kind)
{
String street1 = commonAddress.getStreet();
if (Check.isNotBlank(commonAddress.getHouseNo()))
{
street1 = street1 + " " + com... | {
final JsonAddress.JsonAddressBuilder receiverAddressBuilder = buildNShiftAddressBuilder(deliveryAddress, JsonAddressKind.RECEIVER);
if (deliveryContact != null)
{
if (Check.isNotBlank(deliveryContact.getPhone()))
{
receiverAddressBuilder.phone(deliveryContact.getPhone());
}
if (Check.isNotBlan... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.client.nshift\src\main\java\de\metas\shipper\client\nshift\NShiftUtil.java | 1 |
请完成以下Java代码 | public void setFilter(ISqlQueryFilter filter)
{
this.filter = filter;
}
@Override
public ISqlQueryFilter getModelFilter()
{
return modelFilter;
}
@Override
public void setModelFilter(ISqlQueryFilter modelFilter)
{
this.modelFilter = modelFilter;
}
@Override
public Access getRequiredAccess()
{
r... | return copies;
}
@Override
public void setCopies(int copies)
{
this.copies = copies;
}
@Override
public String getAggregationKey()
{
return aggregationKey;
}
@Override
public void setAggregationKey(final String aggregationKey)
{
this.aggregationKey=aggregationKey;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\PrintingQueueQuery.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public java.lang.String getResponseBody()
{
return get_ValueAsString(COLUMNNAME_ResponseBody);
}
@Override
public void setResponseCode (final int ResponseCode)
{
set_Value (COLUMNNAME_ResponseCode, ResponseCode);
}
@Override
public int getResponseCode()
{
return get_ValueAsInt(COLUMNNAME_ResponseCode... | }
@Override
public void setSUMUP_Config_ID (final int SUMUP_Config_ID)
{
if (SUMUP_Config_ID < 1)
set_Value (COLUMNNAME_SUMUP_Config_ID, null);
else
set_Value (COLUMNNAME_SUMUP_Config_ID, SUMUP_Config_ID);
}
@Override
public int getSUMUP_Config_ID()
{
return get_ValueAsInt(COLUMNNAME_SUMUP_Confi... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java-gen\de\metas\payment\sumup\repository\model\X_SUMUP_API_Log.java | 2 |
请完成以下Java代码 | public org.compiere.model.I_MobileUI_UserProfile_Picking getMobileUI_UserProfile_Picking()
{
return get_ValueAsPO(COLUMNNAME_MobileUI_UserProfile_Picking_ID, org.compiere.model.I_MobileUI_UserProfile_Picking.class);
}
@Override
public void setMobileUI_UserProfile_Picking(final org.compiere.model.I_MobileUI_UserP... | public int getPickingProfile_Filter_ID()
{
return get_ValueAsInt(COLUMNNAME_PickingProfile_Filter_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\picking\model\X_PickingProfile_Filter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String prefix() {
return "management.elastic.metrics.export";
}
@Override
public String host() {
return obtain(ElasticProperties::getHost, ElasticConfig.super::host);
}
@Override
public String index() {
return obtain(ElasticProperties::getIndex, ElasticConfig.super::index);
}
@Override
public S... | public @Nullable String userName() {
return get(ElasticProperties::getUserName, ElasticConfig.super::userName);
}
@Override
public @Nullable String password() {
return get(ElasticProperties::getPassword, ElasticConfig.super::password);
}
@Override
public @Nullable String pipeline() {
return get(ElasticPro... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public Collection<Rule> getRules() {
return ruleCollection.get(this);
}
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionTable.class, DMN_ELEMENT_DECISION_TABLE)
.namespaceUri(LATEST_DMN_NS)
.extendsType(Expressio... | SequenceBuilder sequenceBuilder = typeBuilder.sequence();
inputCollection = sequenceBuilder.elementCollection(Input.class)
.build();
outputCollection = sequenceBuilder.elementCollection(Output.class)
.required()
.build();
ruleCollection = sequenceBuilder.elementCollection(Rule.class)
... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DecisionTableImpl.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8081
spring:
application:
name: publisher-demo
cloud:
# Consul
consul:
host: 127.0.0.1
port: 8500
# Bus 相关配置项,对应 BusProperties
bus:
enable | d: true # 是否开启,默认为 true
destination: springCloudBus # 目标消息队列,默认为 springCloudBus | repos\SpringBoot-Labs-master\labx-29-spring-cloud-consul-bus\labx-29-sc-bus-consul-demo-publisher\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public org.compiere.model.I_M_InOut getM_InOut()
{
return get_ValueAsPO(COLUMNNAME_M_InOut_ID, org.compiere.model.I_M_InOut.class);
}
@Override
public void setM_InOut(final org.compiere.model.I_M_InOut M_InOut)
{
set_ValueFromPO(COLUMNNAME_M_InOut_ID, org.compiere.model.I_M_InOut.class, M_InOut);
}
@Overri... | {
return get_ValueAsInt(COLUMNNAME_M_InOut_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv_Pack.java | 1 |
请完成以下Java代码 | public class PrometheusApp {
public static void main(String[] args) throws InterruptedException, IOException {
JvmMetrics.builder().register();
HTTPServer server = HTTPServer.builder()
.port(9400)
.buildAndStart();
Counter requestCounter = Counter.builder()
... | Summary requestDuration = Summary.builder()
.name("http_request_duration_seconds")
.help("Tracks the duration of HTTP requests in seconds")
.quantile(0.5, 0.05)
.quantile(0.9, 0.01)
.register();
for (int i = 0; i < 100; i++) {
double duration = 0.05... | repos\tutorials-master\metrics\src\main\java\com\baeldung\metrics\prometheus\PrometheusApp.java | 1 |
请完成以下Java代码 | public final class PayPalOrderAuthorizationId
{
@JsonCreator
public static PayPalOrderAuthorizationId ofString(@NonNull final String authId)
{
return new PayPalOrderAuthorizationId(authId);
}
public static PayPalOrderAuthorizationId ofNullableString(@Nullable final String authId)
{
return !Check.isEmpty(auth... | @Override
@Deprecated
public String toString()
{
return getAsString();
}
@JsonValue
public String getAsString()
{
return id;
}
public static String toString(@Nullable final PayPalOrderAuthorizationId id)
{
return id != null ? id.getAsString() : null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\client\PayPalOrderAuthorizationId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceExportClientFactoryImpl implements InvoiceExportClientFactory
{
private static final Logger logger = LogManager.getLogger(InvoiceExportClientFactoryImpl.class);
private final ExportConfigRepository configRepository;
private final CrossVersionServiceRegistry crossVersionServiceRegistry;
public... | final BPartnerQuery query = BPartnerQuery
.builder()
.bPartnerId(de.metas.bpartner.BPartnerId.ofRepoId(recipientId.getRepoId()))
.build();
final ExportConfig config = configRepository.getForQueryOrNull(query);
if (config == null)
{
loggable.addLog("forum_datenaustausch_ch - There is no expor... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\invoice\InvoiceExportClientFactoryImpl.java | 2 |
请完成以下Java代码 | protected Mono<Void> doNotify(InstanceEvent event, Instance instance) {
return Mono.fromRunnable(() -> {
Context ctx = new Context();
ctx.setVariables(additionalProperties);
ctx.setVariable("baseUrl", this.baseUrl);
ctx.setVariable("event", event);
ctx.setVariable("instance", instance);
ctx.setVaria... | public void setCc(String[] cc) {
this.cc = Arrays.copyOf(cc, cc.length);
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTemplate() {
return template;
}
public void setTemplate(String template) {
this.template = template;
}
@Nul... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\MailNotifier.java | 1 |
请完成以下Java代码 | public boolean isSystemUser(@NonNull final UserId userId)
{
return queryBL
.createQueryBuilder(I_AD_User.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(org.compiere.model.I_AD_User.COLUMNNAME_AD_User_ID, userId)
.addEqualsFilter(org.compiere.model.I_AD_User.COLUMNNAME_IsSystemUser, true)
.... | final UserId targetUserId = queryBL.createQueryBuilder(I_AD_User.class)
.addEqualsFilter(I_AD_User.COLUMNNAME_AD_Org_Mapping_ID, orgMappingId)
.addEqualsFilter(I_AD_User.COLUMNNAME_AD_Org_ID, targetOrgId)
.orderByDescending(I_AD_User.COLUMNNAME_AD_User_ID)
.create()
.firstId(UserId::ofRepoIdOrNull);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\api\impl\UserDAO.java | 1 |
请完成以下Java代码 | private void setJvmInfo() throws UnknownHostException {
Properties props = System.getProperties();
jvm.setTotal(Runtime.getRuntime().totalMemory());
jvm.setMax(Runtime.getRuntime().maxMemory());
jvm.setFree(Runtime.getRuntime().freeMemory());
jvm.setVersion(props.getProperty("jav... | sysFiles.add(sysFile);
}
}
/**
* 字节转换
*
* @param size 字节大小
* @return 转换后值
*/
public String convertFileSize(long size) {
long kb = 1024;
long mb = kb * 1024;
long gb = mb * 1024;
if (size >= gb) {
return String.format("%.1f GB", (f... | repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\Server.java | 1 |
请完成以下Java代码 | public void insertEditorSourceExtraForModel(String modelId, byte[] modelSource) {
ModelEntity model = findById(modelId);
if (model != null) {
ByteArrayRef ref = new ByteArrayRef(model.getEditorSourceExtraValueId());
ref.setValue("source-extra", modelSource);
if (mode... | public byte[] findEditorSourceExtraByModelId(String modelId) {
ModelEntity model = findById(modelId);
if (model == null || model.getEditorSourceExtraValueId() == null) {
return null;
}
ByteArrayRef ref = new ByteArrayRef(model.getEditorSourceExtraValueId());
return r... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ModelEntityManagerImpl.java | 1 |
请完成以下Java代码 | public java.lang.String getPrintName ()
{
return (java.lang.String)get_Value(COLUMNNAME_PrintName);
}
/** Set Browse name.
@param WEBUI_NameBrowse Browse name */
@Override
public void setWEBUI_NameBrowse (java.lang.String WEBUI_NameBrowse)
{
set_Value (COLUMNNAME_WEBUI_NameBrowse, WEBUI_NameBrowse);
}
... | /** Get New record name (breadcrumb).
@return New record name (breadcrumb) */
@Override
public java.lang.String getWEBUI_NameNewBreadcrumb ()
{
return (java.lang.String)get_Value(COLUMNNAME_WEBUI_NameNewBreadcrumb);
}
/**
* WidgetSize AD_Reference_ID=540724
* Reference name: WidgetSize_WEBUI
*/
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Element.java | 1 |
请完成以下Java代码 | public class User {
private String id;
private String name;
private String email;
public User(String id, String name, String email) {
super();
this.id = id;
this.name = name;
this.email = email;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
} | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-basic-customization\src\main\java\com\baeldung\bootcustomfilters\model\User.java | 1 |
请完成以下Java代码 | public int getW_Store_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_W_Store_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set WebStore User.
@param WStoreUser
User ID of the Web Store EMail address
*/
public void setWStoreUser (String WStoreUser)
{
set_Value (COLUMNNAME_WSto... | }
/** Set WebStore Password.
@param WStoreUserPW
Password of the Web Store EMail address
*/
public void setWStoreUserPW (String WStoreUserPW)
{
set_Value (COLUMNNAME_WStoreUserPW, WStoreUserPW);
}
/** Get WebStore Password.
@return Password of the Web Store EMail address
*/
public String getWStor... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Store.java | 1 |
请完成以下Java代码 | public List<User> executeList(CommandContext commandContext) {
return CommandContextUtil.getUserEntityManager(commandContext).findUserByQueryCriteria(this);
}
// getters //////////////////////////////////////////////////////////
@Override
public String getId() {
return id;
}
p... | }
public List<String> getGroupIds() {
return groupIds;
}
public String getFullNameLike() {
return fullNameLike;
}
public String getFullNameLikeIgnoreCase() {
return fullNameLikeIgnoreCase;
}
public String getDisplayName() {
return displayName;
}
p... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\UserQueryImpl.java | 1 |
请完成以下Java代码 | public String toString()
{
if (isNull())
{
return "NULL";
}
else if (isUnspecified())
{
return "UNSPECIFIED";
}
else
{
return String.valueOf(repoId);
}
}
@Override
@JsonValue
public int getRepoId()
{
if (isUnspecified())
{
throw Check.mkEx("Illegal call of getRepoId() on the uns... | public boolean isNull()
{
return repoId == IdConstants.NULL_REPO_ID;
}
public boolean isUnspecified()
{
return repoId == IdConstants.UNSPECIFIED_REPO_ID;
}
public boolean isRegular()
{
return !isNull() && !isUnspecified();
}
public static boolean isRegularNonNull(@Nullable final CandidateId candidateI... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\CandidateId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PmsPortalBrandServiceImpl implements PmsPortalBrandService {
@Autowired
private HomeDao homeDao;
@Autowired
private PmsBrandMapper brandMapper;
@Autowired
private PmsProductMapper productMapper;
@Override
public List<PmsBrand> recommendList(Integer pageNum, Integer pageSize... | public PmsBrand detail(Long brandId) {
return brandMapper.selectByPrimaryKey(brandId);
}
@Override
public CommonPage<PmsProduct> productList(Long brandId, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum,pageSize);
PmsProductExample example = new PmsProductExample()... | repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\service\impl\PmsPortalBrandServiceImpl.java | 2 |
请完成以下Java代码 | public void extractDatabaseInfo() throws SQLException {
String productName = databaseMetaData.getDatabaseProductName();
String productVersion = databaseMetaData.getDatabaseProductVersion();
String driverName = databaseMetaData.getDriverName();
String driverVersion = databaseMetaData.get... | System.out.println(String.format("Table_schema:%s, Table_catalog:%s", table_schem, table_catalog));
}
}
}
public void extractSupportedFeatures() throws SQLException {
System.out.println("Supports scrollable & Updatable Result Set: " + databaseMetaData.supportsResultSetConcurrency(Resu... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\jdbcmetadata\MetadataExtractor.java | 1 |
请完成以下Java代码 | public class GraphicInfo {
protected double x;
protected double y;
protected double height;
protected double width;
protected BaseElement element;
protected Boolean expanded;
protected int xmlRowNumber;
protected int xmlColumnNumber;
public double getX() {
return x;
}
... | this.width = width;
}
public Boolean getExpanded() {
return expanded;
}
public void setExpanded(Boolean expanded) {
this.expanded = expanded;
}
public BaseElement getElement() {
return element;
}
public void setElement(BaseElement element) {
this.eleme... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\GraphicInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public long getMaxOplogSize() {
return this.maxOplogSize;
}
public void setMaxOplogSize(long maxOplogSize) {
this.maxOplogSize = maxOplogSize;
}
public int getQueueSize() {
return this.queueSize;
}
public void setQueueSize(int queueSize) {
this.queueSize = queueSize;
} | public long getTimeInterval() {
return this.timeInterval;
}
public void setTimeInterval(long timeInterval) {
this.timeInterval = timeInterval;
}
public int getWriteBufferSize() {
return this.writeBufferSize;
}
public void setWriteBufferSize(int writeBufferSize) {
this.writeBufferSize = writeB... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\DiskStoreProperties.java | 2 |
请完成以下Java代码 | public String getF_LOGPASS() {
return F_LOGPASS;
}
public void setF_LOGPASS(String f_LOGPASS) {
F_LOGPASS = f_LOGPASS;
}
public String getF_STARTDATE() {
return F_STARTDATE;
}
public void setF_STARTDATE(String f_STARTDATE) {
F_STARTDATE = f_STARTDATE;
}
... | }
public void setF_ISAUDIT(String f_ISAUDIT) {
F_ISAUDIT = f_ISAUDIT;
}
public Timestamp getF_EDITTIME() {
return F_EDITTIME;
}
public void setF_EDITTIME(Timestamp f_EDITTIME) {
F_EDITTIME = f_EDITTIME;
}
public Integer getF_PLATFORM_ID() {
return F_PLATFO... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscExeOffice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<ProactiveNotification> getProactiveNotification() {
if (proactiveNotification == null) {
proactiveNotification = new ArrayList<ProactiveNotification>();
}
return this.proactiveNotification;
}
/**
* Gets the value of the delivery property.
*
* @ret... | }
/**
* Sets the value of the invoiceAddress property.
*
* @param value
* allowed object is
* {@link Address }
*
*/
public void setInvoiceAddress(Address value) {
this.invoiceAddress = value;
}
/**
* Gets the value of the countrySpecificSer... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ProductAndServiceData.java | 2 |
请完成以下Java代码 | protected void addSentryPart(CmmnSentryPart sentryPart) {
getCaseSentryParts().add((CaseSentryPartImpl) sentryPart);
}
protected CmmnSentryPart newSentryPart() {
return new CaseSentryPartImpl();
}
// new case executions ////////////////////////////////////////////////////////////
protected CaseExec... | @Override
protected List<VariableInstanceLifecycleListener<CoreVariableInstance>> getVariableInstanceLifecycleListeners() {
return Collections.emptyList();
}
// toString /////////////////////////////////////////////////////////////////
public String toString() {
if (isCaseInstanceExecution()) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CaseExecutionImpl.java | 1 |
请完成以下Java代码 | public List<Queue> findAllByTenantId(TenantId tenantId) {
List<QueueEntity> entities = queueRepository.findByTenantId(tenantId.getId());
return DaoUtil.convertDataList(entities);
}
@Override
public List<Queue> findAllMainQueues() {
List<QueueEntity> entities = Lists.newArrayList(que... | return DaoUtil.toPageData(queueRepository
.findByTenantId(tenantId.getId(), pageLink.getTextSearch(), DaoUtil.toPageable(pageLink)));
}
@Override
public PageData<Queue> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
return findQueuesByTenantId(tenantId, pageLink);
}
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\queue\JpaQueueDao.java | 1 |
请完成以下Java代码 | public DmnDecisionResult evaluateDecision(DmnDecision decision, Map<String, Object> variables) {
ensureNotNull("decision", decision);
ensureNotNull("variables", variables);
return evaluateDecision(decision, Variables.fromMap(variables).asVariableContext());
}
public DmnDecisionResult evaluateDecision(D... | public DmnDecisionResult evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, Map<String, Object> variables) {
ensureNotNull("variables", variables);
return evaluateDecision(decisionKey, dmnModelInstance, Variables.fromMap(variables).asVariableContext());
}
public DmnDecisionResult evalu... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DefaultDmnEngine.java | 1 |
请完成以下Java代码 | private I_M_InOutLine getCreateInOutLine(final I_M_InOutLine originInOutLine, final ProductId productId)
{
final I_M_InOut inout = getM_InOut();
if (inout.getM_InOut_ID() <= 0)
{
// nothing created
return null;
}
//
// Check if we already have a movement line for our key
final ArrayKey inOutLineK... | private I_M_InOutLine getCreateInOutLineInDispute(final I_M_InOutLine originInOutLine, final ProductId productId)
{
final I_M_InOutLine originInOutLineInDispute = InterfaceWrapperHelper.create(inOutDAO.retrieveLineWithQualityDiscount(originInOutLine), I_M_InOutLine.class);
if (originInOutLineInDispute == null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\AbstractQualityReturnsInOutLinesBuilder.java | 1 |
请完成以下Java代码 | public String index(OAuth2AuthenticationToken authenticationToken) {
OAuth2AuthorizedClient oAuth2AuthorizedClient = this.authorizedClientService.loadAuthorizedClient(authenticationToken.getAuthorizedClientRegistrationId(), authenticationToken.getName());
OAuth2AccessToken oAuth2AccessToken = oAuth2Auth... | }
private String callResourceServer(OAuth2AuthenticationToken authenticationToken, String url) {
OAuth2AuthorizedClient oAuth2AuthorizedClient = this.authorizedClientService.loadAuthorizedClient(authenticationToken.getAuthorizedClientRegistrationId(), authenticationToken.getName());
OAuth2AccessTok... | repos\tutorials-master\security-modules\cloud-foundry-uaa\cf-uaa-oauth2-client\src\main\java\com\baeldung\cfuaa\oauth2\client\CFUAAOAuth2ClientController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String generatePasswordResetKey(final String email)
{
final User user = getUserByMail(email);
if (user == null)
{
throw new PasswordResetFailedException(i18n.get("LoginService.error.emailNotRegistered"));
}
//
// Generate a password reset key and set it on user
final String passwordResetKey = ... | return user;
}
private String generatePassword()
{
final StringBuilder password = new StringBuilder();
final SecureRandom random = new SecureRandom();
final int poolLength = PASSWORD_CHARS.length();
for (int i = 0; i < PASSWORD_Length; i++)
{
final int charIndex = random.nextInt(poolLength);
final c... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\impl\LoginService.java | 2 |
请完成以下Java代码 | private DocumentFilterList getStickyFilters()
{
return stickyFilters != null ? stickyFilters : DocumentFilterList.EMPTY;
}
public HUEditorViewBuilder setFilters(final DocumentFilterList filters)
{
this.filters = filters;
return this;
}
DocumentFilterList getFilters()
{
return filters != null ? filters ... | ImmutableMap<String, Object> getParameters()
{
return parameters != null ? ImmutableMap.copyOf(parameters) : ImmutableMap.of();
}
@Nullable
public <T> T getParameter(@NonNull final String name)
{
if (parameters == null)
{
return null;
}
@SuppressWarnings("unchecked") final T value = (T)parameters.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuilder.java | 1 |
请完成以下Java代码 | protected TbActorRef getOrCreateActor(RuleChainId ruleChainId) {
return getOrCreateActor(ruleChainId, eId -> ruleChainService.findRuleChainById(TenantId.SYS_TENANT_ID, eId));
}
protected TbActorRef getOrCreateActor(RuleChainId ruleChainId, Function<RuleChainId, RuleChain> provider) {
return ctx... | },
() -> true);
}
protected TbActorRef getEntityActorRef(EntityId entityId) {
TbActorRef target = null;
if (entityId.getEntityType() == EntityType.RULE_CHAIN) {
target = getOrCreateActor((RuleChainId) entityId);
}
return target;
}
protected v... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\ruleChain\RuleChainManagerActor.java | 1 |
请完成以下Java代码 | public Integer visitAddSub(LabeledExprParser.AddSubContext ctx) {
int left = visit(ctx.expr(0)); // get value of left subexpression
int right = visit(ctx.expr(1)); // get value of right subexpression
if (ctx.op.getType() == LabeledExprParser.ADD) return left + right;
return left - right... | String id = ctx.ID().getText();
if (memory.containsKey(id)) return memory.get(id);
return 0; // default value if the variable is not found
}
/** expr : '(' expr ')' */
@Override
public Integer visitParens(LabeledExprParser.ParensContext ctx) {
return visit(ctx.expr()); // return... | repos\springboot-demo-master\ANTLR\src\main\java\com\et\antlr\EvalVisitor.java | 1 |
请完成以下Spring Boot application配置 | spring.sql.init.platform=postgre
spring.datasource.url=jdbc:postgresql://localhost:5432/jdbc_authentication
spring.datasource.username=postgres
spring.datasource.passw | ord=pass
spring.sql.init.mode=always
spring.jpa.hibernate.ddl-auto=none | repos\tutorials-master\spring-security-modules\spring-security-web-boot-2\src\main\resources\application-postgre.properties | 2 |
请完成以下Java代码 | private POSPayment processPOSPayment_CARD(
@NonNull final POSPayment posPayment,
@NonNull final POSOrder posOrder)
{
posPayment.getPaymentMethod().assertCard();
final POSTerminal posTerminal = posTerminalService.getPOSTerminalById(posOrder.getPosTerminalId());
final POSTerminalPaymentProcessorConfig payme... | paymentBL.reversePaymentById(posPayment.getPaymentReceiptId());
posPayment = posPayment.withPaymentReceipt(null);
}
//
// Ask payment processor to refund
final POSPaymentProcessResponse refundResponse = posPaymentProcessorService.refund(
POSRefundRequest.builder()
.paymentProcessorConfig(paymentPr... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrderProcessingServices.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Embedded {
/**
* Whether to enable embedded mode if the ActiveMQ Broker is available.
*/
private boolean enabled = true;
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
public static class Packag... | /**
* List of specific packages to trust (when not trusting all packages).
*/
private List<String> trusted = new ArrayList<>();
public @Nullable Boolean getTrustAll() {
return this.trustAll;
}
public void setTrustAll(@Nullable Boolean trustAll) {
this.trustAll = trustAll;
}
public List<String... | repos\spring-boot-4.0.1\module\spring-boot-activemq\src\main\java\org\springframework\boot\activemq\autoconfigure\ActiveMQProperties.java | 2 |
请完成以下Java代码 | public class CodeGenerator {
public static void generate() throws IOException {
Consumer<MethodBuilder> calculateAnnualBonusBuilder = methodBuilder -> methodBuilder.withCode(codeBuilder -> {
Label notSales = codeBuilder.newLabel();
Label notEngineer = codeBuilder.newLabel();
... | Files.write(Path.of("EmployeeSalaryCalculator.class"), classBuilder);
}
public static void transform() throws IOException {
var basePath = Files.readAllBytes(Path.of("EmployeeSalaryCalculator.class"));
CodeTransform codeTransform = ClassFileBuilder::accept;
MethodTransform methodTrans... | repos\tutorials-master\core-java-modules\core-java-24\src\main\java\com\baeldung\classfiles\CodeGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<SysUser> findAll() {
return sysUserRepository.findAll();
}
@Override
public SysUser findById(Long id) {
return sysUserRepository.findById(id).orElseThrow(() -> new RuntimeException("找不到用户"));
}
@Override
public void createUser(SysUser sysUser) {
sysUser.setI... | }
@Override
public void updatePassword(Long id, String password) {
SysUser exist = findById(id);
exist.setPassword(passwordEncoder.encode(password));
sysUserRepository.save(exist);
}
@Override
public void deleteUser(Long id) {
sysUserRepository.deleteById(id);
}... | repos\spring-boot-demo-master\demo-oauth\oauth-authorization-server\src\main\java\com\xkcoding\oauth\service\impl\SysUserServiceImpl.java | 2 |
请完成以下Java代码 | public String getTableName(Class<?> entityClass, boolean withPrefix) {
String databaseTablePrefix = getDbSqlSession().getDbSqlSessionFactory().getDatabaseTablePrefix();
String tableName = null;
if (DbEntity.class.isAssignableFrom(entityClass)) {
tableName = persistentObjectToTableNameMap.get(entityCl... | while(resultSet.next()) {
String name = resultSet.getString("COLUMN_NAME").toUpperCase();
String type = resultSet.getString("TYPE_NAME").toUpperCase();
result.addColumnMetaData(name, type);
}
} catch (SQLException se) {
throw se;
} finally {
if (resultS... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\TableDataManager.java | 1 |
请完成以下Java代码 | public class ServletContextApplicationContextInitializer
implements ApplicationContextInitializer<ConfigurableWebApplicationContext>, Ordered {
private int order = Ordered.HIGHEST_PRECEDENCE;
private final ServletContext servletContext;
private final boolean addApplicationContextAttribute;
/**
* Create a ne... | }
public void setOrder(int order) {
this.order = order;
}
@Override
public int getOrder() {
return this.order;
}
@Override
public void initialize(ConfigurableWebApplicationContext applicationContext) {
applicationContext.setServletContext(this.servletContext);
if (this.addApplicationContextAttribute) ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\support\ServletContextApplicationContextInitializer.java | 1 |
请完成以下Java代码 | public int getC_Flatrate_Conditions_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Flatrate_Conditions_ID);
}
@Override
public void setC_Flatrate_Matching_ID (final int C_Flatrate_Matching_ID)
{
if (C_Flatrate_Matching_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Flatrate_Matching_ID, null);
else
set_ValueNoC... | if (M_Product_Category_Matching_ID < 1)
set_Value (COLUMNNAME_M_Product_Category_Matching_ID, null);
else
set_Value (COLUMNNAME_M_Product_Category_Matching_ID, M_Product_Category_Matching_ID);
}
@Override
public int getM_Product_Category_Matching_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_Categ... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Matching.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ResponseHeaderController {
@GetMapping("/http-servlet-response")
public String usingHttpServletResponse(HttpServletResponse response) {
response.addHeader("Baeldung-Example-Header", "Value-HttpServletResponse");
return "Response with header using HttpServletResponse";
}
@G... | return new ResponseEntity<String>(responseBody, responseHeaders, responseStatus);
}
@GetMapping("/response-entity-builder")
public ResponseEntity<String> usingResponseEntityBuilder() {
String responseHeaderKey = "Baeldung-Example-Header";
String responseHeaderValue = "Value-ResponseEntityBu... | repos\tutorials-master\spring-web-modules\spring-rest-http\src\main\java\com\baeldung\responseheaders\controllers\ResponseHeaderController.java | 2 |
请完成以下Java代码 | public class OrderLineReceiptScheduleListener extends ReceiptScheduleListenerAdapter
{
public static final OrderLineReceiptScheduleListener INSTANCE = new OrderLineReceiptScheduleListener();
private final IOrderBL orderBL = Services.get(IOrderBL.class);
private final IInvoiceCandBL invoiceCandBL = Services.get(IInv... | *
* @task <a href="https://github.com/metasfresh/metasfresh/issues/315">issue #315</a>
*/
@Override
public void onAfterReopen(final I_M_ReceiptSchedule receiptSchedule)
{
final I_C_OrderLine orderLine = receiptSchedule.getC_OrderLine();
if (orderLine == null)
{
return; // shall not happen
}
orderBL... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\spi\impl\OrderLineReceiptScheduleListener.java | 1 |
请完成以下Java代码 | protected Properties getCtx()
{
return m_ctx;
}
@Override
public int getColumnCount()
{
try
{
return m_resultSet.getMetaData().getColumnCount();
}
catch (SQLException e)
{
throw DBException.wrapIfNeeded(e);
}
}
@Override
public int getDisplayType(final int IGNORED, final int col)
{
fina... | public boolean isPageBreak(final int row, final int col)
{
return false;
}
@Override
protected List<CellValue> getNextRow()
{
return CellValues.toCellValues(getNextRawDataRow());
}
private List<Object> getNextRawDataRow()
{
try
{
final List<Object> row = new ArrayList<>();
for (int col = 1; col ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\JdbcExcelExporter.java | 1 |
请完成以下Java代码 | public void setAD_OrgTo_ID (int AD_OrgTo_ID)
{
if (AD_OrgTo_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_OrgTo_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_OrgTo_ID, Integer.valueOf(AD_OrgTo_ID));
}
/** Get Inter-Organization.
@return Organization valid for intercompany documents
*/
public int getAD... | return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
.getPO(getIntercompanyDueFrom_Acct(), get_TrxName()); }
/** Set Intercompany Due From Acct.
@param IntercompanyDueFrom_Acct
Intercompany Due From / Receivables Account
*/
public void setIntercompanyDueFrom_Acct (int Interco... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InterOrg_Acct.java | 1 |
请完成以下Java代码 | public Map<String, List<DmnExtensionElement>> getChildElements() {
return childElements;
}
public void addChildElement(DmnExtensionElement childElement) {
if (childElement != null && childElement.getName() != null && !childElement.getName().trim().isEmpty()) {
List<DmnExtensionEleme... | }
public void setValues(DmnExtensionElement otherElement) {
setName(otherElement.getName());
setNamespacePrefix(otherElement.getNamespacePrefix());
setNamespace(otherElement.getNamespace());
setElementText(otherElement.getElementText());
setAttributes(otherElement.getAttribu... | repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\DmnExtensionElement.java | 1 |
请完成以下Java代码 | public String getSql(final Properties ctx, final List<Object> params)
{
buildSql(ctx);
params.addAll(sqlParams);
return sql;
}
private void buildSql(final Properties ctx)
{
if (sqlBuilt)
{
return;
}
if (queryUpdaters.isEmpty())
{
throw new AdempiereException("Cannot build sql update query f... | if (Check.isEmpty(sqlChunk))
{
continue;
}
if (sql.length() > 0)
{
sql.append(", ");
}
sql.append(sqlChunk);
}
this.sql = sql.toString();
this.sqlParams = params;
this.sqlBuilt = true;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompositeQueryUpdater.java | 1 |
请完成以下Java代码 | public void setP_TradeDiscountRec_A(org.compiere.model.I_C_ValidCombination P_TradeDiscountRec_A)
{
set_ValueFromPO(COLUMNNAME_P_TradeDiscountRec_Acct, org.compiere.model.I_C_ValidCombination.class, P_TradeDiscountRec_A);
}
/** Set Trade Discount Received.
@param P_TradeDiscountRec_Acct
Trade Discount Receiv... | }
@Override
public void setP_WIP_A(org.compiere.model.I_C_ValidCombination P_WIP_A)
{
set_ValueFromPO(COLUMNNAME_P_WIP_Acct, org.compiere.model.I_C_ValidCombination.class, P_WIP_A);
}
/** Set Work In Process.
@param P_WIP_Acct
The Work in Process account is the account used Manufacturing Order
*/
@Ove... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DeploymentBuilder disableBpmnValidation() {
this.isProcessValidationEnabled = false;
return this;
}
@Override
public DeploymentBuilder disableSchemaValidation() {
this.isBpmn20XsdValidationEnabled = false;
return this;
}
@Override
public DeploymentBuilder... | public DeploymentEntity getDeployment() {
return deployment;
}
public boolean isProcessValidationEnabled() {
return isProcessValidationEnabled;
}
public boolean isBpmn20XsdValidationEnabled() {
return isBpmn20XsdValidationEnabled;
}
public boolean isDuplicateFilterEnab... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\repository\DeploymentBuilderImpl.java | 2 |
请完成以下Java代码 | public static void main(String[] args) {
// List of Parent Class
ArrayList<Number> myList = new ArrayList<>();
myList.add(1.2);
myList.add(2);
myList.add(-3.5);
// List of Interface type
ArrayList<Map> diffMapList = new ArrayList<>();
diffMapList.add(new ... | UserFunctionalInterface myInterface = (listObj, data) -> {
if (myPredicate.test(data))
listObj.add(data);
else
System.out.println("Skipping input as data not allowed for class: " + data.getClass()
.getSimpleName());
return listObj;
... | repos\tutorials-master\core-java-modules\core-java-collections-array-list-2\src\main\java\com\baeldung\list\multipleobjecttypes\AlternativeMultipeTypeList.java | 1 |
请完成以下Java代码 | public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boole... | return accountNonLocked;
}
public void setAccountNonLocked(boolean accountNonLocked) {
this.accountNonLocked = accountNonLocked;
}
public boolean isCredentialsNonExpired() {
return credentialsNonExpired;
}
public void setCredentialsNonExpired(boolean credentialsNonExpired) {
... | repos\SpringAll-master\36.Spring-Security-ValidateCode\src\main\java\cc\mrbird\domain\MyUser.java | 1 |
请完成以下Java代码 | public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TemplateDefinition that = (TemplateDefinition) o;
return (
Objects.equals(from, that.from) &&
Objects.equals(subject, that.subject) &&
... | public String toString() {
return (
"TemplateDefinition{" +
"from='" +
from +
'\'' +
", subject='" +
subject +
'\'' +
", type=" +
type +
", value='" +
value +
'\'' +
... | repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\TemplateDefinition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public void setUrl(String url) {
this.url = url;
}
@ApiModelProperty(value = "For a single resource contains the actual URL to use for retrieving the binary resource", example = "http:/... | public void setMediaType(String mimeType) {
this.mediaType = mimeType;
}
@ApiModelProperty(example = "text/xml", value = "Contains the media-type the resource has. This is resolved using a (pluggable) MediaTypeResolver and contains, by default, a limited number of mime-type mappings.")
public Strin... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\DeploymentResourceResponse.java | 2 |
请完成以下Java代码 | public class SysRole implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
private String id;
/**
* 角色名称
*/
@Excel(name="角色名",width=15)
private String roleName;
/**
* 角色编码
*/
... | * 创建时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新人
*/
private String updateBy;
/**
* 更新时间
*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysRole.java | 1 |
请完成以下Java代码 | public class RemoveExecutionVariablesCmd extends AbstractRemoveVariableCmd {
private static final long serialVersionUID = 1L;
public RemoveExecutionVariablesCmd(String executionId, Collection<String> variableNames, boolean isLocal) {
super(executionId, variableNames, isLocal);
}
protected ExecutionEntity... | }
@Override
protected ExecutionEntity getContextExecution() {
return getEntity();
}
protected void logVariableOperation(AbstractVariableScope scope) {
ExecutionEntity execution = (ExecutionEntity) scope;
commandContext.getOperationLogManager().logVariableOperation(getLogEntryOperation(), execution... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\RemoveExecutionVariablesCmd.java | 1 |
请完成以下Java代码 | public int inspectRecord(final Object model)
{
final Timestamp value;
final Optional<Timestamp> updated = InterfaceWrapperHelper.getValue(model, I_AD_Column.COLUMNNAME_Updated);
if (updated.isPresent())
{
value = updated.get();
}
else
{
final Optional<Timestamp> created = InterfaceWrapperHelper.get... | final boolean modelIsOld = TimeUtil.addMonths(value, 1).after(SystemTime.asDate());
return modelIsOld ? IMigratorService.DLM_Level_ARCHIVE : IMigratorService.DLM_Level_LIVE;
}
/**
* Returns <code>true</code> if the given model has an <code>Updated</code> column.
*/
@Override
public boolean isApplicableFor(f... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\coordinator\impl\LastUpdatedInspector.java | 1 |
请完成以下Java代码 | public void setRetourenAnteilTyp(RetourenAnteilTypType value) {
this.retourenAnteilTyp = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
... | * </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
public static class Position
extends RetourePositionType
{
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnkuendigungAntwort.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int updatePassword(UpdateAdminPasswordParam param) {
if(StrUtil.isEmpty(param.getUsername())
||StrUtil.isEmpty(param.getOldPassword())
||StrUtil.isEmpty(param.getNewPassword())){
return -1;
}
UmsAdminExample example = new UmsAdminExample();
... | }
@Override
public UmsAdminCacheService getCacheService() {
return SpringUtil.getBean(UmsAdminCacheService.class);
}
@Override
public void logout(String username) {
//清空缓存中的用户相关数据
UmsAdmin admin = getCacheService().getAdmin(username);
getCacheService().delAdmin(admi... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsAdminServiceImpl.java | 2 |
请完成以下Java代码 | public class ReceiptScheduleHUAllocations extends AbstractHUAllocations
{
//
// Services
private final IHUReceiptScheduleDAO huReceiptScheduleDAO = Services.get(IHUReceiptScheduleDAO.class);
public ReceiptScheduleHUAllocations(final I_M_ReceiptSchedule receiptSchedule, final IProductStorage productStorage)
{
su... | .setM_LU_HU(luHU)
.setM_TU_HU(tuHUActual)
.setVHU(vhu);
// Create RSA and save it
builder.buildAndSave();
}
/**
* Remove existing receipt schedule allocations for the given TU.
*/
private final void deleteAllocationsOfTU(final I_M_ReceiptSchedule receiptSchedule, final I_M_HU tuHU)
{
final Strin... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleHUAllocations.java | 1 |
请完成以下Java代码 | private ViewLayout createViewLayout(final WindowId windowId)
{
return ViewLayout.builder()
.setWindowId(windowId)
.setCaption("PP Order Issue/Receipt")
.setEmptyResultText(msgBL.getTranslatableMsgText(LayoutFactory.TAB_EMPTY_RESULT_TEXT))
.setEmptyResultHint(msgBL.getTranslatableMsgText(LayoutFactory... | createProcessDescriptorForIssueReceiptWindow(de.metas.ui.web.pporder.process.WEBUI_PP_Order_HUEditor_Launcher.class),
createProcessDescriptorForIssueReceiptWindow(de.metas.ui.web.pporder.process.WEBUI_PP_Order_M_Source_HU_Delete.class),
createProcessDescriptorForIssueReceiptWindow(de.metas.ui.web.pporder.proces... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\PPOrderLinesViewFactory.java | 1 |
请完成以下Java代码 | public void setDescription (final @Nullable java.lang.String Description)
{
set_ValueNoCheck (COLUMNNAME_Description, Description);
}
@Override
public java.lang.String getDescription()
{
return get_ValueAsString(COLUMNNAME_Description);
}
@Override
public void setDocBaseType (final @Nullable java.lang.St... | @Override
public void setPOReference (final @Nullable java.lang.String POReference)
{
set_ValueNoCheck (COLUMNNAME_POReference, POReference);
}
@Override
public java.lang.String getPOReference()
{
return get_ValueAsString(COLUMNNAME_POReference);
}
@Override
public void setPostingType (final @Nullable j... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_DATEV_ExportLine.java | 1 |
请完成以下Java代码 | public ResponseEntity getProfile(
@PathVariable("username") String username, @AuthenticationPrincipal User user) {
return profileQueryService
.findByUsername(username, user)
.map(this::profileResponse)
.orElseThrow(ResourceNotFoundException::new);
}
@PostMapping(path = "follow")
... | User target = userOptional.get();
return userRepository
.findRelation(user.getId(), target.getId())
.map(
relation -> {
userRepository.removeRelation(relation);
return profileResponse(profileQueryService.findByUsername(username, user).get());
... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\api\ProfileApi.java | 1 |
请完成以下Java代码 | public boolean areAllEnginesIdle() {
for (AcquiredJobs acquiredJobs : acquiredJobsByEngine.values()) {
int jobsAcquired = acquiredJobs.getJobIdBatches().size() + acquiredJobs.getNumberOfJobsFailedToLock();
if (jobsAcquired >= acquiredJobs.getNumberOfJobsAttemptedToAcquire()) {
return false;
... | /**
* Jobs that have been acquired in previous cycles and are supposed to
* be re-submitted for execution
*/
public Map<String, List<List<String>>> getAdditionalJobsByEngine() {
return additionalJobBatchesByEngine;
}
public void setAcquisitionException(Exception e) {
this.acquisitionException = ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobAcquisitionContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getRequestDate()
{
return requestDate;
}
public void setRequestDate(String requestDate)
{
this.requestDate = requestDate;
}
public EvidenceRequest respondByDate(String respondByDate)
{
this.respondByDate = respondByDate;
return this;
}
/**
* The timestamp in this field shows the dat... | }
EvidenceRequest evidenceRequest = (EvidenceRequest)o;
return Objects.equals(this.evidenceId, evidenceRequest.evidenceId) &&
Objects.equals(this.evidenceType, evidenceRequest.evidenceType) &&
Objects.equals(this.lineItems, evidenceRequest.lineItems) &&
Objects.equals(this.requestDate, evidenceRequest.r... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\EvidenceRequest.java | 2 |
请完成以下Java代码 | public class ProductWithNoCustomsTariffUserNotificationsProducer
{
private static final AdMessageKey MSG_ProductWithNoCustomsTariff = AdMessageKey.of("M_Product_No_CustomsTariff");
public static ProductWithNoCustomsTariffUserNotificationsProducer newInstance()
{
return new ProductWithNoCustomsTariffUserNotificati... | return newUserNotificationRequest()
.recipientUserId(Env.getLoggedUserId())
.contentADMessage(MSG_ProductWithNoCustomsTariff)
.contentADMessageParam(productRef)
.targetAction(TargetRecordAction.ofRecordAndWindow(productRef, productWindowId))
.build();
}
private static TableRecordReference toTabl... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\event\ProductWithNoCustomsTariffUserNotificationsProducer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductController {
private ProductService productService;
@Autowired
public ProductController(ProductService productService) {
this.productService = productService;
}
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public void create(@RequestBody Product product) {
... | public Optional<Product> get(@PathVariable String id, @PathVariable String category) {
return productService.findById(id, category);
}
@DeleteMapping(value = "/{id}/category/{category}")
public void delete(@PathVariable String id, @PathVariable String category) {
productService.delete(id, c... | repos\tutorials-master\persistence-modules\spring-data-cosmosdb\src\main\java\com\baeldung\spring\data\cosmosdb\controller\ProductController.java | 2 |
请完成以下Java代码 | public class ScriptTaskImpl extends TaskImpl implements ScriptTask {
protected static Attribute<String> scriptFormatAttribute;
protected static ChildElement<Script> scriptChild;
/** camunda extensions */
protected static Attribute<String> camundaResultVariableAttribute;
protected static Attribute<String> c... | @Override
public ScriptTaskBuilder builder() {
return new ScriptTaskBuilder((BpmnModelInstance) modelInstance, this);
}
public String getScriptFormat() {
return scriptFormatAttribute.getValue(this);
}
public void setScriptFormat(String scriptFormat) {
scriptFormatAttribute.setValue(this, scriptF... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ScriptTaskImpl.java | 1 |
请完成以下Java代码 | public class AuthorizationFailureEvent extends AbstractAuthorizationEvent {
private final AccessDeniedException accessDeniedException;
private final Authentication authentication;
private final Collection<ConfigAttribute> configAttributes;
/**
* Construct the event.
* @param secureObject the secure object
... | this.authentication = authentication;
this.accessDeniedException = accessDeniedException;
}
public AccessDeniedException getAccessDeniedException() {
return this.accessDeniedException;
}
public Authentication getAuthentication() {
return this.authentication;
}
public Collection<ConfigAttribute> getConfig... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\event\AuthorizationFailureEvent.java | 1 |
请完成以下Java代码 | public Integer addBinaryNumber(Integer firstNum, Integer secondNum) {
StringBuilder output = new StringBuilder();
int carry = 0;
int temp;
while (firstNum != 0 || secondNum != 0) {
temp = (firstNum % 10 + secondNum % 10 + carry) % 2;
output.append(temp);
... | carry = (firstNum % 10 + onesComplement % 10 + carry) / 2;
firstNum = firstNum / 10;
onesComplement = onesComplement / 10;
}
String additionOfFirstNumAndOnesComplement = output.reverse()
.toString();
if (carry == 1) {
return addBinaryNumber(Inte... | repos\tutorials-master\core-java-modules\core-java-numbers-2\src\main\java\com\baeldung\binarynumbers\BinaryNumbers.java | 1 |
请完成以下Java代码 | public Schema getSchema() {
return Public.PUBLIC;
}
@Override
public UniqueKey<AuthorRecord> getPrimaryKey() {
return Keys.AUTHOR_PKEY;
}
@Override
public List<UniqueKey<AuthorRecord>> getKeys() {
return Arrays.<UniqueKey<AuthorRecord>>asList(Keys.AUTHOR_PKEY);
}
... | * Rename this table
*/
@Override
public Author rename(Name name) {
return new Author(name, null);
}
// -------------------------------------------------------------------------
// Row4 type methods
// -------------------------------------------------------------------------
@O... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\Author.java | 1 |
请完成以下Java代码 | public RetryConfig addExceptions(Class<? extends Throwable>... exceptions) {
this.exceptions.addAll(Arrays.asList(exceptions));
return this;
}
public Set<HttpMethod> getMethods() {
return methods;
}
public RetryConfig setMethods(Set<HttpMethod> methods) {
this.methods = methods;
return this;
... | public static class RetryException extends NestedRuntimeException {
private final ServerRequest request;
private final ServerResponse response;
RetryException(ServerRequest request, ServerResponse response) {
super(null);
this.request = request;
this.response = response;
}
public ServerRequest ge... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\RetryFilterFunctions.java | 1 |
请完成以下Java代码 | public void setDropShip_Location_ID(final int DropShip_Location_ID)
{
delegate.setDropShip_Location_ID(DropShip_Location_ID);
}
@Override
public int getDropShip_Location_Value_ID()
{
return delegate.getDropShip_Location_Value_ID();
}
@Override
public void setDropShip_Location_Value_ID(final int DropShip_L... | public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentDeliveryLocationAdapter.super.setRenderedAddressAndCapturedLocation(from);
}
@Override
public void setRenderedAddress(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentDelivery... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\location\adapter\DocumentDeliveryLocationAdapter.java | 1 |
请完成以下Java代码 | private int getParentID()
{
return parentPO != null ? parentPO.get_ID() : -1;
}
/**
* Allows other modules to install customer code to be executed each time a record was copied.
*/
@Override
public final GeneralCopyRecordSupport onRecordCopied(@NonNull final OnRecordCopiedListener listener)
{
if (!record... | return this;
}
@Override
public final CopyRecordSupport onChildRecordCopied(@NonNull final OnRecordCopiedListener listener)
{
if (!childRecordCopiedListeners.contains(listener))
{
childRecordCopiedListeners.add(listener);
}
return this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\copy_with_details\GeneralCopyRecordSupport.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HUPIItemProductId getPackingMaterialId()
{
return groupingKey.getPackingMaterialId();
}
@Override
public Set<WarehouseId> getWarehouseIds()
{
return parts.map(PackingItemPart::getWarehouseId).collect(ImmutableSet.toImmutableSet());
}
@Override
public Set<ShipmentScheduleId> getShipmentScheduleIds()... | @Nullable final Predicate<PackingItemPart> acceptPartPredicate)
{
final PackingItemParts subtractedParts = subtract(subtrahent, acceptPartPredicate);
return PackingItems.newPackingItem(subtractedParts);
}
@Override
public PackingItem copy()
{
return new PackingItem(this);
}
@Override
public String toStr... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItem.java | 2 |
请完成以下Java代码 | public void setId(Integer value) {
set(0, value);
}
/**
* Getter for <code>public.Store.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for <code>public.Store.name</code>.
*/
public void setName(String value) {
set(1, v... | // -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached StoreRecord
*/
public StoreRecord() {
super(Store.STORE);
}
/**
* Create a de... | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\records\StoreRecord.java | 1 |
请完成以下Java代码 | public Object aggregateMultiVariables(DelegatePlanItemInstance planItemInstance, List<? extends VariableInstance> instances, PlanItemVariableAggregatorContext context) {
return getPlanItemVariableAggregator().aggregateMultiVariables(planItemInstance, instances, context);
}
protected PlanItemVariableAgg... | return targetState;
}
public void setTargetState(String targetState) {
this.targetState = targetState;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public List<FieldExtension> getFi... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\CmmnClassDelegate.java | 1 |
请完成以下Java代码 | public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getAddress() {
return address;
}
pu... | public String getRating() {
return rating;
}
public void setRating(String rating) {
this.rating = rating;
}
@Override
public String toString() {
return "Author{" + "id=" + id + ", name=" + name
+ ", genre=" + genre + ", age=" + age + ", email="
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDynamicProjection\src\main\java\com\bookstore\entity\Author.java | 1 |
请完成以下Java代码 | public void setAD_Val_Rule_Included_ID (int AD_Val_Rule_Included_ID)
{
if (AD_Val_Rule_Included_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_Included_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_Included_ID, Integer.valueOf(AD_Val_Rule_Included_ID));
}
/** Get AD_Val_Rule_Included.
@re... | if (Included_Val_Rule_ID < 1)
set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Included_Val_Rule_ID, Integer.valueOf(Included_Val_Rule_ID));
}
/** Get Included_Val_Rule_ID.
@return Validation rule to be included.
*/
public int getIncluded_Val_Rule_ID ()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Included.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DataResponse<TaskResponse> bulkUpdateTasks(@RequestBody BulkTasksRequest bulkTasksRequest) {
if (bulkTasksRequest == null) {
throw new FlowableException("A request body was expected when bulk updating tasks.");
}
if (bulkTasksRequest.getTaskIds() == null) {
throw ... | // fields after it was saved so we can not use the in-memory task
taskService.bulkSaveTasks(taskList);
List<Task> taskResultList = getTasksFromRequest(bulkTasksRequest.getTaskIds());
DataResponse<TaskResponse> dataResponse = new DataResponse<>();
dataResponse.setData(restResponseFactor... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskCollectionResource.java | 2 |
请完成以下Java代码 | public class Employee {
private String lastName;
private String firstName;
private long id;
private Optional<Salary> salary;
public Employee() {
}
public Employee(final long id, final String lastName, final String firstName, final Optional<Salary> salary) {
this.id = id;
... | this.id = id;
}
public Optional<Salary> getSalary() {
return salary;
}
public void setSalary(final Optional<Salary> salary) {
this.salary = salary;
}
@Override
public String toString() {
return "Employee{" +
"lastName='" + lastName + '\'' +
... | repos\tutorials-master\spring-boot-modules\spring-boot-data-2\src\main\java\com\baeldung\jsonignore\absentfields\Employee.java | 1 |
请完成以下Java代码 | public ObjectId getId() {
return id;
}
public String getUserEmail() {
return userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickNam... | public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Account book = (Account) o;
return Object... | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\multipledb\model\Account.java | 1 |
请完成以下Java代码 | private static void addIfNotNull(ObjectNode node, String key, String value) {
if (value != null) {
node.put(key, value);
}
}
private static JsonNode mapRepository(Repository repo) {
ObjectNode node = nodeFactory.objectNode();
node.put("name", repo.getName())
.put("url", (repo.getUrl() != null) ? repo.g... | }
}
private static ObjectNode mapNode(Map<String, JsonNode> content) {
ObjectNode node = nodeFactory.objectNode();
content.forEach(node::set);
return node;
}
private ObjectNode mapDependencies(Map<String, Dependency> dependencies) {
return mapNode(dependencies.entrySet()
.stream()
.collect(Collector... | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\DependencyMetadataV21JsonMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static OAuth2TokenCustomizer<OAuth2TokenClaimsContext> getAccessTokenCustomizer(HttpSecurity httpSecurity) {
final OAuth2TokenCustomizer<OAuth2TokenClaimsContext> defaultAccessTokenCustomizer = DefaultOAuth2TokenCustomizers
.accessTokenCustomizer();
ResolvableType type = ResolvableType.forClassWithGeneri... | if (names.length > 1) {
throw new NoUniqueBeanDefinitionException(type, names);
}
throw new NoSuchBeanDefinitionException(type);
}
static <T> T getOptionalBean(HttpSecurity httpSecurity, Class<T> type) {
Map<String, T> beansMap = BeanFactoryUtils
.beansOfTypeIncludingAncestors(httpSecurity.getSharedObjec... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\server\authorization\OAuth2ConfigurerUtils.java | 2 |
请完成以下Java代码 | public void sendMessage(String message) {
//log.debug("【系统 WebSocket】广播消息:" + message);
BaseMap baseMap = new BaseMap();
baseMap.put("userId", "");
baseMap.put("message", message);
jeecgRedisClient.sendMessage(WebSocket.REDIS_TOPIC_NAME, baseMap);
}
/**
* 此为单点消息 red... | }
/**
* 此为单点消息(多人) redis
*
* @param userIds
* @param message
*/
public void sendMessage(String[] userIds, String message) {
for (String userId : userIds) {
sendMessage(userId, message);
}
}
//=======【采用redis发布订阅模式——推送消息】==============================... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\message\websocket\WebSocket.java | 1 |
请完成以下Java代码 | public void collect(@NonNull final SqlParamsCollector from)
{
collectAll(from.params);
}
/**
* Collects given SQL value and returns an SQL placeholder, i.e. "?"
*
* In case this is in non-collecting mode, the given SQL value will be converted to SQL code and it will be returned.
* The internal list won't... | return "?";
}
}
/** @return readonly live list */
public List<Object> toList()
{
return paramsRO;
}
/** @return read/write live list */
public List<Object> toLiveList()
{
return params;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlParamsCollector.java | 1 |
请完成以下Java代码 | public BPartnerLocationId getHandoverLocationId() {return packageable.getHandoverLocationId();}
public String getCustomerAddress() {return packageable.getCustomerAddress();}
public @NonNull InstantAndOrgId getPreparationDate() {return packageable.getPreparationDate();}
public @NonNull InstantAndOrgId getDeliveryD... | public @NonNull Quantity getQtyToPick()
{
return schedule != null
? schedule.getQtyToPick()
: packageable.getQtyToPick();
}
public @Nullable UomId getCatchWeightUomId() {return packageable.getCatchWeightUomId();}
public @Nullable PPOrderId getPickFromOrderId() {return packageable.getPickFromOrderId();}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageable.java | 1 |
请完成以下Java代码 | public class QueueEntity extends BaseSqlEntity<Queue> {
@Column(name = ModelConstants.QUEUE_TENANT_ID_PROPERTY)
private UUID tenantId;
@Column(name = ModelConstants.QUEUE_NAME_PROPERTY)
private String name;
@Column(name = ModelConstants.QUEUE_TOPIC_PROPERTY)
private String topic;
@Column(... | this.createdTime = queue.getCreatedTime();
this.tenantId = DaoUtil.getId(queue.getTenantId());
this.name = queue.getName();
this.topic = queue.getTopic();
this.pollInterval = queue.getPollInterval();
this.partitions = queue.getPartitions();
this.consumerPerPartition = que... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\QueueEntity.java | 1 |
请完成以下Java代码 | public boolean isState() {
return this.equals(STATE);
}
public boolean isDeath() {
return this.equals(DDEATH) || this.equals(NDEATH);
}
public boolean isCommand() {
return this.equals(DCMD) || this.equals(NCMD);
}
public boolean isData() {
return this.equals(DDATA) || this.equals(NDATA);
}
public ... | return this.equals(DRECORD) || this.equals(NRECORD);
}
public boolean isSubscribe() {
return isCommand() || isData() || isRecord();
}
public boolean isNode() {
return this.equals(NBIRTH)
|| this.equals(NCMD) || this.equals(NDATA)
||this.equals(NDEATH) || this.equals(NRECORD);
}
public boolean isDevic... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\util\sparkplug\SparkplugMessageType.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.