instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class IncidentDto {
protected String id;
protected String processDefinitionId;
protected String processInstanceId;
protected String executionId;
protected Date incidentTimestamp;
protected String incidentType;
protected String activityId;
protected String failedActivityId;
protected String cau... | return rootCauseIncidentId;
}
public String getConfiguration() {
return configuration;
}
public String getIncidentMessage() {
return incidentMessage;
}
public String getTenantId() {
return tenantId;
}
public String getJobDefinitionId() {
return jobDefinitionId;
}
public String g... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\IncidentDto.java | 1 |
请完成以下Java代码 | public Duration getTotalSetupTimeReal(@NonNull final PPOrderRoutingActivity activity, @NonNull final CostCollectorType costCollectorType)
{
return computeDuration(activity, costCollectorType, I_PP_Cost_Collector.COLUMNNAME_SetupTimeReal);
}
@Override
public Duration getDurationReal(@NonNull final PPOrderRoutingA... | .aggregate(durationColumnName, Aggregate.SUM, BigDecimal.class);
if (duration == null)
{
duration = BigDecimal.ZERO;
}
final int durationInt = duration.setScale(0, RoundingMode.UP).intValueExact();
return Duration.of(durationInt, activity.getDurationUnit().getTemporalUnit());
}
@Override
public void... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\impl\PPCostCollectorDAO.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID()
{
return resource.getAD_Table_ID();
}
public int getAD_Column_ID()
{
return resource.getAD_Column_ID();
}
public static class Builder
{
private TableColumnResource resource;
private final Set<Access> accesses = new LinkedHashSet<>();
public TableColumnPermission build()
... | }
public final Builder removeAccess(final Access access)
{
accesses.remove(access);
return this;
}
public final Builder setAccesses(final Set<Access> acceses)
{
accesses.clear();
accesses.addAll(acceses);
return this;
}
public final Builder addAccesses(final Set<Access> acceses)
{
a... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\TableColumnPermission.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setHeaders(Map<String, List<String>> headers) {
this.headers = headers;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getExceptionMsg() {
return exceptionMsg;
}
public Exception getException() {
retur... | }
public boolean isSuccess(){
return statusCode==200;
}
public boolean isError(){
return exception!=null;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpResult.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class XmlTiers
{
public enum Tiers
{
GARANT, PAYANT
}
@NonNull
Tiers type;
@Nullable
Duration paymentPeriod;
@NonNull
XmlBiller biller;
@Nullable
XmlDebitor debitor;
@NonNull
XmlProvider provider;
@Nullable
XmlInsurance insurance;
@NonNull | XmlPatient patient;
@Nullable
XmlPatient insured;
@NonNull
XmlGuarantor guarantor;
@Nullable
XmlReferrer referrer;
@Nullable
XmlEmployer employer;
@Nullable
XmlBalance balance;
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\payload\body\XmlTiers.java | 2 |
请完成以下Java代码 | public class SortingUtils {
public static void swap(int[] array, int position1, int position2) {
if (position1 != position2) {
int temp = array[position1];
array[position1] = array[position2];
array[position2] = temp;
}
}
public static int compare(int nu... | else
return 0;
}
public static void printArray(int[] array) {
if (array == null) {
return;
}
for (int e : array) {
System.out.print(e + " ");
}
System.out.println();
}
} | repos\tutorials-master\algorithms-modules\algorithms-sorting-2\src\main\java\com\baeldung\algorithms\quicksort\SortingUtils.java | 1 |
请完成以下Java代码 | public class JakartaValidationModuleSchemaGenerator {
public static void main(String[] args) {
JakartaValidationModule module = new JakartaValidationModule(NOT_NULLABLE_FIELD_IS_REQUIRED, INCLUDE_PATTERN_EXPRESSIONS);
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(DRA... | @NotNull Date createdAt;
@Size(max = 10) List<Person> friends;
}
static class Address {
@Null String street;
@NotNull String city;
@NotNull String country;
}
} | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonschemageneration\modules\JakartaValidationModuleSchemaGenerator.java | 1 |
请完成以下Java代码 | private ViewHeaderProperties extractViewHeaderProperties(@NonNull final PackageableRow packageableRow)
{
final IMsgBL msgs = Services.get(IMsgBL.class);
return ViewHeaderProperties.builder()
.group(ViewHeaderPropertiesGroup.builder()
.entry(ViewHeaderProperty.builder()
.caption(msgs.translatable... | }
private RelatedProcessDescriptor createProcessDescriptor(@NonNull final Class<?> processClass)
{
final IADProcessDAO adProcessDAO = Services.get(IADProcessDAO.class);
final AdProcessId processId = adProcessDAO.retrieveProcessIdByClass(processClass);
return RelatedProcessDescriptor.builder()
.processId(p... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\ProductsToPickViewFactory.java | 1 |
请完成以下Java代码 | public ResponseEntity<PageResult<QuartzLog>> queryQuartzJobLog(JobQueryCriteria criteria, Pageable pageable){
return new ResponseEntity<>(quartzJobService.queryAllLog(criteria,pageable), HttpStatus.OK);
}
@Log("新增定时任务")
@ApiOperation("新增定时任务")
@PostMapping
@PreAuthorize("@el.check('timing:a... | @PutMapping(value = "/exec/{id}")
@PreAuthorize("@el.check('timing:edit')")
public ResponseEntity<Object> executionQuartzJob(@PathVariable Long id){
quartzJobService.execution(quartzJobService.findById(id));
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除定时任务")
@ApiOp... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\rest\QuartzJobController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentServiceData {
@XmlElement(required = true)
protected GeneralShipmentData generalShipmentData;
protected List<Parcel> parcels;
@XmlElement(required = true)
protected ProductAndServiceData productAndServiceData;
/**
* Gets the value of the generalShipmentData property.
... | return this.parcels;
}
/**
* Gets the value of the productAndServiceData property.
*
* @return
* possible object is
* {@link ProductAndServiceData }
*
*/
public ProductAndServiceData getProductAndServiceData() {
return productAndServiceData;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ShipmentServiceData.java | 2 |
请完成以下Java代码 | public void setAtomicPermissionChecks(List<PermissionCheck> permissionChecks) {
this.permissionChecks.setAtomicChecks(permissionChecks);
}
public void addAtomicPermissionCheck(PermissionCheck permissionCheck) {
permissionChecks.addAtomicCheck(permissionCheck);
}
public void setPermissionChecks(Composi... | }
/**
* Used in SQL mapping
*/
public boolean isHistoricInstancePermissionsEnabled() {
return historicInstancePermissionsEnabled;
}
public boolean isUseLeftJoin() {
return useLeftJoin;
}
public void setUseLeftJoin(boolean useLeftJoin) {
this.useLeftJoin = useLeftJoin;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\AuthorizationCheck.java | 1 |
请完成以下Java代码 | public static ExternalSystemGRSSignumConfigId ofRepoId(final int repoId)
{
return new ExternalSystemGRSSignumConfigId(repoId);
}
@Nullable
public static ExternalSystemGRSSignumConfigId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? new ExternalSystemGRSSignumConfigId(re... | this.repoId = Check.assumeGreaterThanZero(repoId, I_ExternalSystem_Config_GRSSignum.COLUMNNAME_ExternalSystem_Config_GRSSignum_ID);
}
@Override
public ExternalSystemType getType()
{
return ExternalSystemType.GRSSignum;
}
@JsonValue
public int toJson()
{
return getRepoId();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\grssignum\ExternalSystemGRSSignumConfigId.java | 1 |
请完成以下Java代码 | public void verifyMaterialTracking(final I_C_Order document)
{
final IMaterialTrackingDAO materialTrackingDao = Services.get(IMaterialTrackingDAO.class);
final Properties ctx = InterfaceWrapperHelper.getCtx(document);
if (document.isSOTrx())
{
// nothing to do
return;
}
final List<I_C_OrderLine> doc... | queryVO.setM_Product_ID(line.getM_Product_ID());
// there can be many trackings for the given product and partner (different parcels), which is not a problem for this verification
queryVO.setOnMoreThanOneFound(OnMoreThanOneFound.ReturnFirst);
final I_M_Material_Tracking materialTracking = materialTrackingDao... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\C_Order.java | 1 |
请完成以下Java代码 | private ClientResponse prepareClientResponse(Publisher<? extends DataBuffer> body, HttpHeaders httpHeaders) {
ClientResponse.Builder builder;
builder = ClientResponse.create(
Objects.requireNonNull(exchange.getResponse().getStatusCode(), "Status code must not be null"),
messageReaders);
return builde... | private Mono<DataBuffer> writeBody(ServerHttpResponse httpResponse, CachedBodyOutputMessage message,
Class<?> outClass) {
Mono<DataBuffer> response = DataBufferUtils.join(message.getBody());
if (byte[].class.isAssignableFrom(outClass)) {
return response;
}
List<String> encodingHeaders = httpRespons... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\rewrite\ModifyResponseBodyGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MaterialTrackingInvoiceCandRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
public List<I_C_Invoice_Candidate> listByMaterialTrackingId(@NonNull final MaterialTrackingId materialTrackingId)
{
return getQueryForMaterialTrackingId(materialTrackingId)
.list();
}
public ... | .firstOptional();
}
private IQueryBuilder<I_C_Invoice_Candidate> getQueryForMaterialTrackingId(final @NonNull MaterialTrackingId materialTrackingId)
{
return queryBL.createQueryBuilder(I_C_Invoice_Candidate.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_C_Invoice_Candidate.COLUMNNAME_M_Material_T... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingInvoiceCandRepository.java | 2 |
请完成以下Java代码 | public List<Document> searchIndex(String inField, String queryString) {
try {
Query query = new QueryParser(inField, analyzer).parse(queryString);
IndexReader indexReader = DirectoryReader.open(memoryIndex);
IndexSearcher searcher = new IndexSearcher(indexReader);
... | } catch (IOException e) {
e.printStackTrace();
}
return null;
}
public List<Document> searchIndex(Query query, Sort sort) {
try {
IndexReader indexReader = DirectoryReader.open(memoryIndex);
IndexSearcher searcher = new IndexSearcher(indexReader);
... | repos\tutorials-master\lucene\src\main\java\com\baeldung\lucene\InMemoryLuceneIndex.java | 1 |
请完成以下Java代码 | public class Tccl {
public static interface Operation<T> {
T run();
}
public static <T> T runUnderClassloader(final Operation<T> operation, final ClassLoader classLoader) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
return AccessController.doPrivileged(new PrivilegedAc... | } else {
return runWithTccl(operation, classLoader);
}
}
private static <T> T runWithTccl(Operation<T> operation, ClassLoader classLoader) {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(classLoader);
try {
return operation... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\util\Tccl.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_Tree getAD_Tree()
{
return get_ValueAsPO(COLUMNNAME_AD_Tree_ID, org.compiere.model.I_AD_Tree.class);
}
@Override
public void setAD_Tree(final org.compiere.model.I_AD_Tree AD_Tree)
{
set_ValueFromPO(COLUMNNAME_AD_Tree_ID, org.compiere.model.I_AD_Tree.class, AD_Tree);
}
@Overri... | @Override
public boolean isBalancing()
{
return get_ValueAsBoolean(COLUMNNAME_IsBalancing);
}
@Override
public void setIsNaturalAccount (final boolean IsNaturalAccount)
{
set_Value (COLUMNNAME_IsNaturalAccount, IsNaturalAccount);
}
@Override
public boolean isNaturalAccount()
{
return get_ValueAsBool... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Element.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Boolean getOfficeDocumentOpenPasswords() {
return officeDocumentOpenPasswords;
}
@Value("${office.documentopenpasswords:true}")
public void setDocumentOpenPasswords(Boolean officeDocumentOpenPasswords) {
setOfficeDocumentOpenPasswordsValue(officeDocumentOpenPasswords);
}
... | public void setHomePagination(String homePagination) {
setHomePaginationValue(homePagination);
}
public static void setHomePaginationValue(String homePagination) {
ConfigConstants.homePagination = homePagination;
}
public static String getHomePageSize() {
return homePageSize;
... | repos\kkFileView-master\server\src\main\java\cn\keking\config\ConfigConstants.java | 2 |
请完成以下Java代码 | public Map<String, Object> getProcessVariables() {
return processVariables;
}
public void setProcessVariables(Map<String, Object> processVariables) {
this.processVariables = processVariables;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
public void setWithoutTenantId(boole... | if (topicSubscription.getProcessDefinitionId() != null) {
topicRequestDto.setProcessDefinitionId(topicSubscription.getProcessDefinitionId());
}
if (topicSubscription.getProcessDefinitionIdIn() != null) {
topicRequestDto.setProcessDefinitionIdIn(topicSubscription.getProcessDefinitionIdIn());
}
... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\topic\impl\dto\TopicRequestDto.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public String getCocktail() {
return cocktail;
}
public String getInstructions() {
return instructions;
}
public String getBaseIngredient() {
return baseIngredient;
}
@Override
public boolean equals(Object o) { | if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
MultipleRecipe that = (MultipleRecipe) o;
return Objects.equals(id, that.id) &&
Objects.equals(cocktail, that.cocktail) &&
Objects.equals(instructions, th... | repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\unrelated\entities\MultipleRecipe.java | 1 |
请完成以下Java代码 | public void setMaxAllocation (BigDecimal max, boolean set)
{
if (set || max.compareTo(m_maxAllocation) > 0)
m_maxAllocation = max;
} // setMaxAllocation
/**
* Reset Calculations
*/
public void resetCalculations()
{
m_actualQty = Env.ZERO;
m_actualMin = Env.ZERO;
m_actualAllocation = Env.ZERO;
// ... | /**************************************************************************
* String Representation
* @return info
*/
public String toString ()
{
StringBuffer sb = new StringBuffer ("MDistributionRunLine[")
.append(get_ID()).append("-")
.append(getInfo())
.append ("]");
return sb.toString ();
} /... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDistributionRunLine.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the schmeNm p... | public RestrictedPersonIdentificationSchemeNameSEPA getSchmeNm() {
return schmeNm;
}
/**
* Sets the value of the schmeNm property.
*
* @param value
* allowed object is
* {@link RestrictedPersonIdentificationSchemeNameSEPA }
*
*/
public void setSchmeN... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\RestrictedPersonIdentificationSEPA.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AppConfig {
private static final Logger LOG = LoggerFactory.getLogger(AppConfig.class);
private final SuperService superService;
private final PrintService printServiceStdErr;
public AppConfig() {
LOG.info("creating ...");
this.superService = new SuperService();
t... | return superService;
}
@Bean(name="prototype")
@Scope("prototype")
public DataService createSuperServicePrototype() {
LOG.info("creating DataService prototype");
return new SuperService();
}
@PreDestroy
public void shutdown() {
LOG.info("##destroy.");
}
} | repos\spring-examples-java-17\spring-di\src\main\java\itx\examples\springboot\di\config\AppConfig.java | 2 |
请完成以下Java代码 | public boolean isSingleton() {
return true;
}
public void setIdentityService(IdentityService identityService) {
this.identityService = identityService;
}
public void setRuntimeService(RuntimeService runtimeService) {
this.runtimeService = runtimeService;
}
public void ... | return copyVariablesFromHeader;
}
public void setCopyVariablesFromHeader(String copyVariablesFromHeader) {
this.copyVariablesFromHeader = copyVariablesFromHeader;
}
public boolean isCopyCamelBodyToBodyAsString() {
return copyCamelBodyToBodyAsString;
}
public void setCopyCamelB... | repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\FlowableEndpoint.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setAuditFileFolder (final java.lang.String AuditFileFolder)
{
set_Value (COLUMNNAME_AuditFileFolder, AuditFileFolder);
}
@Override
public java.lang.String getA... | }
@Override
public void setExternalSystem(final de.metas.externalsystem.model.I_ExternalSystem ExternalSystem)
{
set_ValueFromPO(COLUMNNAME_ExternalSystem_ID, de.metas.externalsystem.model.I_ExternalSystem.class, ExternalSystem);
}
@Override
public void setExternalSystem_ID (final int ExternalSystem_ID)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaymentTermService
{
@NonNull private final ITrxManager trxManager = Services.get(ITrxManager.class);
@NonNull private final IPaymentTermRepository paymentTermRepository = Services.get(IPaymentTermRepository.class);
@NonNull
public PaymentTerm getById(@NonNull final PaymentTermId paymentTermId)
{
r... | }
public void validateNow(@NonNull final PaymentTermId paymentTermId)
{
validateNow(ImmutableSet.of(paymentTermId));
}
public void validateBeforeCommit(final PaymentTermId paymentTermId)
{
trxManager.accumulateAndProcessBeforeCommit(
"PaymentTermService.validateBeforeCommit",
Collections.singleton(pa... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\PaymentTermService.java | 2 |
请完成以下Java代码 | default MatchResult matcher(HttpServletRequest request) {
boolean match = matches(request);
return new MatchResult(match, Collections.emptyMap());
}
/**
* The result of matching against an HttpServletRequest contains the status, true or
* false, of the match and if present, any variables extracted from the m... | */
public static MatchResult match() {
return new MatchResult(true, Collections.emptyMap());
}
/**
* Creates an instance of {@link MatchResult} that is a match with the specified
* variables
* @param variables the specified variables
* @return {@link MatchResult} that is a match with the specified... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\matcher\RequestMatcher.java | 1 |
请完成以下Java代码 | public void setESRTrxType (final @Nullable java.lang.String ESRTrxType)
{
set_Value (COLUMNNAME_ESRTrxType, ESRTrxType);
}
@Override
public java.lang.String getESRTrxType()
{
return get_ValueAsString(COLUMNNAME_ESRTrxType);
}
@Override
public void setImportErrorMsg (final @Nullable java.lang.String Impor... | {
return get_ValueAsTimestamp(COLUMNNAME_PaymentDate);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Override
public void setSektionNo (fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportLine.java | 1 |
请完成以下Java代码 | public class Company {
private long id;
private String name;
public Company() {
super();
}
public Company(final long id, final String name) {
this.id = id;
this.name = name;
}
public String getName() {
return name;
}
public void setName(final Stri... | this.name = name;
}
public long getId() {
return id;
}
public void setId(final long id) {
this.id = id;
}
@Override
public String toString() {
return "Company [id=" + id + ", name=" + name + "]";
}
} | repos\tutorials-master\spring-4\src\main\java\com\baeldung\jsonp\model\Company.java | 1 |
请完成以下Java代码 | public void setShapeType (String ShapeType)
{
set_Value (COLUMNNAME_ShapeType, ShapeType);
}
/** Get Shape Type.
@return Type of the shape to be painted
*/
public String getShapeType ()
{
return (String)get_Value(COLUMNNAME_ShapeType);
}
/** Set Record Sort No.
@param SortNo
Determines in what ... | {
set_Value (COLUMNNAME_XSpace, Integer.valueOf(XSpace));
}
/** Get X Space.
@return Relative X (horizontal) space in 1/72 of an inch
*/
public int getXSpace ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_XSpace);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Y Position.
@param ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintFormatItem.java | 1 |
请完成以下Java代码 | public List<Pet> getPets() {
return this.pets;
}
public void addPet(Pet pet) {
if (pet.isNew()) {
getPets().add(pet);
}
}
/**
* Return the Pet with the given name, or null if none found for this Owner.
* @param name to test
* @return the Pet with the given name, or null if no such Pet exists for th... | @Override
public String toString() {
return new ToStringCreator(this).append("id", this.getId())
.append("new", this.isNew())
.append("lastName", this.getLastName())
.append("firstName", this.getFirstName())
.append("address", this.address)
.append("city", this.city)
.append("telephone", this.telep... | repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\Owner.java | 1 |
请完成以下Java代码 | public static void main(String[] args) {
new SpringApplicationBuilder(BootGeodeSecurityClientApplication.class)
.web(WebApplicationType.SERVLET)
.build()
.run(args);
}
// tag::runner[]
@Bean
ApplicationRunner runner(@Qualifier("customersTemplate") GemfireTemplate customersTemplate) {
return args -> ... | logger.info("Successfully put [{}] in Region [{}]",
williamEvans, customersTemplate.getRegion().getName());
try {
logger.info("Attempting to read from Region [{}]...", customersTemplate.getRegion().getName());
customersTemplate.get(2L);
}
catch (Exception cause) {
logger.info("Read failed beca... | repos\spring-boot-data-geode-main\spring-geode-samples\boot\security\src\main\java\example\app\security\client\BootGeodeSecurityClientApplication.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_PurchaseCandidate
{
private final PurchaseCandidateRepository purchaseCandidateRepository;
public C_PurchaseCandidate(@NonNull final PurchaseCandidateRepository purchaseCandidateRepository)
{
this.purchaseCandidateRepository = purchaseCandidateRepository;
}
@ModelChange(//
timings = { ModelVa... | {
return; // nothing to update
}
final I_C_OrderLine salesOrderLineRecord = load(salesOrderAndLineId.getOrderLineRepoId(), I_C_OrderLine.class);
final BigDecimal value = Optional.ofNullable(purchaseCandidate.getProfitInfoOrNull())
.flatMap(PurchaseProfitInfo::getProfitPercent)
.map(percent -> percent... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\interceptor\C_PurchaseCandidate.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Object getValue(VariableTree variable) throws Exception {
ExpressionTree initializer = variable.getInitializer();
Class<?> wrapperType = WRAPPER_TYPES.get(variable.getType());
Object defaultValue = DEFAULT_TYPE_VALUES.get(wrapperType);
if (initializer != null) {
return getValue(variable.getType(... | return dataSizeValue;
}
Object periodValue = getFactoryValue(expression, factoryValue, PERIOD_OF, PERIOD_SUFFIX);
if (periodValue != null) {
return periodValue;
}
return factoryValue;
}
private Object getFactoryValue(ExpressionTree expression, Object factoryValue, String prefix,
Map<String, ... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\fieldvalues\javac\JavaCompilerFieldValuesParser.java | 2 |
请完成以下Java代码 | public class Course extends Item {
public enum Medium {CLASSROOM, ONLINE}
public enum Level {
BEGINNER("Beginner", 1), INTERMEDIATE("Intermediate", 2), ADVANCED("Advanced", 3);
private String name;
private int number;
Level(String name, int number) {
this.name = n... | this.medium = medium;
}
public Level getLevel() {
return level;
}
public void setLevel(Level level) {
this.level = level;
}
public List<Course> getPrerequisite() {
return prerequisite;
}
public void setPrerequisite(List<Course> prerequisite) {
this.pre... | repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\serialization\jsonvalue\Course.java | 1 |
请完成以下Spring Boot application配置 | # Enable this profile to disable security
spring:
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
- org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration
- org.springframework.boot.autoconfigure.security.reacti... | ecurityAutoConfiguration
- org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration | repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\resources\application-nosecurity.yml | 2 |
请完成以下Java代码 | public boolean commit() {
if (this.authen == null) {
return false;
}
Assert.notNull(this.subject, "subject cannot be null");
this.subject.getPrincipals().add(this.authen);
return true;
}
/**
* Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use
* the {@link SecurityCo... | * <code>LoginModule</code> should be ignored.
* @throws LoginException if the authentication fails
*/
@Override
public boolean login() throws LoginException {
this.authen = this.securityContextHolderStrategy.getContext().getAuthentication();
if (this.authen != null) {
return true;
}
String msg = "Login... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\jaas\SecurityContextLoginModule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Order {
@Id
@GeneratedValue
private Long id;
private String name;
@ManyToOne
@JoinColumn(name = "customer_id")
private Customer customer;
public Order() {
}
public Order(String name, Customer customer) {
this.name = name;
this.customer = custome... | public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} | repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\fetchMode\Order.java | 2 |
请完成以下Java代码 | public void deleteQueuesByTenantId(TenantId tenantId) {
validateId(tenantId, __ -> "Incorrect tenant id for delete queues request.");
tenantQueuesRemover.removeEntities(tenantId, tenantId);
}
@Override
public void deleteByTenantId(TenantId tenantId) {
deleteQueuesByTenantId(tenantId... | }
@Override
protected void removeEntity(TenantId tenantId, Queue entity) {
deleteQueue(tenantId, entity.getId());
}
};
private TenantId getSystemOrIsolatedTenantId(TenantId tenantId) {
if (!tenantId.equals(TenantId.SYS_TENANT_ID)) {
TenantProfile tenant... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\queue\BaseQueueService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfiguration extends ResourceServerConfigurerAdapter {
private final OAuth2Properties oAuth2Properties;
private final CorsFilter corsFilter;
public SecurityConfiguration(OAuth2Properties oAuth2Properties, CorsFilter corsFilter) {
this.oAuth2Properties = oAuth2Properties;
... | @Bean
public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) {
return new JwtTokenStore(jwtAccessTokenConverter);
}
@Bean
public JwtAccessTokenConverter jwtAccessTokenConverter(OAuth2SignatureVerifierClient signatureVerifierClient) {
return new OAuth2JwtAccessToke... | repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\config\SecurityConfiguration.java | 2 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_HR_Department[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_C_Activity getC_Activity() throws RuntimeException
{
return (I_C_Activity)MTable.get(getCtx(), I_C_Activity.Table_Name)
.getPO(getC_Ac... | public int getHR_Department_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_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);
}
/*... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Department.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EventProducerImpl implements EventProducer {
private static final Logger LOGGER = LoggerFactory.getLogger(EventProducerImpl.class);
private static final String TOPIC = "prod-con-test-topic";
private final KafkaTemplate<String, EventWrapper<? extends AsyncEvent>> kafkaTemplate;
public Eve... | throw new EventPublishException("Kafka publish DataMessage exception", e);
}
}
@Override
public void sendAccountMessage(AccountAsyncEvent accountAsyncEvent) throws EventPublishException {
try {
String messageKey = accountAsyncEvent.keyMessageKey();
LOGGER.info("#### ... | repos\spring-examples-java-17\spring-kafka\kafka-producer\src\main\java\itx\examples\spring\kafka\producer\service\EventProducerImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getSinglevat()
{
return singlevat;
}
public void setSinglevat(final String singlevat)
{
this.singlevat = singlevat;
}
public String getTaxfree()
{
return taxfree;
}
public void setTaxfree(final String taxfree)
{
this.taxfree = taxfree;
}
@Override
public int hashCode()
{
final ... | }
}
else if (!netDays.equals(other.netDays))
{
return false;
}
if (netdate == null)
{
if (other.netdate != null)
{
return false;
}
}
else if (!netdate.equals(other.netdate))
{
return false;
}
if (singlevat == null)
{
if (other.singlevat != null)
{
return false;
}
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\invoicexport\compudata\Cctop120V.java | 2 |
请完成以下Java代码 | public MultiPolygon createMulPolygonByWKT(String MPolygonWKT) throws ParseException{
WKTReader reader = new WKTReader( geometryFactory );
return (MultiPolygon) reader.read(MPolygonWKT);
}
/**
* 根据多边形数组 进行多多边形的创建
* @param polygons
* @return
* @throws ParseException
*/
... | * @throws ParseException
*/
public LinearRing createLinearRingByWKT(String ringWKT) throws ParseException{
WKTReader reader = new WKTReader( geometryFactory );
return (LinearRing) reader.read(ringWKT);
}
/**
* 几何对象转GeoJson对象
* @param geometry
* @return
* @throws Exc... | repos\springboot-demo-master\GeoTools\src\main\java\com\et\geotools\geotools\GeometryCreator.java | 1 |
请完成以下Java代码 | public AbstractProcessInstanceModificationCommand toObject(JsonObject json) {
AbstractProcessInstanceModificationCommand cmd = null;
if (json.has(START_BEFORE)) {
cmd = new ActivityBeforeInstantiationCmd(JsonUtil.getString(json, START_BEFORE));
if (json.has(ANCESTOR_ACTIVITY_INSTANCE_ID)) {
... | } else if (json.has(CANCEL_ALL)) {
cmd = new ActivityCancellationCmd(JsonUtil.getString(json, CANCEL_ALL));
boolean cancelCurrentActiveActivityInstances = JsonUtil.getBoolean(json, CANCEL_CURRENT);
((ActivityCancellationCmd) cmd).setCancelCurrentActiveActivityInstances(cancelCurrentActiveActivityInsta... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\json\ModificationCmdJsonConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setClock(Clock clock) {
Assert.notNull(clock, "clock must not be null");
this.delegate.setClock(clock);
}
public static final class LogoutResponseParameters {
private final HttpServletRequest request;
private final RelyingPartyRegistration registration;
private final Authentication authentic... | public HttpServletRequest getRequest() {
return this.request;
}
public RelyingPartyRegistration getRelyingPartyRegistration() {
return this.registration;
}
public Authentication getAuthentication() {
return this.authentication;
}
public LogoutRequest getLogoutRequest() {
return this.logoutReq... | repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\web\authentication\logout\OpenSaml5LogoutResponseResolver.java | 2 |
请完成以下Java代码 | public static Document convert2Document(File file)
{
// try
// {
Document document = Document.create(file);
if (document != null)
{
return document;
}
else
{
throw new IllegalArgumentException(file.... | * 这个线程负责处理这些事情
*/
public List<File> fileList;
public HandlerThread(String name)
{
super(name);
}
@Override
public void run()
{
long start = System.currentTimeMillis();
System.out.printf("线程#%s 开始运行\n", getName());
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\document\CorpusLoader.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8888
spring:
application:
name: demo-config-server
profiles:
active: git # 使用的 Spring Cloud Config Server 的存储器方案
cloud:
config:
server:
# Spring Cloud Config Server 的 Git 存储器的配置项,对应 MultipleJGitEnvironmentProperties 类
git:
uri: https://github.com/Yunai... | aths: / # 读取文件的根地址
default-label: master # 使用的默认分支,默认为 master
# username: ${CODING_USERNAME} # 账号
# password: ${CODING_PASSWORD} # 密码 | repos\SpringBoot-Labs-master\labx-12-spring-cloud-config\labx-12-sc-config-server-git\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public ClassViewColumnDescriptor getColumnByName(@NonNull final String fieldName)
{
final ClassViewColumnDescriptor column = columnsByName.get(fieldName);
if (column == null)
{
throw new AdempiereException("No column found for " + fieldName + " in " + this);
}
return column;
}
}
@Value
@Build... | @Getter
private enum DisplayMode
{
DISPLAYED(true, false),
HIDDEN(false, false),
DISPLAYED_BY_SYSCONFIG(true, true),
HIDDEN_BY_SYSCONFIG(false, true),
;
private final boolean displayed;
private final boolean configuredBySysConfig;
DisplayMode(final boolean displayed, final boolean configuredBySysCon... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\annotation\ViewColumnHelper.java | 1 |
请完成以下Java代码 | public String toString() {
return operationType + " "+ statement +" " +parameter;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((parameter == null) ? 0 : parameter.hashCode());
result = prime * result + ((statement == null) ? 0 : statemen... | if (getClass() != obj.getClass())
return false;
DbBulkOperation other = (DbBulkOperation) obj;
if (parameter == null) {
if (other.parameter != null)
return false;
} else if (!parameter.equals(other.parameter))
return false;
if (statement == null) {
if (other.statement != ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\operation\DbBulkOperation.java | 1 |
请完成以下Java代码 | public Builder setToggleButton()
{
return setToggleButton(true);
}
/**
* @param toggleButton is toggle action (maintains state)
*/
public Builder setToggleButton(final boolean toggleButton)
{
this.toggleButton = toggleButton;
return this;
}
private boolean isToggleButton()
{
return t... | {
this.buttonInsets = buttonInsets;
return this;
}
private final Insets getButtonInsets()
{
return buttonInsets;
}
/**
* Sets the <code>defaultCapable</code> property, which determines whether the button can be made the default button for its root pane.
*
* @param defaultCapable
* @retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AppsAction.java | 1 |
请完成以下Java代码 | public OneTimeToken generate(GenerateOneTimeTokenRequest request) {
String token = UUID.randomUUID().toString();
Instant expiresAt = this.clock.instant().plus(request.getExpiresIn());
OneTimeToken ott = new DefaultOneTimeToken(token, request.getUsername(), expiresAt);
this.oneTimeTokenByToken.put(token, ott);
... | }
}
}
private boolean isExpired(OneTimeToken ott) {
return this.clock.instant().isAfter(ott.getExpiresAt());
}
/**
* Sets the {@link Clock} used when generating one-time token and checking token
* expiry.
* @param clock the clock
*/
public void setClock(Clock clock) {
Assert.notNull(clock, "clock c... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ott\InMemoryOneTimeTokenService.java | 1 |
请完成以下Java代码 | private static TableRecordReference extractParentRecordReference(@NonNull final Document parentDocument)
{
final String tableName = assumeNotNull(
parentDocument.getEntityDescriptor().getTableNameOrNull(),
"The parent of dataEntry a document needs to have a table name; parentDocument={}", parentDocument);
... | private final DataEntryWebuiTools dataEntryWebuiTools;
private DataEntryDocumentValuesSupplier(
@NonNull final DataEntryRecord dataEntryRecord,
@NonNull DataEntryWebuiTools dataEntryWebuiTools)
{
this.dataEntryWebuiTools = dataEntryWebuiTools;
this.dataEntryRecord = dataEntryRecord;
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dataentry\window\descriptor\factory\DataEntrySubTabBindingRepository.java | 1 |
请完成以下Java代码 | public void setAD_Role_ID (final int AD_Role_ID)
{
if (AD_Role_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, AD_Role_ID);
}
@Override
public int getAD_Role_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Role_ID);
}
@Override
public void setIsA... | set_ValueNoCheck (COLUMNNAME_Mobile_Application_Access_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Mobile_Application_Access_ID, Mobile_Application_Access_ID);
}
@Override
public int getMobile_Application_Access_ID()
{
return get_ValueAsInt(COLUMNNAME_Mobile_Application_Access_ID);
}
@Override
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application_Access.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
@Bean
public ShiroRealm shiroRealm(){
ShiroRealm shiroRealm = new ShiroRealm();
return shiroRealm;
}
public SimpleCookie rememberMeCookie() {
SimpleCookie cooki... | @Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
authorizationAttributeSourceAdvisor.setSecurityManager(security... | repos\SpringAll-master\14.Spring-Boot-Shiro-Redis\src\main\java\com\springboot\config\ShiroConfig.java | 2 |
请完成以下Java代码 | public Object eval(Bindings bindings, ELContext context) {
// Create a ValueExpression from the body
ValueExpression bodyExpression = new LambdaBodyValueExpression(bindings, body);
// Create and return a LambdaExpression
LambdaExpression lambda = new LambdaExpression(parameters.getParam... | @Override
public String getExpressionString() {
return body.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (!(obj instanceof LambdaBodyValueExpression)) return false;
LambdaBodyValueExpression ... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\de\odysseus\el\tree\impl\ast\AstLambdaExpression.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReactiveWebServerFactoryCustomizer
implements WebServerFactoryCustomizer<ConfigurableReactiveWebServerFactory>, Ordered {
private final ServerProperties serverProperties;
private final @Nullable SslBundles sslBundles;
/**
* Create a new {@link ReactiveWebServerFactoryCustomizer} instance.
* @pa... | @Override
public int getOrder() {
return 0;
}
@Override
public void customize(ConfigurableReactiveWebServerFactory factory) {
PropertyMapper map = PropertyMapper.get();
map.from(this.serverProperties::getPort).to(factory::setPort);
map.from(this.serverProperties::getAddress).to(factory::setAddress);
map.... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\reactive\ReactiveWebServerFactoryCustomizer.java | 2 |
请完成以下Java代码 | public Set<AppInfo> getBriefApps() {
return machineDiscovery.getBriefApps();
}
@Override
public long addMachine(MachineInfo machineInfo) {
return machineDiscovery.addMachine(machineInfo);
}
@Override
public boolean removeMachine(String app, String ip, int port) {
re... | public List<String> getAppNames() {
return machineDiscovery.getAppNames();
}
@Override
public AppInfo getDetailApp(String app) {
return machineDiscovery.getDetailApp(app);
}
@Override
public void removeApp(String app) {
machineDiscovery.removeApp(app);
}
} | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\discovery\AppManagement.java | 1 |
请完成以下Java代码 | protected void internalExecute() {
PlanItemDefinition planItemDefinition = planItemInstanceEntity.getPlanItem().getPlanItemDefinition();
if (planItemDefinition instanceof Task) {
createAsyncJob((Task) planItemDefinition);
} else {
throw new FlowableException("Programmatic... | ObjectNode objectNode = objectMapper.createObjectNode();
objectNode.put(OperationSerializationMetadata.OPERATION_TRANSITION, transition);
for (String key: transitionMetadata.keySet()) {
objectNode.put(key, transitionMetadata.get(key));
}
return objectMapper.writeValueAsStri... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\AsyncLeaveActivePlanItemInstanceOperation.java | 1 |
请完成以下Java代码 | protected void setupCaching(final IModelCacheService cachingService)
{
// task 09417: while we are in the area, also make sure that config changes are propagated
final CacheMgt cacheMgt = CacheMgt.get();
cacheMgt.enableRemoteCacheInvalidationForTableName(I_AD_PrinterRouting.Table_Name);
cacheMgt.enableRemoteCa... | Services.get(IAsyncBatchListeners.class).registerAsyncBatchNoticeListener(new PDFPrintingAsyncBatchListener(), Printing_Constants.C_Async_Batch_InternalName_PDFPrinting);
Services.get(IAsyncBatchListeners.class).registerAsyncBatchNoticeListener(new AutomaticallyInvoicePdfPrintinAsyncBatchListener(), Async_Constants.C... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\Main.java | 1 |
请完成以下Java代码 | public String getCamundaCandidateUsers() {
return camundaCandidateUsersAttribute.getValue(this);
}
public void setCamundaCandidateUsers(String camundaCandidateUsers) {
camundaCandidateUsersAttribute.setValue(this, camundaCandidateUsers);
}
public List<String> getCamundaCandidateUsersList() {
Strin... | public void setCamundaFormKey(String camundaFormKey) {
camundaFormKeyAttribute.setValue(this, camundaFormKey);
}
public String getCamundaFormRef() {
return camundaFormRefAttribute.getValue(this);
}
public void setCamundaFormRef(String camundaFormRef) {
camundaFormRefAttribute.setValue(this, camund... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\UserTaskImpl.java | 1 |
请完成以下Java代码 | public String getCategoryNotEquals() {
return categoryNotEquals;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
public String getKey() {
return key;
}
public boolean isLatest() {
return latest;
}
public String getDeploymentId()... | return notDeployed;
}
public boolean isDeployed() {
return deployed;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
} | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ModelQueryImpl.java | 1 |
请完成以下Java代码 | public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public Effect __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); ... | public static void startEffect(FlatBufferBuilder builder) { builder.startTable(2); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); }
public static void addDamage(FlatBufferBuilder builder, short damage) { builder.addShort(1, damage, 0); }
public stati... | repos\tutorials-master\libraries-data-io-2\src\main\java\com\baeldung\flatbuffers\MyGame\terrains\Effect.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Author implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private int age;
private String name;
private String genre;
//@Convert(converter = BooleanConverter.class)
@NotN... | return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Boolean isBestSelling() {
return bestSelling;
}
public void setBestSelling(Bo... | repos\Hibernate-SpringBoot-master\HibernateSpringBootMapBooleanToYesNo\src\main\java\com\bookstore\entity\Author.java | 2 |
请完成以下Java代码 | public void setName(String value) {
set(1, value);
}
/**
* Getter for <code>public.Store.name</code>.
*/
public String getName() {
return (String) get(1);
}
// -------------------------------------------------------------------------
// Primary key information
// ... | */
public StoreRecord() {
super(Store.STORE);
}
/**
* Create a detached, initialised StoreRecord
*/
public StoreRecord(Integer id, String name) {
super(Store.STORE);
setId(id);
setName(name);
resetChangedOnNotNull();
}
} | repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\records\StoreRecord.java | 1 |
请完成以下Java代码 | public class ContinueSearchDialog extends JPanel {
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
FlowLayout flowLayout1 = new FlowLayout();
JButton cancelB = new JButton();
JButton continueB = new JButton();
JPanel buttonsPanel = new JPanel();
JLabel jLabel1 = new JLabel()... | continueB.setFocusable(false);
flowLayout1.setAlignment(FlowLayout.RIGHT);
buttonsPanel.setLayout(flowLayout1);
jLabel1.setText(" "+Local.getString("Search for")+": ");
jLabel1.setIcon(new ImageIcon(HTMLEditor.class.getResource("resources/icons/findbig.png"))) ;
this.add(jLabel1, Border... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\ContinueSearchDialog.java | 1 |
请完成以下Java代码 | public Object getPrincipal() {
return this.principal;
}
/**
* Returns {@code true} if {@link #getPrincipal()} is authenticated, {@code false}
* otherwise.
* @return {@code true} if {@link #getPrincipal()} is authenticated, {@code false}
* otherwise
*/
public boolean isPrincipalAuthenticated() {
return... | /**
* Returns the URI which the Client is requesting that the End-User's User Agent be
* redirected to after a logout has been performed.
* @return the URI which the Client is requesting that the End-User's User Agent be
* redirected to after a logout has been performed
*/
@Nullable
public String getPostLog... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcLogoutAuthenticationToken.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Privilege {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String name;
@ManyToMany(mappedBy = "privileges")
private Collection<Role> roles;
public Privilege() {
}
public Privilege(String name) {
this.name = name;
}
pub... | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Privilege other = (Privilege) obj;
if (name == null) {
if (other.name != ... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\model\Privilege.java | 2 |
请完成以下Java代码 | class PreAuthenticatedAuthenticationTokenDeserializer extends ValueDeserializer<PreAuthenticatedAuthenticationToken> {
private static final TypeReference<List<GrantedAuthority>> GRANTED_AUTHORITY_LIST = new TypeReference<>() {
};
/**
* This method construct {@link PreAuthenticatedAuthenticationToken} object from... | JsonNode principalNode = readJsonNode(jsonNode, "principal");
Object principal = (!principalNode.isObject()) ? principalNode.stringValue()
: ctxt.readTreeAsValue(principalNode, Object.class);
Object credentials = readJsonNode(jsonNode, "credentials").stringValue();
JsonNode authoritiesNode = readJsonNode(json... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\jackson\PreAuthenticatedAuthenticationTokenDeserializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class OrgLogoResourceNameMatcher
{
//
// Org Logo resource matchers
private static final String SYSCONFIG_ResourceNameEndsWith = "de.metas.adempiere.report.jasper.OrgLogoClassLoaderHook.ResourceNameEndsWith";
private static final String DEFAULT_ResourceNameEndsWith = "de/metas/generics/logo.png";
private final Imm... | public boolean matches(final String resourceName)
{
// Skip if no resourceName
if (resourceName == null || resourceName.isEmpty())
{
return false;
}
// Check if our resource name ends with one of our predefined matchers
for (final String resourceNameEndsWithMatcher : resourceNameEndsWithMatchers)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\class_loader\images\org\OrgLogoResourceNameMatcher.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class SyncProductImportService extends AbstractSyncImportService
{
private final ProductRepository productsRepo;
private final ProductTrlRepository productTrlsRepo;
public SyncProductImportService(
@NonNull final ProductRepository productsRepo,
@NonNull final ProductTrlRepository productTrlsRepo)
{
this.pr... | productsRepo.save(product);
logger.debug("Imported: {} -> {}", syncProduct, product);
//
// Import product translations
final Map<String, ProductTrl> productTrls = mapByLanguage(productTrlsRepo.findByRecord(product));
for (final Map.Entry<String, String> lang2nameTrl : syncProduct.getNameTrls().entrySet())
... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SyncProductImportService.java | 2 |
请完成以下Java代码 | protected I_M_HU getModelFromObject(final Object modelObj)
{
final I_M_HU hu = InterfaceWrapperHelper.create(modelObj, I_M_HU.class);
return hu;
}
@Override
protected final ArrayKey mkKey(final I_M_HU model)
{
return Util.mkKey(model.getClass().getName(), model.getM_HU_ID());
}
@Override
protected HUAtt... | final int huId = model.getM_HU_ID();
return createAttributeStorageCached(ctx, huId, trxName, model);
}
// @Cached // commented out because it's not applied anyways
/* package */HUAttributeStorage createAttributeStorageCached(
@CacheCtx final Properties ctx,
final int huId,
@CacheTrx final String trxName,... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\HUAttributeStorageFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public <R> R updateById(
@NonNull final SAPGLJournalId glJournalId,
@NonNull final Function<SAPGLJournal, R> processor)
{
final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver();
return loaderAndSaver.updateById(glJournalId, processor);
}
public DocStatus getDocStatus(final SAPG... | {
final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver();
return loaderAndSaver.create(createRequest, currencyConverter);
}
public void save(@NonNull final SAPGLJournal sapglJournal)
{
final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver();
loaderAndSa... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalRepository.java | 2 |
请完成以下Java代码 | public Element setFilterState (boolean filter_state)
{
if (!getFilterState())
return super.setFilterState (filter_state);
return this;
} // setFilterState
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the ele... | addElement(Integer.toString(element.hashCode()),element);
return(this);
}
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public StringElement addElement(Element element)
{
addElementToRegistry(element);
return(this... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\StringElement.java | 1 |
请完成以下Java代码 | public MessageCorrelationAsyncBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) {
ensureNotNull("historicProcessInstanceQuery", historicProcessInstanceQuery);
this.historicProcessInstanceQuery = historicProcessInstanceQuery;
return this;
}
public MessageCor... | public String getMessageName() {
return messageName;
}
public List<String> getProcessInstanceIds() {
return processInstanceIds;
}
public ProcessInstanceQuery getProcessInstanceQuery() {
return processInstanceQuery;
}
public HistoricProcessInstanceQuery getHistoricProcessInstanceQuery() {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\MessageCorrelationAsyncBuilderImpl.java | 1 |
请完成以下Java代码 | public int getSize()
{
return getDelegateToUse().getSize();
}
@Override
public Object getElementAt(int index)
{
return getDelegateToUse().getElementAt(index);
}
@Override
public void setSelectedItem(Object anItem)
{
getDelegateToUse().setSelectedItem(anItem);
}
@Override
public Object getSelectedIt... | @Override
public void removeElement(Object obj)
{
getDelegateToUse().removeElement(obj);
}
@Override
public void insertElementAt(Object obj, int index)
{
getDelegateToUse().insertElementAt(obj, index);
}
@Override
public void removeElementAt(int index)
{
getDelegateToUse().removeElementAt(index);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\MutableComboBoxModelProxy.java | 1 |
请完成以下Java代码 | public int concurrentForLoopBenchmark(MyState state) throws InterruptedException, ExecutionException {
int numThreads = Runtime.getRuntime().availableProcessors();
ExecutorService executorService = Executors.newFixedThreadPool(numThreads);
List<Callable<Integer>> tasks = new ArrayList<>();
... | executorService.shutdown();
return totalSum;
}
@Benchmark
public int streamBenchMark(MyState state) {
return state.numbers.stream()
.filter(number -> number % 2 == 0)
.map(number -> number * number)
.reduce(0, Integer::sum);
}
public static void main(S... | repos\tutorials-master\core-java-modules\core-java-streams\src\main\java\com\baeldung\stream\streamsvsloops\PerformanceBenchmark.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void packItemPartToDestination(final PackingItemPart part)
{
final IAllocationRequest request = createShipmentScheduleAllocationRequest(getHUContext(), part);
final IAllocationSource source = createAllocationSourceFromShipmentScheduleId(part.getShipmentScheduleId());
final IAllocationDestination destinat... | //
//
public static class HU2PackingItemsAllocatorBuilder
{
public HU2PackingItemsAllocator allocate()
{
return build().allocate();
}
public HU2PackingItemsAllocatorBuilder packToHU(final I_M_HU hu)
{
return packToDestination(HUListAllocationSourceDestination.of(hu));
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\impl\HU2PackingItemsAllocator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CartProduct {
@EmbeddedId
private CartProductId id;
@ManyToOne
@MapsId("cartId")
@JoinColumn(name = "cart_id")
private Cart cart;
@ManyToOne
@MapsId("productId")
@JoinColumn(name = "product_id")
private Product product;
public CartProduct() {}
public Car... | public CartProductId getId() {
return id;
}
public void setId(CartProductId id) {
this.id = id;
}
public Cart getCart() {
return cart;
}
public void setCart(Cart cart) {
this.cart = cart;
}
public Product getProduct() {
return product;
}
... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\models\CartProduct.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CustomRouteController
{
@NonNull
private final CamelContext camelContext;
public CustomRouteController(final @NonNull CamelContext camelContext)
{
this.camelContext = camelContext;
}
public void startAllRoutes()
{
getRoutes()
.stream()
.filter(CustomRouteController::isReadyToStart)
... | @NonNull
private List<Route> getRoutes()
{
return camelContext.getRoutes();
}
@NonNull
private RouteController getRouteController()
{
return camelContext.getRouteController();
}
private static boolean isReadyToStart(@NonNull final Route route)
{
final boolean isStartOnDemand = CamelRoutesGroup.ofCodeOp... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\CustomRouteController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Result<?> queryByCode(@RequestParam(name = "roleCode", required = true) String roleCode,HttpServletRequest request) {
SysRoleIndex sysRoleIndex = sysRoleIndexService.getOne(new LambdaQueryWrapper<SysRoleIndex>().eq(SysRoleIndex::getRoleCode, roleCode));
return Result.OK(sysRoleIndex);
}
... | if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
homePath = SymbolConstant.SINGLE_SLASH + homePath;
}
}
return Result.OK(homePath);
}
/**
* 获取门户类型
*
* @return
*/
@GetMapping(value = "/getCurrentHome")
public Result<?> getCurrentHome... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysRoleIndexController.java | 2 |
请完成以下Java代码 | Comment viewComment(Comment comment) {
viewProfile(comment.getAuthor());
return comment;
}
Profile viewProfile(User user) {
return user.profile.withFollowing(followingUsers.contains(user));
}
public Profile getProfile() {
return profile;
}
boolean matchesPasswo... | public UserName getName() {
return profile.getUserName();
}
String getBio() {
return profile.getBio();
}
Image getImage() {
return profile.getImage();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClas... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\User.java | 1 |
请完成以下Java代码 | private void updateIsSummary(final int categoryId, final char isSummary,
final String trxName)
{
ResultSet rs = null;
PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement(SQL_UPDATE_ISSUMMARY, trxName);
pstmt.setString(1, Character.toString(isSummary));
pstmt.setInt(2, categoryId);
... | DB.close(rs, pstmt);
}
}
private void setIntOrNull(final PreparedStatement pstmt, final int idx,
final Integer param) throws SQLException
{
if (param == null)
{
pstmt.setNull(idx, Types.INTEGER);
}
else
{
pstmt.setInt(idx, param);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\modelvalidator\MProductCategoryValidator.java | 1 |
请完成以下Spring Boot application配置 | spring.docker.compose.enabled=true
spring.docker.compose.file=./connectiondetails/docker/docker-compose-jdbc.yml
spring.docker.compose.skip.in-tests=false
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.mustache.check-template-location=false
spring.profiles.active=r2dbc
spring.autoconfigure... | nfiguration, org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration, org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration, org.springframework.boot.autoconfigure.neo4j.Neo4jAutoConfiguration, org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration, org.s... | repos\tutorials-master\spring-boot-modules\spring-boot-3\src\main\resources\connectiondetails\application-r2dbc.properties | 2 |
请完成以下Java代码 | private static void addToLocationMap(String name, double lat, double lng, Map<String, List<Double>> locations) {
List<Double> coordinates = new ArrayList<>();
coordinates.add(lat);
coordinates.add(lng);
locations.put(name, coordinates);
}
private static File getNewShapeFile() {... | Transaction transaction = new DefaultTransaction("create");
String typeName = dataStore.getTypeNames()[0];
SimpleFeatureSource featureSource = dataStore.getFeatureSource(typeName);
if (featureSource instanceof SimpleFeatureStore) {
SimpleFeatureStore featureStore = (SimpleFeatureSt... | repos\tutorials-master\geotools\src\main\java\com\baeldung\geotools\ShapeFile.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int delete(Map<String, Object> paramMap) {
if (paramMap == null) {
return 0;
} else {
return (int) sessionTemplate.delete(getStatement(SQL_BATCH_DELETE_BY_COLUMN), paramMap);
}
}
/**
* 分页查询数据 .
*/
public PageBean listPage(PageParam pageParam, Map<String, Object> paramMap) {
if (paramMap == ... | }
}
/**
* 函数功能说明 : 获取Mapper命名空间. 修改者名字: Along 修改日期: 2016-1-8 修改内容:
*
* @参数:@param sqlId
* @参数:@return
* @return:String
* @throws
*/
public String getStatement(String sqlId) {
String name = this.getClass().getName();
// 单线程用StringBuilder,确保速度;多线程用StringBuffer,确保安全
StringBuilder sb = new StringBu... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\dao\impl\PermissionBaseDaoImpl.java | 2 |
请完成以下Java代码 | public void setPostingType (final @Nullable java.lang.String PostingType)
{
set_ValueNoCheck (COLUMNNAME_PostingType, PostingType);
}
@Override
public java.lang.String getPostingType()
{
return get_ValueAsString(COLUMNNAME_PostingType);
}
@Override
public void setTaxAmtSource (final @Nullable BigDecimal ... | final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TaxAmtSource);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setVATCode (final @Nullable java.lang.String VATCode)
{
set_ValueNoCheck (COLUMNNAME_VATCode, VATCode);
}
@Override
public java.lang.String getVATCode()
{
return get_V... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_DATEV_ExportLine.java | 1 |
请完成以下Java代码 | public class GetDeploymentCmmnModelInstanceCmd implements Command<CmmnModelInstance> {
protected String caseDefinitionId;
public GetDeploymentCmmnModelInstanceCmd(String caseDefinitionId) {
this.caseDefinitionId = caseDefinitionId;
}
public CmmnModelInstance execute(CommandContext commandContext) {
e... | for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadCaseDefinition(caseDefinition);
}
CmmnModelInstance modelInstance = Context
.getProcessEngineConfiguration()
.getDeploymentCache()
.findCmmnModelInstanceForCaseDefi... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\cmd\GetDeploymentCmmnModelInstanceCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getMeHome(Model model) {
addUserAttributes(model);
return "comparison/home";
}
@GetMapping("/admin")
public String adminOnly(Model model) {
addUserAttributes(model);
Subject currentUser = SecurityUtils.getSubject();
if (currentUser.hasRole("ADMIN")) ... | String permission = "";
if (currentUser.hasRole("ADMIN")) {
model.addAttribute("role", "ADMIN");
} else if (currentUser.hasRole("USER")) {
model.addAttribute("role", "USER");
}
if (currentUser.isPermitted("READ")) {
permission = permission + " READ";... | repos\tutorials-master\security-modules\apache-shiro\src\main\java\com\baeldung\comparison\shiro\controllers\ShiroController.java | 2 |
请完成以下Java代码 | public boolean isPermissionGranted ()
{
Object oo = get_Value(COLUMNNAME_IsPermissionGranted);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Read Write.
@param IsReadWrite
Field is read / write
*/
... | {
set_Value (COLUMNNAME_RevokePermission, RevokePermission);
}
/** Get Revoke.
@return Revoke Permission
*/
public String getRevokePermission ()
{
return (String)get_Value(COLUMNNAME_RevokePermission);
}
@Override
public void setDescription(String Description)
{
set_ValueNoCheck (COLUMNNAME_Descri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Role_PermRequest.java | 1 |
请完成以下Java代码 | public class CompositeProducerInterceptor<K, V> implements ProducerInterceptor<K, V>, Closeable {
private final LogAccessor logger = new LogAccessor(LogFactory.getLog(this.getClass())); //NOSONAR
private final List<ProducerInterceptor<K, V>> delegates = new ArrayList<>();
/**
* Construct an instance with the pr... | }
return interceptRecord;
}
@Override
public void onAcknowledgement(RecordMetadata metadata, Exception exception) {
for (ProducerInterceptor<K, V> interceptor : this.delegates) {
try {
interceptor.onAcknowledgement(metadata, exception);
}
catch (Exception e) {
// do not propagate interceptor ex... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\CompositeProducerInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HibernateConfiguration {
@Value("${db.driver}")
private String DRIVER;
@Value("${db.password}")
private String PASSWORD;
@Value("${db.url}")
private String URL;
@Value("${db.username}")
private String USERNAME;
@Value("${hibernate.dialect}")
private String DI... | dataSource.setUrl(URL);
dataSource.setUsername(USERNAME);
dataSource.setPassword(PASSWORD);
return dataSource;
}
@Bean
public LocalSessionFactoryBean sessionFactory() {
LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSou... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\HibernateConfiguration.java | 2 |
请完成以下Java代码 | public PlanItemInstanceEntityBuilder derivedCaseDefinitionId(String derivedCaseDefinitionId) {
this.derivedCaseDefinitionId = derivedCaseDefinitionId;
return this;
}
@Override
public PlanItemInstanceEntityBuilder caseInstanceId(String caseInstanceId) {
this.caseInstanceId = caseInsta... | }
public Map<String, Object> getLocalVariables() {
return localVariables;
}
public boolean hasLocalVariables() {
return localVariables != null && localVariables.size() > 0;
}
public boolean isAddToParent() {
return addToParent;
}
public boolean isSilentNameExpressionE... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\PlanItemInstanceEntityBuilderImpl.java | 1 |
请完成以下Java代码 | public class ClassDelegateUtil {
private static final EngineUtilLogger LOG = ProcessEngineLogger.UTIL_LOGGER;
public static Object instantiateDelegate(Class<?> clazz, List<FieldDeclaration> fieldDeclarations) {
return instantiateDelegate(clazz.getName(), fieldDeclarations);
}
public static Object instant... | Method setterMethod = ReflectUtil.getSetter(declaration.getName(),
target.getClass(), declaration.getValue().getClass());
if(setterMethod != null) {
try {
setterMethod.invoke(target, declaration.getValue());
}
catch (Exception e) {
throw LOG.exceptionWhileApplyingFieldDeclat... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ClassDelegateUtil.java | 1 |
请完成以下Java代码 | protected void setExecutionId(String executionId) {
associateExecutionById(executionId);
}
/**
* Returns the id of the currently associated process instance or 'null'
*/
public String getProcessInstanceId() {
Execution execution = associationManager.getExecution();
return ... | return (ProcessInstance) execution;
}
// internal implementation
// //////////////////////////////////////////////////////////
protected void assertAssociated() {
if (associationManager.getExecution() == null) {
throw new FlowableCdiException("No execution associated. Call business... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\BusinessProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ImmutableSet<ProductId> getProductIdsRemainingToBePicked()
{
final PickingJob pickingJob = getPickingJob();
return pickingJob.streamLines()
.filter(line -> !line.isFullyPicked())
.map(PickingJobLine::getProductId)
.collect(ImmutableSet.toImmutableSet());
}
@NonNull
private PickingJob getPic... | final ProductAvailableStocks availableStocks = getAvailableStocks();
if (availableStocks == null)
{
return null; // N/A
}
return availableStocks.allocateQty(line.getProductId(), qtyRemainingToPick);
}
@Nullable
private ProductAvailableStocks getAvailableStocks()
{
return availableStocksSupplier.get(... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\get_qty_available\PickingJobGetQtyAvailableCommand.java | 2 |
请完成以下Java代码 | public class Jackson3VariableJsonMapper implements VariableJsonMapper {
protected final ObjectMapper objectMapper;
public Jackson3VariableJsonMapper(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
@Override
public Object readTree(String textValue) {
return objectM... | @Override
public Object transformToJsonNode(Object value) {
return FlowableJackson3JsonNode.asJsonNode(value, () -> objectMapper);
}
@Override
public FlowableObjectNode createObjectNode() {
return new FlowableJackson3ObjectNode(objectMapper.createObjectNode());
}
@Override
... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\json\jackson3\Jackson3VariableJsonMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BPartnerLocationQuickInputService
{
private final CustomizedWindowInfoMapRepository customizedWindowInfoMapRepository;
private final BPartnerCompositeRepository bpartnerCompositeRepository;
public Optional<AdWindowId> getNewBPartnerLocationWindowId()
{
return RecordWindowFinder.newInstance(I_C_BPart... | @Nullable
private BPartnerLocation getLocationFromBPartnerLocationTemplate(final I_C_BPartner_Location_QuickInput template)
{
final LocationId uniqueLocationIdOfBPartnerTemplate = LocationId.ofRepoIdOrNull(template.getC_Location_ID());
if (uniqueLocationIdOfBPartnerTemplate == null)
{
return null;
}
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\quick_input\service\BPartnerLocationQuickInputService.java | 2 |
请完成以下Java代码 | public String getTokenData() {
return tokenData;
}
@Override
public void setTokenData(String tokenData) {
this.tokenData = tokenData;
}
@Override
public Object getPersistentState() {
Map<String, Object> persistentState = new HashMap<>();
persistentState.put("tok... | persistentState.put("userAgent", userAgent);
persistentState.put("userId", userId);
persistentState.put("tokenData", tokenData);
return persistentState;
}
// common methods //////////////////////////////////////////////////////////
@Override
public String toString() {
... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\TokenEntityImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.