instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setAD_Message_ID (final int AD_Message_ID)
{
if (AD_Message_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Message_ID, null);
else
set_ValueNoCheck (COLUMNNAME_... | * MsgType AD_Reference_ID=103
* Reference name: AD_Message Type
*/
public static final int MSGTYPE_AD_Reference_ID=103;
/** Fehler = E */
public static final String MSGTYPE_Fehler = "E";
/** Information = I */
public static final String MSGTYPE_Information = "I";
/** Menü = M */
public static final String MS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Message.java | 1 |
请完成以下Java代码 | public boolean isError() { return isAborted() || isTerminated(); }
/**
* @return true if state is Aborted (Environment/Setup issue)
*/
public boolean isAborted()
{
return Aborted.equals(this);
}
/**
* @return true if state is Terminated (Execution issue)
*/
public boolean isTerminated()
{
return Te... | for (final WFAction option : options)
{
if (option.equals(action))
{
return true;
}
}
return false;
}
/**
* @return valid actions based on current State
*/
private WFAction[] getActionOptions()
{
if (isNotStarted())
return new WFAction[] { WFAction.Start, WFAction.Abort, WFAction.Termi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\WFState.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ReceiptTypeEnum getReceiptTypeEnum() {
return receiptTypeEnum;
}
public void setReceiptTypeEnum(ReceiptTypeEnum receiptTypeEnum) {
this.receiptTypeEnum = receiptTypeEnum;... | public void setTaxpayerNo(String taxpayerNo) {
this.taxpayerNo = taxpayerNo;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
@Override
public String toString() {
return "ReceiptEntity{" +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\ReceiptEntity.java | 2 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable()
{
if (!isHUEditorView())
{
return ProcessPreconditionsResolution.rejectWithInternalReason("not the HU view");
}
if (!getSelectedRowIds().isSingleDocumentId())
{
return ProcessPreconditionsResolution.rejectWithInternalReason("No (sing... | @RunOutOfTrx
protected String doIt()
{
final HUToReport hu = HUReportAwareViewRowAsHUToReport.of(getSingleSelectedRow());
huLabelService.print(HULabelPrintRequest.builder()
.sourceDocType(HULabelSourceDocType.MaterialReceipt)
.hu(hu)
.printCopiesOverride(PrintCopies.ofInt(p_copies))
.failOnMissin... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_PrintReceiptLabel.java | 1 |
请完成以下Java代码 | private String getUnqualifiedName(String name) {
if (!name.contains(".")) {
return name;
}
return name.substring(name.lastIndexOf(".") + 1);
}
private boolean isImportCandidate(CompilationUnit<?> compilationUnit, String name) {
if (name == null || !name.contains(".")) {
return false;
}
String packa... | @Override
public String statementSeparator() {
return "";
}
@Override
public CodeBlock arrayOf(CodeBlock... values) {
return CodeBlock.of("[ $L ]", CodeBlock.join(Arrays.asList(values), ", "));
}
@Override
public CodeBlock classReference(ClassName className) {
return CodeBlock.of("$T", classNam... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovySourceCodeWriter.java | 1 |
请完成以下Java代码 | protected boolean existsMembership(String userId, String groupId) {
Map<String, String> key = new HashMap<>();
key.put("userId", userId);
key.put("groupId", groupId);
return ((Long) getDbEntityManager().selectOne("selectMembershipCount", key)) > 0;
}
protected boolean existsTenantMembership(Strin... | @Override
protected void configureQuery(@SuppressWarnings("rawtypes") AbstractQuery query, Resource resource) {
Context.getCommandContext()
.getAuthorizationManager()
.configureQuery(query, resource);
}
@Override
protected void checkAuthorization(Permission permission, Resource resource, String... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbReadOnlyIdentityServiceProvider.java | 1 |
请完成以下Java代码 | private static boolean isGatewayRequest(HttpServletRequest request) {
return request.getAttribute(MvcUtils.GATEWAY_ROUTE_ID_ATTR) != null
|| request.getAttribute(MvcUtils.GATEWAY_REQUEST_URL_ATTR) != null;
}
/**
* StandardMultipartHttpServletRequest wrapper that will not parse multipart if it is
* a gatewa... | if (!isGatewayRequest(getRequest())) {
super.initializeMultipart();
}
}
@Override
public Map<String, String[]> getParameterMap() {
if (isGatewayRequest(getRequest())) {
return Collections.emptyMap();
}
return super.getParameterMap();
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayMvcMultipartResolver.java | 1 |
请完成以下Java代码 | public int getAD_Element_Link_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Element_Link_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_Field getAD_Field() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Field_ID, org.compiere.mode... | Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tab_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Window_ID, org.compiere.model.I_AD_Window.class);
}
@Override
public voi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Element_Link.java | 1 |
请完成以下Java代码 | public void setGTIN_PackingMaterial (final @Nullable java.lang.String GTIN_PackingMaterial)
{
set_Value (COLUMNNAME_GTIN_PackingMaterial, GTIN_PackingMaterial);
}
@Override
public java.lang.String getGTIN_PackingMaterial()
{
return get_ValueAsString(COLUMNNAME_GTIN_PackingMaterial);
}
@Override
public vo... | @Override
public void setM_HU_PackagingCode_Text (final @Nullable java.lang.String M_HU_PackagingCode_Text)
{
throw new IllegalArgumentException ("M_HU_PackagingCode_Text is virtual column"); }
@Override
public java.lang.String getM_HU_PackagingCode_Text()
{
return get_ValueAsString(COLUMNNAME_M_HU_Packaging... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_Desadv_Pack.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SimpleWebAuthServiceImpl implements AuthService<HttpServletRequest> {
public static final String WEB_SESSION_KEY = "session_sentinel_admin";
@Override
public AuthUser getAuthUser(HttpServletRequest request) {
HttpSession session = request.getSession();
Object sentinelUserObj =... | @Override
public boolean isSuperUser() {
return true;
}
@Override
public String getNickName() {
return username;
}
@Override
public String getLoginName() {
return username;
}
@Override
public String ge... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\auth\SimpleWebAuthServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public Credential getCredential() {
return this.credential;
}
public void setCredential(Credential credential) {
this.credential = credential;
}
public List<String> getBaseDn() {
return this.baseDn;
}
... | public static class Validation {
/**
* Whether to enable LDAP schema validation.
*/
private boolean enabled = true;
/**
* Path to the custom schema.
*/
private @Nullable Resource schema;
public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
thi... | repos\spring-boot-4.0.1\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void run(ApplicationArguments args) throws Exception {
String[] jobArguments = args.getNonOptionArgs().toArray(new String[0]);
run(jobArguments);
}
public void run(String... args) throws JobExecutionException {
logger.info("Running default command line with: " + Arrays.asList(args));
Properties proper... | private void executeRegisteredJobs(JobParameters jobParameters) throws JobExecutionException {
if (this.jobRegistry != null && StringUtils.hasText(this.jobName)) {
if (!isLocalJob(this.jobName)) {
Job job = this.jobRegistry.getJob(this.jobName);
Assert.notNull(job, () -> "No job found with name '" + this.j... | repos\spring-boot-4.0.1\module\spring-boot-batch\src\main\java\org\springframework\boot\batch\autoconfigure\JobLauncherApplicationRunner.java | 2 |
请完成以下Java代码 | public SearchResult next() throws NamingException {
return enumeration.next();
}
@Override
public boolean hasMore() throws NamingException {
return enumeration.hasMore();
}
@Override
public boolean hasMoreElements() {
return enumeration.hasMoreElements();
}
@Override
public SearchResult... | return enumeration.nextElement();
}
@Override
public void close() {
try {
if (enumeration != null) {
enumeration.close();
}
} catch (Exception e) {
// ignore silently
}
}
} | repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapSearchResults.java | 1 |
请完成以下Java代码 | public static JSONMenuNodeType ofNullable(@Nullable final MenuNodeType type)
{
if (type == null)
{
return null;
}
final JSONMenuNodeType jsonType = type2json.get(type);
if (jsonType == null)
{
throw new AdempiereException("Cannot convert " + type + " to " + JSONMenuNodeType.class);
}
return json... | .put(MenuNodeType.NewRecord, newRecord)
.put(MenuNodeType.Process, process)
.put(MenuNodeType.Report, report)
.put(MenuNodeType.Board, board)
.build();
public final MenuNodeType toMenuNodeType()
{
final MenuNodeType type = type2json.inverse().get(this);
if (type == null)
{
throw new AdempiereExc... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\datatypes\json\JSONMenuNodeType.java | 1 |
请完成以下Java代码 | public void doAfterReturning(Object ret) throws Throwable {
// 处理完请求,返回内容
System.out.println("方法的返回值 : " + ret);
}
//后置异常通知
@AfterThrowing("webLog()")
public void throwss(JoinPoint jp){
System.out.println("方法异常时执行.....");
}
//后置最终通知,final增强,不管是抛出异常或者正常退出都会执行
@After(... | }
//环绕通知,环绕增强,相当于MethodInterceptor
@Around("webLog()")
public Object arround(ProceedingJoinPoint pjp) {
System.out.println("方法环绕start.....");
try {
Object o = pjp.proceed();
System.out.println("方法环绕proceed,结果是 :" + o);
return o;
} catch (Throwabl... | repos\SpringBootBucket-master\springboot-aop\src\main\java\com\xncoding\aop\aspect\LogAspect.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer getProdState() {
return prodState;
}
public void setProdState(Integer prodState) {
this.prodState = prodState;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Str... | "id='" + id + '\'' +
", prodName='" + prodName + '\'' +
", marketPrice='" + marketPrice + '\'' +
", shopPrice='" + shopPrice + '\'' +
", stock=" + stock +
", sales=" + sales +
", weight='" + weight + '\'' +
"... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\ProdInsertReq.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean configureMessageConverters(List<MessageConverter> messageConverters) {
org.springframework.messaging.converter.MappingJackson2MessageConverter converter = new org.springframework.messaging.converter.MappingJackson2MessageConverter(
this.objectMapper);
DefaultContentTypeResolver resolver = new ... | }
@ConditionalOnMissingClass("tools.jackson.databind.json.JsonMapper")
static class NoJackson {
}
@ConditionalOnProperty(name = "spring.websocket.messaging.preferred-json-mapper", havingValue = "jackson2")
static class Jackson2Preferred {
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-websocket\src\main\java\org\springframework\boot\websocket\autoconfigure\servlet\WebSocketMessagingAutoConfiguration.java | 2 |
请完成以下Java代码 | public static EndpointId of(Environment environment, String value) {
Assert.notNull(environment, "'environment' must not be null");
return new EndpointId(migrateLegacyId(environment, value));
}
private static String migrateLegacyId(Environment environment, String value) {
if (environment.getProperty(MIGRATE_LE... | */
public static EndpointId fromPropertyValue(String value) {
return new EndpointId(value.replace("-", ""));
}
static void resetLoggedWarnings() {
loggedWarnings.clear();
}
private static void logWarning(String value) {
if (logger.isWarnEnabled() && loggedWarnings.add(value)) {
logger.warn("Endpoint ID ... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\EndpointId.java | 1 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Escalation.class, BPMN_ELEMENT_ESCALATION)
.namespaceUri(BPMN20_NS)
.extendsType(RootElement.class)
.instanceProvider(new ModelTypeInstanceProvider<Escalation>() {
pub... | public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public String getEscalationCode() {
return escalationCodeAttribute.getValue(this);
}
public void setEscalationCode(String escalationCode) {
escalationC... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\EscalationImpl.java | 1 |
请完成以下Java代码 | public Optional<AttributeKvEntry> getServerPrivateAttribute(String attribute) {
return Optional.ofNullable(serverPrivateAttributesMap.get(attribute));
}
public Optional<AttributeKvEntry> getServerPublicAttribute(String attribute) {
return Optional.ofNullable(serverPublicAttributesMap.get(attrib... | Map<String, AttributeKvEntry> map = null;
if (scope.equalsIgnoreCase(DataConstants.CLIENT_SCOPE)) {
map = clientSideAttributesMap;
} else if (scope.equalsIgnoreCase(DataConstants.SHARED_SCOPE)) {
map = serverPublicAttributesMap;
} else if (scope.equalsIgnoreCase(DataConst... | repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\rule\engine\DeviceAttributes.java | 1 |
请完成以下Java代码 | public void setDownloadURL (String DownloadURL)
{
set_Value (COLUMNNAME_DownloadURL, DownloadURL);
}
/** Get Download URL.
@return URL of the Download files
*/
public String getDownloadURL ()
{
return (String)get_Value(COLUMNNAME_DownloadURL);
}
/** Set Product Download.
@param M_ProductDownload_ID... | public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Na... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductDownload.java | 1 |
请完成以下Java代码 | public final class NamePairPredicates
{
private NamePairPredicates()
{
throw new IllegalStateException();
}
public static final INamePairPredicate ACCEPT_ALL = new INamePairPredicate()
{
@Override
public String toString()
{
return "ACCEPT_ALL";
}
@Override
public Set<String> getParameters(@Nulla... | super();
}
public INamePairPredicate build()
{
if (collectedPredicates == null || collectedPredicates.isEmpty())
{
return ACCEPT_ALL;
}
else if (collectedPredicates.size() == 1)
{
return collectedPredicates.iterator().next();
}
else
{
return new ComposedNamePairPredicate(colle... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\NamePairPredicates.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public float getSalary() { | return salary;
}
public void setSalary(float salary) {
this.salary = salary;
}
public String getDesignation() {
return designation;
}
public void setDesignation(String designation) {
this.designation = designation;
}
} | repos\Spring-Boot-Advanced-Projects-main\Springboot-Employee-Salary\src\main\java\spring\project\model\Employee.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WEBUI_M_ReceiptSchedule_SelectHUsToReverse extends ReceiptScheduleBasedProcess
{
@Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context)
{
if (!context.isSingleSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNotSin... | final I_M_ReceiptSchedule receiptSchedule = getRecord(I_M_ReceiptSchedule.class);
final List<I_M_HU> hus = ReceiptCorrectHUsProcessor.builder()
.setM_ReceiptSchedule(receiptSchedule)
.build()
.getAvailableHUsToReverse();
if (hus.isEmpty())
{
throw new AdempiereException("@NotFound@ @M_HU_ID@");
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_ReceiptSchedule_SelectHUsToReverse.java | 2 |
请完成以下Java代码 | public List<HistoricCaseInstanceQueryImpl> getOrQueryObjects() {
return orQueryObjects;
}
public String getDeploymentId() {
return deploymentId;
}
public List<String> getDeploymentIds() {
return deploymentIds;
}
public Set<String> getCaseInstanceIds() {
return ... | public List<List<String>> getSafeInvolvedGroups() {
return safeInvolvedGroups;
}
public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) {
this.safeInvolvedGroups = safeInvolvedGroups;
}
public String getRootScopeId() {
return rootScopeId;
}
public Str... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricCaseInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public String[][] toWordTagArray()
{
List<Word> wordList = toSimpleWordList();
String[][] pair = new String[2][wordList.size()];
Iterator<Word> iterator = wordList.iterator();
for (int i = 0; i < pair[0].length; i++)
{
Word word = iterator.next();
pair... | public Sentence mergeCompoundWords()
{
ListIterator<IWord> listIterator = wordList.listIterator();
while (listIterator.hasNext())
{
IWord word = listIterator.next();
if (word instanceof CompoundWord)
{
listIterator.set(new Word(word.getValu... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\document\sentence\Sentence.java | 1 |
请完成以下Java代码 | public String getCamundaMapDecisionResult() {
return camundaMapDecisionResultAttribute.getValue(this);
}
@Override
public void setCamundaMapDecisionResult(String camundaMapDecisionResult) {
camundaMapDecisionResultAttribute.setValue(this, camundaMapDecisionResult);
}
public static void registerType(... | camundaDecisionBindingAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DECISION_BINDING)
.namespace(CAMUNDA_NS)
.build();
camundaDecisionVersionAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DECISION_VERSION)
.namespace(CAMUNDA_NS)
.build();
camundaDecisionTenantIdA... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DecisionTaskImpl.java | 1 |
请完成以下Java代码 | public class WebappLogger extends BaseLogger {
public static final String PROJECT_CODE = "WEBAPP";
public static final WebappLogger INSTANCE = BaseLogger.createLogger(WebappLogger.class, PROJECT_CODE,
"org.camunda.bpm.webapp", "00");
public InvalidRequestException invalidRequestEngineNotFoundForName(Stri... | logTrace("004", "Cache validation time: {}", cacheValidationTime);
}
public void traceCacheValidationTimeUpdated(Date cacheValidationTime, Date newCacheValidationTime) {
logTrace("005", "Cache validation time updated from: {} to: {}", cacheValidationTime, newCacheValidationTime);
}
public void traceAuthen... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\WebappLogger.java | 1 |
请完成以下Java代码 | private boolean hasDraftCandidatesForPickingSlot(final PickingSlotId pickingSlotId)
{
return pickingCandidatesRepoHolder.get().hasDraftCandidatesForPickingSlot(pickingSlotId);
}
private void releaseAndSave(final I_M_PickingSlot pickingSlot)
{
pickingSlot.setC_BPartner_ID(-1);
pickingSlot.setC_BPartner_Locati... | .stream()
.map(I_M_HU::getM_HU_ID)
.map(HuId::ofRepoId)
.collect(ImmutableList.toImmutableList());
}
@Override
public ImmutableList<HuId> retrieveAvailableHUIdsToPickForShipmentSchedule(@NonNull final RetrieveAvailableHUIdsToPickRequest request)
{
final I_M_ShipmentSchedule schedule = loadOutOfTrx(re... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBL.java | 1 |
请完成以下Java代码 | public class IMPProcessorDAO extends AbstractIMPProcessorDAO
{
@Override
public List<AdempiereProcessorLog> retrieveAdempiereProcessorLogs(final org.compiere.model.I_IMP_Processor impProcessor)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(impProcessor);
final String trxName = InterfaceWrapperHelper.get... | return 0;
}
final StringBuilder sql = new StringBuilder();
sql.append("DELETE FROM " + X_IMP_ProcessorLog.Table_Name + " ");
sql.append("WHERE " + X_IMP_ProcessorLog.COLUMNNAME_IMP_Processor_ID + "=?");
if (!deleteAll)
{
sql.append(" AND (Created+" + keepLogDays + ") < now()");
}
final String trxN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\IMPProcessorDAO.java | 1 |
请完成以下Java代码 | public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Search key for the record in the format required - must be unique
*/
@Override
public java.lang.String getValue ()
{
return (java.lang.String)get_Value(COLUMNNAME_Value);
}
/** Set G... | /** Get Fach.
@return Y-Dimension, z.B. Fach
*/
@Override
public java.lang.String getY ()
{
return (java.lang.String)get_Value(COLUMNNAME_Y);
}
/** Set Ebene.
@param Z
Z-Dimension, z.B. Ebene
*/
@Override
public void setZ (java.lang.String Z)
{
set_Value (COLUMNNAME_Z, Z);
}
/** Get Ebene.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Locator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Optional<JsonRequestBPartnerUpsertItem> mapDoctor()
{
if (doctor == null)
{
return Optional.empty();
}
final JsonRequestBPartnerUpsertItem doctorUpsertRequest =
DataMapper.mapDoctorToUpsertRequest(doctor, orgCode);
bPartnerIdentifier2RelationRole.put(doctorUpsertRequest.getBpartnerIdentifier... | createdByContact.ifPresent(requestContactUpsert::requestItem);
DataMapper.userToBPartnerContact(updatedBy)
.filter(updatedByContact -> createdByContact.isEmpty() || !updatedByContact.getContactIdentifier().equals(createdByContact.get().getContactIdentifier()))
.ifPresent(requestContactUpsert::requestItem);
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\patient\BPartnerUpsertRequestProducer.java | 2 |
请完成以下Java代码 | private void addToModelUserDetails(ModelAndView model) {
log.info("================= addToModelUserDetails ============================");
String loggedUsername = SecurityContextHolder.getContext()
.getAuthentication()
.getName();
model.addObject("loggedUsername", loggedU... | View view = mv.getView();
return (view != null && view instanceof SmartView && ((SmartView) view).isRedirectView());
}
public static boolean isUserLogged() {
try {
return !SecurityContextHolder.getContext()
.getAuthentication()
.getName()
... | repos\tutorials-master\spring-security-modules\spring-security-web-mvc-custom\src\main\java\com\baeldung\web\interceptor\UserInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderId implements RepoIdAware
{
@JsonCreator
public static OrderId ofRepoId(final int repoId)
{
return new OrderId(repoId);
}
@Nullable
public static OrderId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new OrderId(repoId) : null;
}
public static int toRepoId(@Nullable final Order... | @Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(@Nullable final OrderId id1, @Nullable final OrderId id2)
{
return Objects.equals(id1, id2);
}
public TableRecordReference toRecordRef() {return TableRecordReference.of(I_C_Order.Table_Name, repoId);}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\order\OrderId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void listenToOrderEvents() {
this.eventBus.subscribe(EVENT_ORDER_READY_FOR_SHIPMENT, new EventSubscriber() {
@Override
public <E extends ApplicationEvent> void onEvent(E event) {
shipOrder(Integer.parseInt(event.getPayloadValue("order_id")));
}
... | this.orderRepository = orderRepository;
}
@Override
public EventBus getEventBus() {
return eventBus;
}
@Override
public void setEventBus(EventBus eventBus) {
this.eventBus = eventBus;
}
} | repos\tutorials-master\patterns-modules\ddd-contexts\ddd-contexts-shippingcontext\src\main\java\com\baeldung\dddcontexts\shippingcontext\service\ParcelShippingService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JunctionStateMachineConfiguration extends StateMachineConfigurerAdapter<String, String> {
@Override
public void configure(StateMachineConfigurationConfigurer<String, String> config)
throws Exception {
config
.withConfiguration()
.autoStartup(true... | .first("high", highGuard())
.then("medium", mediumGuard())
.last("low")
.and().withExternal()
.source("low").target("SF").event("end");
}
@Bean
public Guard<String, String> mediumGuard() {
return ctx -> false;
}
@Bean
publ... | repos\tutorials-master\spring-state-machine\src\main\java\com\baeldung\spring\statemachine\config\JunctionStateMachineConfiguration.java | 2 |
请完成以下Java代码 | public void addLongParameter(String name, long value) {
addParameter(name, value, Types.BIGINT, "BIGINT");
}
public void addStringListParameter(String name, List<String> value) {
addParameter(name, value, Types.VARCHAR, "VARCHAR");
}
public void addBooleanParameter(String name, boolean... | this.type = type;
this.name = name;
}
}
public TenantId getTenantId() {
return securityCtx.getTenantId();
}
public CustomerId getCustomerId() {
return securityCtx.getCustomerId();
}
public EntityType getEntityType() {
return securityCtx.getEntityTyp... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\query\SqlQueryContext.java | 1 |
请完成以下Java代码 | public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
if (!response.containsHeader(XSS_PROTECTION_HEADER)) {
response.setHeader(XSS_PROTECTION_HEADER, this.headerValue.toString());
}
}
/**
* Sets the value of the X-XSS-PROTECTION header.
* <p>
* If {@link HeaderValue#DISAB... | private final String value;
HeaderValue(String value) {
this.value = value;
}
public static @Nullable HeaderValue from(String headerValue) {
for (HeaderValue value : values()) {
if (value.toString().equals(headerValue)) {
return value;
}
}
return null;
}
@Override
public String t... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\XXssProtectionHeaderWriter.java | 1 |
请完成以下Java代码 | public boolean isParameterNextLine()
{
Object oo = get_Value(COLUMNNAME_IsParameterNextLine);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
@Override
public void setIsParameterNextLine(boolean IsParameterNextLine)... | /** Set Query Criteria Function.
@param QueryCriteriaFunction
column used for adding a sql function to query criteria
*/
public void setQueryCriteriaFunction (String QueryCriteriaFunction)
{
set_Value (COLUMNNAME_QueryCriteriaFunction, QueryCriteriaFunction);
}
/** Get Query Criteria Function.
@return c... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoColumn.java | 1 |
请完成以下Java代码 | class Manager {
@Id //
private String id;
private String name;
/**
* Uses the {@literal this.id} to look up documents in the {@literal employee} collection
* that have a matching {@literal managerId} field value.
*/
@ReadOnlyProperty
@DocumentReference(lookup="{'managerId':?#{#self._id} }")
private List<... | public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Employee> getEmployees() {
return employees;
}
public void setEmployees(List<Employee> employees) {
this.employees = employees;
}
} | repos\spring-data-examples-main\mongodb\linking\src\main\java\example\springdata\mongodb\linking\docref\jpastyle\Manager.java | 1 |
请完成以下Java代码 | public CoNLLSentence parse(List<Term> termList, int beamWidth, int numOfThreads)
{
String[] words = new String[termList.size()];
String[] tags = new String[termList.size()];
int k = 0;
for (Term term : termList)
{
words[k] = term.word;
tags[k] = term.n... | {
wordArray[i].DEPREL = parser.idWord(bestParse.state.getDependent(i + 1));
int index = bestParse.state.getHead(i + 1) - 1;
if (index < 0 || index >= wordArray.length)
{
wordArray[i].HEAD = CoNLLWord.ROOT;
}
else
{
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\parser\KBeamArcEagerDependencyParser.java | 1 |
请完成以下Java代码 | 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 void setResources(Map<String, ResourceEntity> resources) {
this.resources = resources;
}
... | @Override
public List<CaseDefinition> getDeployedCaseDefinitions() {
return deployedArtifacts == null ? null : deployedArtifacts.get(CaseDefinitionEntity.class);
}
@Override
public List<DecisionDefinition> getDeployedDecisionDefinitions() {
return deployedArtifacts == null ? null : deployedArtifacts.ge... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\DeploymentEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EventDefinitionResourceDataResource extends BaseDeploymentResourceDataResource {
@ApiOperation(value = "Get an event definition resource content", tags = { "Event Definitions" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates both event definition and resource ha... | */
protected EventDefinition getEventDefinitionFromRequest(String eventDefinitionId) {
EventDefinition eventDefinition = repositoryService.createEventDefinitionQuery().eventDefinitionId(eventDefinitionId).singleResult();
if (eventDefinition == null) {
throw new FlowableObjectNotFoundExc... | repos\flowable-engine-main\modules\flowable-event-registry-rest\src\main\java\org\flowable\eventregistry\rest\service\api\repository\EventDefinitionResourceDataResource.java | 2 |
请完成以下Java代码 | private void createAlbertaOrderRecords(
@Nullable final String orgCode,
@NonNull final OLCand olCand,
@NonNull final JsonAlbertaOrderInfo jsonAlbertaOrderInfo,
@NonNull final MasterdataProvider masterdataProvider)
{
final OLCandId olCandId = OLCandId.ofRepoId(olCand.getId());
final AlbertaOrderLineInf... | .deliveryInformation(jsonAlbertaOrderInfo.getDeliveryInformation())
.deliveryNote(jsonAlbertaOrderInfo.getDeliveryNote())
.updated(jsonAlbertaOrderInfo.getUpdated())
.orderLine(albertaOrderLineInfo)
.therapy(jsonAlbertaOrderInfo.getTherapy())
.therapyTypes(jsonAlbertaOrderInfo.getTherapyTypes())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\OrderCandidateRestControllerService.java | 1 |
请完成以下Java代码 | protected void paintTrack(final Graphics g, final JComponent c, final Rectangle r)
{
g.setColor(trackColor);
g.fillRect(r.x, r.y, r.width, r.height);
}
@Override
protected JButton createDecreaseButton(final int orientation)
{
return noButton;
}
@Override
protected JButton createIncreaseButton(final int ... | {
@Override
public void mousePressed(MouseEvent e)
{
isMouseButtonPressed = true;
super.mousePressed(e);
scrollbar.repaint(getThumbBounds());
}
@Override
public void mouseReleased(MouseEvent e)
{
isMouseButtonPressed = false;
super.mouseRelea... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\MetasFreshScrollBarUI.java | 1 |
请完成以下Java代码 | public MFSession getSessionById(final Properties ctx, final int AD_Session_ID)
{
if (AD_Session_ID <= 0)
{
return null;
}
MFSession session = getFromCache(ctx, AD_Session_ID);
// Try to load from database
if (session == null)
{
final I_AD_Session sessionPO = InterfaceWrapperHelper.create(ctx, AD_... | {
// no currently running session
return;
}
final boolean alreadyDestroyed = session.isDestroyed();
// Fire BeforeLogout event only if current session is not yet closes(i.e. processed)
if (!alreadyDestroyed)
{
ModelValidationEngine.get().fireBeforeLogout(session);
}
session.setDestroyed();
E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\session\impl\SessionBL.java | 1 |
请完成以下Java代码 | private Optional<BPartnerId> findCustomerId(final String customerName)
{
return bpartnersRepo.retrieveBPartnerIdBy(BPartnerQuery.builder()
.bpartnerName(customerName)
.build());
}
private Optional<ProductId> findProductId(final BPartnerId customerId, final String customerProductSearchString)
{
final Op... | final Optional<ProductId> productIdByProductName = bpartnerProductsRepo.getProductIdByCustomerProductName(customerId, customerProductSearchString);
if (productIdByProductName.isPresent())
{
return productIdByProductName;
}
return Optional.empty();
}
private String trl(final String message)
{
final IMs... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_product\impl\BpartnerProductRestController.java | 1 |
请完成以下Java代码 | protected AppDefinitionEntity getMostRecentVersionOfAppDefinition(AppModel appModel, String tenantId) {
AppDefinitionEntityManager appDefinitionEntityManager = CommandContextUtil.getAppDefinitionEntityManager();
AppDefinitionEntity existingAppDefinition = null;
if (tenantId != null && !tenantId.... | }
protected void updateCachingAndArtifacts(AppDefinitionEntity appDefinition, AppModel appResourceModel, AppDeploymentEntity deployment) {
AppEngineConfiguration appEngineConfiguration = CommandContextUtil.getAppEngineConfiguration();
DeploymentCache<AppDefinitionCacheEntry> appDefinitionCache ... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\deployer\AppDeployer.java | 1 |
请完成以下Java代码 | public boolean lock() {
// 系统当前时间,纳秒
long nowTime = System.nanoTime();
// 请求锁超时时间,纳秒
long timeout = timeOut * 1000000;
final Random random = new Random();
// 不断循环向Master节点请求锁,当请求时间(System.nanoTime() - nano)超过设定的超时时间则放弃请求锁
// 这个可以防止一个客户端在某个宕掉的master节点上阻塞过长时间
... | }
public boolean isLock() {
return redisTemplate.hasKey(key);
}
public void unlock() {
// 释放锁
// 不管请求锁是否成功,只要已经上锁,客户端都会进行释放锁的操作
if (isLocked) {
redisTemplate.delete(key);
}
}
} | repos\spring-boot-student-master\spring-boot-student-data-redis-distributed-lock\src\main\java\com\xiaolyuh\redis\lock\RedisLock.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ServiceProperties {
private final HttpServiceProperties httpServiceProperties = new HttpServiceProperties();
private final MemcachedServerProperties memcachedServerProperties = new MemcachedServerProperties();
private final RedisServerProperties redisServerProperties = new RedisServerProperties();
... | private static final int DEFAULT_PORT = 11211;
private int port = DEFAULT_PORT;
private EnableMemcachedServer.MemcachedProtocol protocol = EnableMemcachedServer.MemcachedProtocol.ASCII;
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
public EnableM... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\ServiceProperties.java | 2 |
请完成以下Java代码 | public class PPOrderBOMLineProductStorage extends AbstractProductStorage
{
// Services
private final transient IPPOrderBOMBL ppOrderBOMBL = Services.get(IPPOrderBOMBL.class);
private final I_PP_Order_BOMLine orderBOMLine;
private final ProductId productId;
private boolean staled = false;
public PPOrderBOMLinePr... | }
/**
* @return quantity that was already issued/received on this order BOM Line
*/
@Override
protected BigDecimal retrieveQtyInitial()
{
checkStaled();
final Quantity qtyCapacity;
final Quantity qtyToIssueOrReceive;
final BOMComponentType componentType = BOMComponentType.ofCode(orderBOMLine.getCompon... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\PPOrderBOMLineProductStorage.java | 1 |
请完成以下Java代码 | public ShipperGatewayId getShipperGatewayId()
{
return DhlConstants.SHIPPER_GATEWAY_ID;
}
@Override
public ShipperGatewayClient newClientForShipperId(@NonNull final ShipperId shipperId)
{
final DhlClientConfig config = configRepo.getByShipperId(shipperId);
// Create the RestTemplate configured with OAuth2
... | }
/**
* Creates a RestTemplate configured to authenticate with OAuth2 using the provided DhlClientConfig.
*/
private RestTemplate buildOAuth2RestTemplate(final DhlClientConfig clientConfig)
{
final RestTemplate restTemplate = new RestTemplate();
// Add the CustomOAuth2TokenRetriever to handle DHL's OAuth2 ... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\DhlShipperGatewayClientFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void validateEvent(@NonNull final PurchaseCandidateAdvisedEvent event)
{
// nothing to do; the event was already validated on construction time
}
/**
* Create a supply candidate
*/
@Override
public void handleEvent(@NonNull final PurchaseCandidateAdvisedEvent event)
{
final SupplyRequiredDescripto... | }
// put out data into the new or preexisting candidate
final Candidate supplyCandidate = candidateBuilder
.clientAndOrgId(event.getClientAndOrgId())
.id(CandidateId.ofRepoIdOrNull(supplyRequiredDescriptor.getSupplyCandidateId()))
.type(CandidateType.SUPPLY)
.businessCase(CandidateBusinessCase.PURC... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\purchasecandidate\PurchaseCandidateAdvisedHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PlainParametersDAO extends AbstractParametersDAO
{
@Override
public IParameterPO newParameterPO(final Object parent, final String parameterTable)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(parent);
final String trxName = InterfaceWrapperHelper.getTrxName(parent);
final IParameterPO pa... | {
final IParameterPO paramPO = InterfaceWrapperHelper.create(rawRecord, IParameterPO.class);
if (!POJOWrapper.getWrapper(paramPO).hasColumnName(parentLinkColumnName))
{
continue;
}
final Optional<Integer> currentParentId = InterfaceWrapperHelper.getValue(paramPO, parentLinkColumnName);
if (!curr... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\PlainParametersDAO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CandidateSaveResult onCandidateNewOrChange(
@NonNull final Candidate candidate,
@NonNull final OnNewOrChangeAdvise advise)
{
if (!advise.isAttemptUpdate())
{
throw new AdempiereException("This handler does not how to deal with isAttemptUpdate=false").appendParametersToMessage()
.setParameter("... | materialEventService.enqueueEventAfterNextCommit(supplyRequiredEvent); // want to avoid the situation that some response comes back before the data here was even committed to DB
}
//return candidateWithQtyDeltaAndId;
return candidateSaveResult;
}
@Override
public void onCandidateDelete(@NonNull final Candida... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\candidatechange\handler\StockUpCandiateHandler.java | 2 |
请完成以下Java代码 | public int getPP_Plant_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Plant_ID);
}
@Override
public void setReplenishmentClass (final @Nullable java.lang.String ReplenishmentClass)
{
set_Value (COLUMNNAME_ReplenishmentClass, ReplenishmentClass);
}
@Override
public java.lang.String getReplenishmentClass()
{... | set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
return get_ValueAsString(COLUMNNAME_Value);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_Value (COLUMNNAME_AD_User_ID, null);
else
set_Value (COLUMNNAME_AD_User_ID, AD_U... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse.java | 1 |
请完成以下Java代码 | public void setISO_Code (java.lang.String ISO_Code)
{
set_ValueNoCheck (COLUMNNAME_ISO_Code, ISO_Code);
}
/** Get ISO Währungscode.
@return Three letter ISO 4217 Code of the Currency
*/
@Override
public java.lang.String getISO_Code ()
{
return (java.lang.String)get_Value(COLUMNNAME_ISO_Code);
}
/** ... | {
set_ValueNoCheck (COLUMNNAME_Phone, Phone);
}
/** Get Telefon.
@return Beschreibt eine Telefon Nummer
*/
@Override
public java.lang.String getPhone ()
{
return (java.lang.String)get_Value(COLUMNNAME_Phone);
}
/** Set Steuer-ID.
@param TaxID
Tax Identification
*/
@Override
public void setT... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponse_v.java | 1 |
请完成以下Java代码 | public long getId() {
return id;
}
public void setId(final long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public long getVersion() {
return version;
}
pu... | }
@Override
public boolean equals(final Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final Foo other = (Foo) obj;
if (name == null) {
if (other.n... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\mime\Foo.java | 1 |
请完成以下Java代码 | protected void adoptElement(DomXmlElement elementToAdopt) {
Document document = this.domElement.getOwnerDocument();
Element element = elementToAdopt.domElement;
if (!document.equals(element.getOwnerDocument())) {
Node node = document.adoptNode(element);
if (node == null) {
throw LOG.una... | * Returns a XPath Factory
*
* @return the XPath factory
*/
protected XPathFactory getXPathFactory() {
if (cachedXPathFactory == null) {
cachedXPathFactory = XPathFactory.newInstance();
}
return cachedXPathFactory;
}
public <C> C mapTo(Class<C> javaClass) {
DataFormatMapper mapper =... | repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\DomXmlElement.java | 1 |
请完成以下Java代码 | public CaseFileItemTransition getStandardEvent() {
CaseFileItemTransitionStandardEvent child = standardEventChild.getChild(this);
return child.getValue();
}
public void setStandardEvent(CaseFileItemTransition standardEvent) {
CaseFileItemTransitionStandardEvent child = standardEventChild.getChild(this)... | });
sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF)
.idAttributeReference(CaseFileItem.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
standardEventChild = sequenceBuilder.element(CaseFileItemTransitionStandardEvent.class)
.bu... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemOnPartImpl.java | 1 |
请完成以下Java代码 | public String getDelay() {
return delay;
}
public void setDelay(String delay) {
this.delay = delay;
}
public String getMaxDelay() {
return maxDelay;
}
public void setMaxDelay(String maxDelay) {
this.maxDelay = maxDelay;
... | protected String topic;
protected Collection<String> partitions;
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public Collection<String> getPartitions() {
return partitions;
... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\KafkaInboundChannelModel.java | 1 |
请完成以下Java代码 | public Optional<BPartnerId> getBPartnerId(final IdentifierString bpartnerIdentifier, final OrgId orgId)
{
final BPartnerQuery query = createBPartnerQuery(bpartnerIdentifier, orgId);
return bpartnersRepo.retrieveBPartnerIdBy(query);
}
private static BPartnerQuery createBPartnerQuery(@NonNull final IdentifierStri... | .bpartnerValue(bpartnerIdentifier.asValue())
.build();
}
else if (Type.GLN.equals(type))
{
return builder
.gln(bpartnerIdentifier.asGLN())
.build();
}
else
{
throw new AdempiereException("Invalid bpartnerIdentifier: " + bpartnerIdentifier);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_pricelist\BpartnerPriceListServicesFacade.java | 1 |
请完成以下Java代码 | public class SysDepartModel {
/**ID*/
private String id;
/**父机构ID*/
private String parentId;
/**机构/部门名称*/
private String departName;
/**英文名*/
private String departNameEn;
/**缩写*/
private String departNameAbbr;
/**排序*/
private Integer departOrder;
/**描述*/
private S... | public void setDepartOrder(Integer departOrder) {
this.departOrder = departOrder;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getOrgCategory() {
return... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysDepartModel.java | 1 |
请完成以下Java代码 | private static class DiscoveredJmxOperationParameter implements JmxOperationParameter {
private final String name;
private final Class<?> type;
private final @Nullable String description;
DiscoveredJmxOperationParameter(OperationParameter operationParameter) {
this.name = operationParameter.getName();
... | @Override
public String toString() {
StringBuilder result = new StringBuilder(this.name);
if (this.description != null) {
result.append(" (").append(this.description).append(")");
}
result.append(":").append(this.type);
return result.toString();
}
}
/**
* Utility to convert to JMX supported... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\jmx\annotation\DiscoveredJmxOperation.java | 1 |
请完成以下Java代码 | public boolean closeIt()
{
fireDocValidateEvent(ModelValidator.TIMING_BEFORE_CLOSE);
handler.closeIt(model);
fireDocValidateEvent(ModelValidator.TIMING_AFTER_CLOSE);
return true;
}
@Override
public void unCloseIt()
{
fireDocValidateEvent(ModelValidator.TIMING_BEFORE_UNCLOSE);
handler.unCloseIt(model);... | @Override
public BigDecimal getApprovalAmt()
{
return handler.getApprovalAmt(model);
}
@Override
public int getAD_Client_ID()
{
return model.getAD_Client_ID();
}
@Override
public int getAD_Org_ID()
{
return model.getAD_Org_ID();
}
@Override
public String getDocAction()
{
return model.getDocActi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java | 1 |
请完成以下Java代码 | public List<HistoricCaseInstanceEntity> findHistoricCaseInstancesByCaseDefinitionId(String caseDefinitionId) {
return dataManager.findHistoricCaseInstancesByCaseDefinitionId(caseDefinitionId);
}
@Override
public List<String> findHistoricCaseInstanceIdsByParentIds(Collection<String> caseInstanceIds)... | @Override
public long countByCriteria(HistoricCaseInstanceQuery query) {
return dataManager.countByCriteria((HistoricCaseInstanceQueryImpl) query);
}
@Override
public void deleteHistoricCaseInstances(HistoricCaseInstanceQueryImpl historicCaseInstanceQuery) {
dataManager.deleteHistor... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\HistoricCaseInstanceEntityManagerImpl.java | 1 |
请完成以下Java代码 | public boolean isLeftValue() {
return false;
}
public boolean isMethodInvocation() {
return true;
}
public final ValueReference getValueReference(Bindings bindings, ELContext context) {
return null;
}
@Override
public void appendStructure(StringBuilder builder, Bin... | return result;
}
@Override
public Object eval(Bindings bindings, ELContext context) {
return eval(bindings, context, true);
}
public Object invoke(
Bindings bindings,
ELContext context,
Class<?> returnType,
Class<?>[] paramTypes,
Object[] paramValues... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstMethod.java | 1 |
请完成以下Java代码 | public void actionPerformed(ActionEvent e)
{
log.debug("actionPerformed - Text:" + getHtmlText());
if (e.getActionCommand().equals(ConfirmPanel.A_OK))
{
m_text = editor.getHtmlText();
m_isPressedOK = true;
dispose();
}
else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL))
{
dispose();
... | log.info("Converted html to plain text: "+text);
}
}
return text;
}
public void setHtmlText(String htmlText)
{
m_text = htmlText;
editor.setHtmlText(htmlText);
}
public boolean isPressedOK()
{
return m_isPressedOK ;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditorDialog.java | 1 |
请完成以下Java代码 | public Builder addPermissionRecursively(final OrgPermission oa)
{
if (hasPermission(oa))
{
return this;
}
addPermission(oa, CollisionPolicy.Override);
// Do we look for trees?
final AdTreeId adTreeOrgId = getOrgTreeId();
if (adTreeOrgId == null)
{
return this;
}
final OrgResour... | final OrgId orgId = OrgId.ofRepoId(rs.getInt(2));
final boolean isGroupingOrg = StringUtils.toBoolean(rs.getString(3));
final OrgResource resource = OrgResource.of(clientId, orgId, isGroupingOrg);
final OrgPermission childOrgPermission = oa.copyWithResource(resource);
addPermissionRecursively(childO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\OrgPermissions.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonManufacturingOrderEvent
{
//
// Activity Identifier
@NonNull String wfProcessId;
@NonNull String wfActivityId;
@Value
@Builder
@Jacksonized
public static class IssueTo
{
@NonNull String issueStepId;
@NonNull String huQRCode;
@Nullable BigDecimal huWeightGrossBeforeIssue;
@NonNull BigD... | @Value
@Builder
@Jacksonized
public static class PickTo
{
@NonNull String wfProcessId;
@NonNull String activityId;
@NonNull String lineId;
}
@Nullable PickTo pickTo;
@Builder
@Jacksonized
private JsonManufacturingOrderEvent(
@NonNull final String wfProcessId,
@NonNull final String wfActivityId,
... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\rest_api\json\JsonManufacturingOrderEvent.java | 2 |
请完成以下Java代码 | public @Nullable Duration getMaxAge() {
return this.maxAge;
}
public void setMaxAge(@Nullable Duration maxAge) {
this.maxAge = maxAge;
}
public @Nullable SameSite getSameSite() {
return this.sameSite;
}
public void setSameSite(@Nullable SameSite sameSite) {
this.sameSite = sameSite;
}
public @Nullab... | /**
* SameSite attribute will be set to None. Cookies are sent in both first-party
* and cross-origin requests.
*/
NONE("None"),
/**
* SameSite attribute will be set to Lax. Cookies are sent in a first-party
* context, also when following a link to the origin site.
*/
LAX("Lax"),
/**
* Sa... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\Cookie.java | 1 |
请完成以下Java代码 | public class Product {
private String name;
private String description;
private Double price;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description; | }
public void setDescription(String description) {
this.description = description;
}
public Double getPrice() {
return price;
}
public void setPrice(Double price) {
this.price = price;
}
} | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\mvc_mvp\mvp\Product.java | 1 |
请完成以下Java代码 | public B authorizationRequestUri(String authorizationRequestUri) {
this.authorizationRequestUri = authorizationRequestUri;
return getThis();
}
/**
* A {@code Function} to be provided a {@code UriBuilder} representation of the
* OAuth 2.0 Authorization Request allowing for further customizations.
* @... | parameters.put(OAuth2ParameterNames.CLIENT_ID, this.clientId);
if (!CollectionUtils.isEmpty(this.scopes)) {
parameters.put(OAuth2ParameterNames.SCOPE, StringUtils.collectionToDelimitedString(this.scopes, " "));
}
if (this.state != null) {
parameters.put(OAuth2ParameterNames.STATE, this.state);
}
... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\endpoint\OAuth2AuthorizationRequest.java | 1 |
请完成以下Java代码 | public void setImplementationType(String implementationType) {
implementationTypeAttribute.setValue(this, implementationType);
}
public Collection<InputProcessParameter> getInputs() {
return inputCollection.get(this);
}
public Collection<OutputProcessParameter> getOutputs() {
return outputCollecti... | implementationTypeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_IMPLEMENTATION_TYPE)
.defaultValue("http://www.omg.org/spec/CMMN/ProcessType/Unspecified")
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
inputCollection = sequenceBuilder.elementCollection(InputProce... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ProcessImpl.java | 1 |
请完成以下Java代码 | public LocalDateAndOrgId getValueAsLocalDateOrNull(@NonNull final String columnName)
{
@NonNull final PO docLinePO = getPO();
final int index = docLinePO.get_ColumnIndex(columnName);
if (index < 0)
{
return null;
}
final Timestamp ts = docLinePO.get_ValueAsTimestamp(index);
if (ts == null)
{
ret... | .add("description", getDescription())
.add("productId", getProductId())
.add("qty", getQty())
.add("amtSource", getAmtSource())
.toString();
}
/**
* Is Tax Included
*
* @return true if tax is included in amounts
*/
public final boolean isTaxIncluded()
{
return _taxIncluded;
} // isTax... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AppConfig implements WebMvcConfigurer {
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("index");
}
/**
* Static resource locations including themes
*/
@Override
public void addResourceHandlers(ResourceHan... | /**
* Configuration for async thread bean
*
* More: https://docs.spring.io/autorepo/docs/spring-framework/5.0.3.RELEASE/javadoc-api/org/springframework/scheduling/SchedulingTaskExecutor.html
*/
@Bean
public Executor asyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTa... | repos\tutorials-master\ethereum\src\main\java\com\baeldung\web3j\config\AppConfig.java | 2 |
请完成以下Java代码 | private static class ChangesCollector
{
private final ContactPersonsEventBus contactPersonsEventBus;
private HashMap<ContactPersonId, ContactPerson> contacts = new HashMap<>();
private ChangesCollector(@NonNull final ContactPersonsEventBus contactPersonsEventBus)
{
this.contactPersonsEventBus = contactPer... | }
public void commit()
{
if (contacts == null)
{
return;
}
final ImmutableList<ContactPerson> contacts = ImmutableList.copyOf(this.contacts.values());
this.contacts = null;
if (contacts.isEmpty())
{
return;
}
contactPersonsEventBus.notifyChanged(contacts);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\interceptor\MKTG_ContactPerson.java | 1 |
请完成以下Java代码 | private static int getDisplayType(@NonNull final MColumn column, @NonNull final I_EXP_FormatLine formatLine)
{
if (formatLine.getAD_Reference_Override_ID() > 0)
{
return formatLine.getAD_Reference_Override_ID();
}
return column.getAD_Reference_ID();
}
private void createAttachment(@NonNull final CreateA... | catch (final Exception exception)
{
throw AdempiereException.wrapIfNeeded(exception);
}
}
private static String writeDocumentToString(@NonNull final Document document) throws TransformerException
{
final TransformerFactory tranFactory = TransformerFactory.newInstance();
final Transformer aTransformer = t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\process\rpl\exp\ExportHelper.java | 1 |
请完成以下Java代码 | public KeyInfoType getKeyInfo() {
return keyInfo;
}
/**
* Sets the value of the keyInfo property.
*
* @param value
* allowed object is
* {@link KeyInfoType }
*
*/
public void setKeyInfo(KeyInfoType value) {
this.keyInfo = value;
}
/*... | }
return this.object;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\SignatureType.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
} | public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchInsertsCompletableFuture\src\main\java\com\bookstore\entity\Author.java | 1 |
请完成以下Java代码 | private DirContextOperations bindWithDn(String userDnStr, String username, String password, Attributes attrs) {
BaseLdapPathContextSource ctxSource = (BaseLdapPathContextSource) getContextSource();
Name userDn = LdapUtils.newLdapName(userDnStr);
Name fullDn = LdapUtils.prepend(userDn, ctxSource.getBaseLdapName())... | * logger.
*/
protected void handleBindException(String userDn, String username, Throwable cause) {
logger.trace(LogMessage.format("Failed to bind as %s", userDn), cause);
}
/**
* Set whether javax-based bind exceptions should also be delegated to
* {@code #handleBindException} (only Spring-based bind except... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\authentication\BindAuthenticator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private boolean isNotSupported(Throwable ex) {
return ex instanceof CommandNotFoundException;
}
private boolean checkIfSupported(String app, String ip, int port) {
try {
return Optional.ofNullable(appManagement.getDetailApp(app))
.flatMap(e -> e.getMachine(ip, port))... | return Result.ofFail(-1, "ip cannot be empty");
}
if (request.getPort() == null || request.getPort() < 0) {
return Result.ofFail(-1, "invalid port");
}
if (request.getMode() == null || request.getMode() < 0) {
return Result.ofFail(-1, "invalid mode");
}
... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\controller\cluster\ClusterConfigController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class OAuth2ClientMapperProvider {
@Autowired
@Qualifier("basicOAuth2ClientMapper")
private OAuth2ClientMapper basicOAuth2ClientMapper;
@Autowired
@Qualifier("customOAuth2ClientMapper")
private OAuth2ClientMapper customOAuth2ClientMapper;
@Autowired
@Qualifier("githubOAuth2Clie... | public OAuth2ClientMapper getOAuth2ClientMapperByType(MapperType oauth2MapperType) {
switch (oauth2MapperType) {
case CUSTOM:
return customOAuth2ClientMapper;
case BASIC:
return basicOAuth2ClientMapper;
case GITHUB:
return githu... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\oauth2\OAuth2ClientMapperProvider.java | 2 |
请完成以下Java代码 | public <T extends ModelElementInstance> T getModelElementById(String id) {
if (id == null) {
return null;
}
DomElement element = document.getElementById(id);
if(element != null) {
return (T) ModelUtil.getModelElement(element, this);
} else {
return null;
}
}
public Collec... | }
@SuppressWarnings("unchecked")
public <T extends ModelElementInstance> Collection<T> getModelElementsByType(Class<T> referencingClass) {
return (Collection<T>) getModelElementsByType(getModel().getType(referencingClass));
}
@Override
public ModelInstance clone() {
return new ModelInstanceImpl(mo... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\ModelInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Article editContent(User requester, Article article, String content) {
if (article.isNotAuthor(requester)) {
throw new IllegalArgumentException("you can't edit articles written by others.");
}
article.setContent(content);
return articleRepository.save(article);
}
... | articleFavoriteRepository.save(new ArticleFavorite(requester, article));
}
/**
* Unfavorite article.
*
* @param requester user who requested
* @param article article
*/
public void unfavorite(User requester, Article article) {
if (!this.isFavorite(requester, article)) {
... | repos\realworld-java21-springboot3-main\module\core\src\main\java\io\zhc1\realworld\service\ArticleService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private ImmutableSet<BPartnerId> getIdsByQuery(@NonNull final BPartnerQuery query)
{
return bpartnersRepo.retrieveBPartnerIdsBy(query);
}
public ImmutableList<BPartnerComposite> getByIds(@NonNull final Collection<BPartnerId> bpartnerIds)
{
final Collection<BPartnerComposite> bpartnerComposites = bpartnerCompos... | .userRoleRepository(userRoleRepository)
.bPartnerCreditLimitRepository(bPartnerCreditLimitRepository)
.build();
return loader.retrieveByIds(bpartnerIds);
}
/**
* @param validatePermissions Use-Case for {@code false}: when transferring a customer to another org, the user who does the transfer might not h... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\repository\BPartnerCompositeRepository.java | 2 |
请完成以下Java代码 | public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public void setProcessDefinitionKey(String processDefinitionKey) {
this.processDefinitionKey = processDefinitionKey;
}
public String getJobDefinitionId() {
return jobDefinitionId;
}
public void setJobDefinitionId(String ... | }
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public String getExternalTaskId() {
return externalTaskId;
}
public void setExternalTaskId(String externalTaskId) {
this.externalTaskId = externalTaskId;
}
public St... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntry.java | 1 |
请完成以下Java代码 | public HistoricCaseDefinitionRestService getCaseDefinitionService() {
return new HistoricCaseDefinitionRestServiceImpl(getObjectMapper(), getProcessEngine());
}
public UserOperationLogRestService getUserOperationLogRestService() {
return new UserOperationLogRestServiceImpl(getObjectMapper(), getProcessEngi... | public HistoricJobLogRestService getJobLogService() {
return new HistoricJobLogRestServiceImpl(getObjectMapper(), getProcessEngine());
}
public HistoricDecisionInstanceRestService getDecisionInstanceService() {
return new HistoricDecisionInstanceRestServiceImpl(getObjectMapper(), getProcessEngine());
}
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoryRestServiceImpl.java | 1 |
请完成以下Java代码 | public void setPA_ReportSource_ID (int PA_ReportSource_ID)
{
if (PA_ReportSource_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_ReportSource_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_ReportSource_ID, Integer.valueOf(PA_ReportSource_ID));
}
/** Get Report Source.
@return Restriction of what will be show... | */
public int getUserElement1_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UserElement1_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set User Element 2.
@param UserElement2_ID
User defined accounting Element
*/
public void setUserElement2_ID (int UserElement2_ID)
{
if (Us... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportSource.java | 1 |
请完成以下Java代码 | public class ListQueryParameterObject implements Serializable {
private static final long serialVersionUID = 1L;
protected AuthorizationCheck authCheck = new AuthorizationCheck();
protected TenantCheck tenantCheck = new TenantCheck();
protected List<QueryOrderingProperty> orderingProperties = new ArrayList<Q... | public String getDatabaseType() {
return databaseType;
}
public AuthorizationCheck getAuthCheck() {
return authCheck;
}
public void setAuthCheck(AuthorizationCheck authCheck) {
this.authCheck = authCheck;
}
public TenantCheck getTenantCheck() {
return tenantCheck;
}
public void setTe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\ListQueryParameterObject.java | 1 |
请完成以下Java代码 | public static final StandardDocumentReportType ofProcessIdOrNull(@Nullable final AdProcessId adProcessId)
{
if (adProcessId == null)
{
return null;
}
else if (adProcessId.getRepoId() == 110)
{
return StandardDocumentReportType.ORDER;
}
else if (adProcessId.getRepoId() == 116)
{
return Standard... | }
if (adProcessId.getRepoId() == 53044) // Rpt DD_Order
{
return StandardDocumentReportType.DISTRIBUTION_ORDER;
}
else
{
return null;
}
}
@Nullable
public static StandardDocumentReportType ofTableNameOrNull(@NonNull final String tableName)
{
for (StandardDocumentReportType type : values())
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\StandardDocumentReportType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MetricFilter implements Filter {
@Autowired
private InMemoryMetricService metricService;
@Autowired
private CustomActuatorMetricService actMetricService;
@Override
public void init(final FilterConfig config) {
if (metricService == null || actMetricService == null) {
... | }
@Override
public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws java.io.IOException, ServletException {
final HttpServletRequest httpRequest = ((HttpServletRequest) request);
final String req = httpRequest.getMethod() + " " + httpRe... | repos\tutorials-master\spring-boot-modules\spring-boot-actuator\src\main\java\com\baeldung\metrics\filter\MetricFilter.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void groupOrderLinesIfNeeded(@NonNull final QuotationLinesGroupAggregator linesGroup)
{
final GroupTemplate groupTemplate = linesGroup.getGroupTemplate();
if (groupTemplate == null)
{
return;
}
final ImmutableList<OrderLineId> orderLineIds = getOrderLineIds(linesGroup);
if (orderLineIds.isEmpty... | return OtherLinesAggregator.builder()
.priceCalculator(priceCalculator)
.build();
}
else
{
throw new AdempiereException("Unknown key type: " + key);
}
}
private OrderFactory newOrderFactory()
{
return OrderFactory.newSalesOrder()
.docType(quotationDocTypeId)
.orgId(pricingInfo.getOrg... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\createQuotationFromProjectCommand\QuotationAggregator.java | 2 |
请完成以下Java代码 | public final class PickingBOMsReversedIndex
{
public static PickingBOMsReversedIndex EMPTY = new PickingBOMsReversedIndex();
public static PickingBOMsReversedIndex ofBOMProductIdsByComponentId(final SetMultimap<ProductId, ProductId> bomProductIdsByComponentId)
{
return !bomProductIdsByComponentId.isEmpty()
? ... | {
return bomProductIdsByComponentId.get(componentId);
}
public ImmutableSet<ProductId> getBOMProductIdsByComponentIds(@NonNull final Collection<ProductId> componentIds)
{
if (!componentIds.isEmpty())
{
return componentIds.stream()
.flatMap(componentId -> getBOMProductIdsByComponentId(componentId).stre... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\picking_bom\PickingBOMsReversedIndex.java | 1 |
请完成以下Java代码 | private void assertDailyFlatrateDataEntriesAreFullyAllocated(final I_C_Flatrate_Term contract)
{
for (final DailyFlatrateDataEntry entry : _flatrateDataEntriesByDay.values())
{
if (!entry.isFullyAllocated())
{
throw new AdempiereException("Daily entry shall be fully allocated: " + entry
+ "\n Contr... | {
return day;
}
public void addQtyPlanned(final BigDecimal qtyPlannedToAdd)
{
if (qtyPlannedToAdd == null || qtyPlannedToAdd.signum() == 0)
{
return;
}
qtyPlanned = qtyPlanned.add(qtyPlannedToAdd);
}
public BigDecimal allocateQtyPlanned()
{
final BigDecimal qtyPlannedToAllocate = qt... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\PMMContractBuilder.java | 1 |
请完成以下Java代码 | public I_C_UOM getC_UOM()
{
return uom;
}
private int getC_UOM_ID()
{
final int uomId = uom == null ? -1 : uom.getC_UOM_ID();
return uomId > 0 ? uomId : -1;
}
public I_M_Locator getM_Locator()
{
return locator;
}
private int getM_Locator_ID()
{
final int locatorId = locator == null ? -1 : locator... | addSources(candidateToAdd.getSources());
}
public void addSourceIfNotNull(final IHUPackingMaterialCollectorSource huPackingMaterialCollectorSource)
{
if (huPackingMaterialCollectorSource != null)
{
sources.add(huPackingMaterialCollectorSource);
}
}
private void addSources(final Set<IHUPackingMaterialCol... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\spi\impl\HUPackingMaterialDocumentLineCandidate.java | 1 |
请完成以下Java代码 | public static void removeSession(Session session) {
// 从 SESSION_USER_MAP 中移除
String user = SESSION_USER_MAP.remove(session);
// 从 USER_SESSION_MAP 中移除
if (user != null && user.length() > 0) {
USER_SESSION_MAP.remove(user);
}
}
// ========== 消息相关 ==========
... | Session session = USER_SESSION_MAP.get(user);
if (session == null) {
LOGGER.error("[send][user({}) 不存在对应的 session]", user);
return false;
}
// 发送消息
send(session, type, message);
return true;
}
/**
* 构建完整的消息
*
* @param type 消息类型
... | repos\SpringBoot-Labs-master\lab-25\lab-websocket-25-01\src\main\java\cn\iocoder\springboot\lab25\springwebsocket\util\WebSocketUtil.java | 1 |
请完成以下Java代码 | public class UserCredentials extends BaseDataWithAdditionalInfo<UserCredentialsId> {
@Serial
private static final long serialVersionUID = -2108436378880529163L;
private UserId userId;
private boolean enabled;
private String password;
private String activateToken;
private Long activateToken... | @JsonIgnore
public long getActivationTokenTtl() {
return activateTokenExpTime != null ? Math.max(activateTokenExpTime - System.currentTimeMillis(), 0) : 0;
}
@JsonIgnore
public boolean isResetTokenExpired() {
return getResetTokenTtl() == 0;
}
@JsonIgnore
public long getRese... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\security\UserCredentials.java | 1 |
请完成以下Java代码 | public String getUOMSymbol(@NonNull final UomId uomId)
{
final I_C_UOM uom = uomsRepo.getById(uomId);
return uom.getUOMSymbol();
}
@NonNull
public String getX12DE355(@NonNull final UomId uomId)
{
final I_C_UOM uom = uomsRepo.getById(uomId);
return uom.getX12DE355();
}
public List<I_C_BPartner_Product> ... | return productsRepo.streamAllProductCategories();
}
public List<I_C_BPartner> getPartnerRecords(@NonNull final ImmutableSet<BPartnerId> manufacturerIds)
{
return queryBL.createQueryBuilder(I_C_BPartner.class)
.addInArrayFilter(I_C_BPartner.COLUMN_C_BPartner_ID, manufacturerIds)
.create()
.list();
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\product\ProductsServicesFacade.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SyncUser implements IConfirmableDTO
{
String uuid;
boolean deleted;
long syncConfirmationId;
String email;
String password;
String language;
@JsonCreator
@Builder(toBuilder = true)
public SyncUser(
@JsonProperty("uuid") final String uuid,
@JsonProperty("deleted") final boolean deleted,
... | this.password = password;
this.language = language;
}
@Override
public String toString()
{
return "SyncUser [email=" + email
+ ", password=" + (password != null && !password.isEmpty() ? "********" : "(none)")
+ ", language=" + language
+ "]";
}
@Override
public IConfirmableDTO withNotDeleted()
... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-procurement\src\main\java\de\metas\common\procurement\sync\protocol\dto\SyncUser.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.