instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class HUManagerProfileLayoutSectionList
{
public static final HUManagerProfileLayoutSectionList DEFAULT = new HUManagerProfileLayoutSectionList(ImmutableList.of(
HUManagerProfileLayoutSection.DisplayName,
HUManagerProfileLayoutSection.QRCode,
HUManagerProfileLayoutSection.Locator,
HUManagerProfileLa... | this.list = Check.assumeNotEmpty(list, "list is not empty");
this.asStringList = list.stream()
.map(HUManagerProfileLayoutSection::getCode)
.collect(ImmutableList.toImmutableList());
}
public static Collector<HUManagerProfileLayoutSection, ?, HUManagerProfileLayoutSectionList> collectOrDefault()
{
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\mobileui\config\HUManagerProfileLayoutSectionList.java | 1 |
请完成以下Java代码 | public byte[] serialize(String topic, Object data) {
throw new UnsupportedOperationException();
}
@SuppressWarnings("NullAway") // Dataflow analysis limitation
@Override
public byte[] serialize(String topic, Headers headers, Object data) {
if (data == null) {
return null;
}
byte[] value = null;
String... | }
/*
* Package for testing.
*/
@SuppressWarnings("NullAway") // Dataflow analysis limitation
byte[] trySerdes(Object data) {
try {
Serde<? extends Object> serdeFrom = Serdes.serdeFrom(data.getClass());
Serializer<?> serializer = serdeFrom.serializer();
serializer.configure(this.autoConfigs, this.forK... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\DelegatingSerializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public User findByEmail(String email){
return userRepository.findByEmail(email);
}
@Override
public User save(UserRegistrationDto registration) {
User user = new User();
user.setFirstName(registration.getFirstName());
user.setLastName(registration.getLastName());
... | if (user == null){
throw new UsernameNotFoundException("Invalid username or password.");
}
return new org.springframework.security.core.userdetails.User(user.getEmail(),
user.getPassword(),
mapRolesToAuthorities(user.getRoles()));
}
private Collectio... | repos\Spring-Boot-Advanced-Projects-main\Springboot-Registration-Page\src\main\java\aspera\registration\service\UserServiceImpl.java | 2 |
请完成以下Java代码 | public boolean isClosed() {
return isClosedAttribute.getValue(this);
}
public void setClosed(boolean isClosed) {
isClosedAttribute.setValue(this, isClosed);
}
public Collection<Participant> getParticipants() {
return participantCollection.get(this);
}
public Collection<MessageFlow> getMessage... | return participantAssociationCollection.get(this);
}
public Collection<MessageFlowAssociation> getMessageFlowAssociations() {
return messageFlowAssociationCollection.get(this);
}
public Collection<CorrelationKey> getCorrelationKeys() {
return correlationKeyCollection.get(this);
}
public Collectio... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CollaborationImpl.java | 1 |
请完成以下Java代码 | public String toString() {
return this.text;
}
/**
* Load {@link PemContent} from the given content (either the PEM content itself or a
* reference to the resource to load).
* @param content the content to load
* @param resourceLoader the resource loader used to load content
* @return a new {@link PemCon... | * Load {@link PemContent} from the given {@link InputStream}.
* @param in an input stream to load the content from
* @return the loaded PEM content
* @throws IOException on IO error
*/
public static PemContent load(InputStream in) throws IOException {
return of(StreamUtils.copyToString(in, StandardCharsets.U... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\pem\PemContent.java | 1 |
请完成以下Java代码 | public class DefaultTransportDeviceProfileCache implements TransportDeviceProfileCache {
private final Lock deviceProfileFetchLock = new ReentrantLock();
private final ConcurrentMap<DeviceProfileId, DeviceProfile> deviceProfiles = new ConcurrentHashMap<>();
private TransportService transportService;
... | put(deviceProfile);
return deviceProfile;
}
@Override
public void evict(DeviceProfileId id) {
deviceProfiles.remove(id);
}
private DeviceProfile getDeviceProfile(DeviceProfileId id) {
DeviceProfile profile = deviceProfiles.get(id);
if (profile == null) {
... | repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\service\DefaultTransportDeviceProfileCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getInfo1() {
return info1;
}
/**
* Sets the value of the info1 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInfo1(String value) {
this.info1 = value;
}
/**
* Gets the value o... | * possible object is
* {@link Boolean }
*
*/
public Boolean isReturns() {
return returns;
}
/**
* Sets the value of the returns property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setRetu... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Parcel.java | 2 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@JsonIgnore
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUse... | public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
publ... | repos\springBoot-master\springboot-swagger-ui\src\main\java\com\abel\example\bean\User.java | 1 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.add("ddOrderLine", ddOrderLine)
.add("isASITo", isASITo)
.toString();
}
@Override
public I_M_Product getM_Product()
{
final IProductBL productBL = Services.get(IProductBL.class);
return productBL.getById(ProductId.ofRepoId(ddOrd... | @Override
public void setM_AttributeSetInstance(final I_M_AttributeSetInstance asi)
{
if (isASITo)
{
ddOrderLine.setM_AttributeSetInstanceTo(asi);
}
else
{
ddOrderLine.setM_AttributeSetInstance(asi);
}
}
@Override
public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\producer\DDOrderLineAttributeSetInstanceAware.java | 1 |
请完成以下Java代码 | public Stream<InventoryReference> streamReferences(InventoryQuery query)
{
final ImmutableList<I_M_Inventory> inventories = inventoryDAO.stream(query).collect(ImmutableList.toImmutableList());
return inventories.stream().map(this::toInventoryJobReference);
}
private InventoryReference toInventoryJobReference(fi... | public void updateByQuery(@NonNull final InventoryQuery query, @NonNull final UnaryOperator<Inventory> updater)
{
final ImmutableList<I_M_Inventory> inventoriesRecords = inventoryDAO.stream(query).collect(ImmutableList.toImmutableList());
if (inventoriesRecords.isEmpty()) {return;}
warmUp(inventoriesRecords);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLoaderAndSaver.java | 1 |
请完成以下Java代码 | public void mergeTUs()
{
huTrxBL.createHUContextProcessorExecutor(huContextInitial).run((IHUContextProcessor)huContext0 -> {
// Make a copy of the processing context, we will need to modify it
final IMutableHUContext huContext = huContext0.copyAsMutable();
// Register our split HUTrxListener because this "... | /**
* Create an allocation request for the cuQty of the builder
*
* @param huContext
* @param referencedModel referenced model to be used in created request
* @return created request
*/
private IAllocationRequest createMergeAllocationRequest(final IHUContext huContext)
{
final ZonedDateTime date = Syste... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\TUMergeBuilder.java | 1 |
请完成以下Java代码 | private int deleteFactAcctSummary(final String where)
{
final String trxName = getContext().getTrxName();
// delete
final String sql = "DELETE FROM Fact_Acct_Summary fas " + where;
log.debug("Delete sql: " + sql);
final int deletedNo = DB.executeUpdateAndThrowExceptionOnFail(sql, trxName);
return deleted... | values.add("C_LocFrom_ID");
if (paReportCube.isUser1Dim())
values.add("User1_ID");
if (paReportCube.isUser2Dim())
values.add("User2_ID");
if (paReportCube.isUserElement1Dim())
values.add("UserElement1_ID");
if (paReportCube.isUserElement2Dim())
values.add("UserElement2_ID");
if (paReportCube.isSub... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\cube\impl\FactAcctCubeUpdater.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer("MProduct[");
sb.append(get_ID()).append("-").append(getValue()).append("_").append(getName())
.append("]");
return sb.toString();
} // toString
@Override
protected boolean beforeSave(boolean newRecord)
{
// Reset Stocked if not Item
// A... | {
insert_Accounting(I_M_Product_Acct.Table_Name,
I_M_Product_Category_Acct.Table_Name,
"p.M_Product_Category_ID=" + getM_Product_Category_ID());
}
else
{
log.info("This M_Product is created via CopyRecordSupport; -> don't insert the default _acct records");
}
insert_Tree(X_AD_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MProduct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private final String name;
private final String email;
public User() {
this.name = "";
this.email = "";
}
public User(String name, String email) {
this.name = n... | }
public String getName() {
return name;
}
public String getEmail() {
return email;
}
@Override
public String toString() {
return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}';
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-angular\src\main\java\com\baeldung\application\entities\User.java | 2 |
请完成以下Java代码 | public boolean isAttachmentStorable(@NonNull final AttachmentEntry attachmentEntry)
{
final StoreAttachmentServiceImpl service = extractFor(attachmentEntry);
if (service == null)
{
return false;
}
return service.isAttachmentStorable(attachmentEntry);
}
/**
* @return false if there is no StoreAttachme... | loggable.addLog("StoreAttachmentService - stored attachment to URI={}; storeAttachmentServiceImpl={}, attachment={}", storageIdentifier, service, attachmentEntry);
for (final AttachmentStoredListener attachmentStoredListener : attachmentStoredListeners)
{
attachmentStoredListener.attachmentWasStored(attachmentE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\storeattachment\StoreAttachmentService.java | 1 |
请完成以下Java代码 | public int getM_PriceList_Version_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_PriceList_Version_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_Product getM_Product() throws RuntimeException
{
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
.getPO(getM... | return bd;
}
/** Set List Price.
@param PriceList
List Price
*/
public void setPriceList (BigDecimal PriceList)
{
set_Value (COLUMNNAME_PriceList, PriceList);
}
/** Get List Price.
@return List Price
*/
public BigDecimal getPriceList ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Pric... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductPriceVendorBreak.java | 1 |
请完成以下Java代码 | public String getTenantId() {
return tenantId;
}
@Override
public Set<String> getVariableNames() {
return variables.keySet();
}
@Override
public Map<String, Object> getPlanItemInstanceLocalVariables() {
return localVariables;
}
@Override
public PlanItem get... | return planItem;
}
@Override
public String toString() {
return new StringJoiner(", ", getClass().getSimpleName() + "[", "]")
.add("id='" + id + "'")
.add("planItemDefinitionId='" + planItemDefinitionId + "'")
.add("elementId='" + elementId + "'")
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\ReadOnlyDelegatePlanItemInstanceImpl.java | 1 |
请完成以下Java代码 | protected String doIt()
{
patchEditableRow(createChangeRequest(getSingleSelectedRow()));
return MSG_OK;
}
@Override
protected void postProcess(final boolean success)
{
invalidateView();
}
private PricingConditionsRowChangeRequest createChangeRequest(@NonNull final PricingConditionsRow templateRow)
{
f... | .discount(discount)
.paymentTermId(Optional.ofNullable(paymentTermIdOrNull))
.paymentDiscount(Optional.ofNullable(paymentDiscountOverrideOrNull))
.sourcePricingConditionsBreakId(templatePricingConditionsBreak.getId())
.build();
}
private PriceSpecification createBasePricingSystemPrice(final BPartnerI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\process\PricingConditionsView_CopyRowToEditable.java | 1 |
请完成以下Java代码 | private boolean isEligibleToBeDisplayed(final Event event)
{
final int loginUserId = Env.getAD_User_ID(getCtx());
return event.hasRecipient(loginUserId);
}
private NotificationItem toNotificationItem(final Event event)
{
//
// Build summary text
final String summaryTrl = msgBL.getMsg(getCtx(), MSG_Notifi... | {
final String detailTrl = msgBL.getMsg(getCtx(), detailADMessage);
final String detailTrlParsed = EventHtmlMessageFormat.newInstance()
.setArguments(notification.getDetailADMessageParams())
.format(detailTrl);
if (!Check.isEmpty(detailTrlParsed, true))
{
if (detailBuf.length() > 0)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\notifications\SwingEventNotifierFrame.java | 1 |
请完成以下Java代码 | public static FutureClearingAmountMap ofGLJournal(
@NonNull final SAPGLJournal glJournal,
@NonNull final CurrencyCodeToCurrencyIdBiConverter currencyCodeConverter)
{
return glJournal.getLines()
.stream()
.map(line -> extractFutureClearingAmount(line, currencyCodeConverter))
.filter(Objects::nonNull... | }
final Amount amount = sapGLJournalLine.getAmount()
.negateIf(sapGLJournalLine.getPostingSign().isCredit())
.toAmount(currencyCodeConverter::getCurrencyCodeByCurrencyId);
return FutureClearingAmount.builder()
.key(openItemTrxInfo.getKey())
.amountSrc(amount)
.build();
}
public Optional<Amo... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\gljournal_sap\select_open_items\FutureClearingAmountMap.java | 1 |
请完成以下Java代码 | public boolean isDeferred() {
return deferred;
}
/**
* Expressions are compared using the concept of a <em>structural id</em>:
* variable and function names are anonymized such that two expressions with
* same tree structure will also have the same structural id and vice versa.
* Tw... | return getStructuralId().hashCode();
}
@Override
public String toString() {
return "TreeValueExpression(" + expr + ")";
}
/**
* Print the parse tree.
* @param writer
*/
public void dump(PrintWriter writer) {
NodePrinter.dump(writer, node);
}
private void... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\TreeValueExpression.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TbRuleEngineProducerService {
private final PartitionService partitionService;
public void sendToRuleEngine(TbQueueProducer<TbProtoQueueMsg<ToRuleEngineMsg>> producer,
TenantId tenantId, TbMsg tbMsg, TbQueueCallback callback) {
List<TopicPartitionInfo> tpi... | sendToRuleEngine(producer, tpi, tenantId, tbMsg, i == tpis.size() - 1 ? callback : null);
}
} else {
sendToRuleEngine(producer, tpis.get(0), tenantId, tbMsg, callback);
}
}
private void sendToRuleEngine(TbQueueProducer<TbProtoQueueMsg<ToRuleEngineMsg>> producer, TopicPar... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\common\TbRuleEngineProducerService.java | 2 |
请完成以下Java代码 | public Long getId() {
return this.id;
}
public String getText() {
return this.text;
}
public User getAuthor() {
return this.author;
}
public Post getPost() {
return this.post;
}
public void setId(Long id) {
this.id = id;
}
public void ... | public void setPost(Post post) {
this.post = post;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Comment comment = (Comment) o;
r... | repos\tutorials-master\persistence-modules\spring-boot-persistence-4\src\main\java\com\baeldung\listvsset\eager\list\fulldomain\Comment.java | 1 |
请完成以下Java代码 | public String getScore() {
if (gameContinues()) {
return getGameScore();
}
return "Win for " + leadingPlayer().name();
}
private String getGameScore() {
if (isScoreEqual()) {
return getEqualScore();
}
if (isAdvantage()) {
retur... | private Player leadingPlayer() {
if (server.pointsDifference(receiver) > 0) {
return server;
}
return receiver;
}
private boolean gameContinues() {
return !isGameFinished();
}
private String getSimpleScore() {
return String.format("%s-%s", server.scor... | repos\tutorials-master\patterns-modules\clean-architecture\src\main\java\com\baeldung\pattern\richdomainmodel\TennisGame.java | 1 |
请完成以下Java代码 | public class PartyType {
@XmlAttribute(name = "ean_party", required = true)
protected String eanParty;
/**
* Gets the value of the eanParty property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEanParty() {
return ea... | }
/**
* Sets the value of the eanParty property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEanParty(String value) {
this.eanParty = value;
}
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\PartyType.java | 1 |
请完成以下Java代码 | protected void handleInvocationInContext(final DelegateInvocation invocation) throws Exception {
CommandContext commandContext = Context.getCommandContext();
boolean wasAuthorizationCheckEnabled = commandContext.isAuthorizationCheckEnabled();
boolean wasUserOperationLogEnabled = commandContext.isUserOperati... | else if (execution instanceof CaseExecutionEntity) {
Context.setExecutionContext((CaseExecutionEntity) execution);
return true;
}
return false;
}
protected boolean isCurrentContextExecution(BaseDelegateExecution execution) {
CoreExecutionContext<?> coreExecutionContext = Context.getCoreExec... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\delegate\DefaultDelegateInterceptor.java | 1 |
请完成以下Java代码 | public class NoSuchSslBundleException extends RuntimeException {
private final String bundleName;
/**
* Create a new {@code SslBundleNotFoundException} instance.
* @param bundleName the name of the bundle that could not be found
* @param message the exception message
*/
public NoSuchSslBundleException(Stri... | */
public NoSuchSslBundleException(String bundleName, String message, @Nullable Throwable cause) {
super(message, cause);
this.bundleName = bundleName;
}
/**
* Return the name of the bundle that was not found.
* @return the bundle name
*/
public String getBundleName() {
return this.bundleName;
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\NoSuchSslBundleException.java | 1 |
请完成以下Java代码 | public boolean loadPDF(final byte[] data)
{
return loadPDF(new ByteArrayInputStream(data));
}
public boolean loadPDF(final InputStream is)
{
if (tmpFile != null) {
tmpFile.delete();
}
try {
tmpFile = File.createTempFile("adempiere", ".pdf");
tm... | }
} catch (IOException e) {
e.printStackTrace();
} finally {
os.close();
}
} catch (IOException e) {
e.printStackTrace();
}
return loadPDF(tmpFile.getAbsolutePath());
}
@Override
protected void finalize() throws Throwable {
if (tmpFile != null) {
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\pdf\viewer\PDFViewerBean.java | 1 |
请完成以下Java代码 | public void setAD_Table_ID (final int AD_Table_ID)
{
if (AD_Table_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Table_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Table_ID, AD_Table_ID);
}
@Override
public int getAD_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Table_ID);
}
@Override
public de.... | public int getCountProcessed()
{
return get_ValueAsInt(COLUMNNAME_CountProcessed);
}
@Override
public de.metas.async.model.I_C_Queue_PackageProcessor getC_Queue_PackageProcessor()
{
return get_ValueAsPO(COLUMNNAME_C_Queue_PackageProcessor_ID, de.metas.async.model.I_C_Queue_PackageProcessor.class);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_RV_Async_batch_statistics.java | 1 |
请完成以下Java代码 | protected byte[] readBinaryContent(FileItemStream stream) {
InputStream inputStream = getInputStream(stream);
return IoUtil.readInputStream(inputStream, stream.getFieldName());
}
protected InputStream getInputStream(FileItemStream stream) {
try {
return stream.openStream();
} ca... | }
public String getTextContent() {
return textContent;
}
public byte[] getBinaryContent() {
return binaryContent;
}
public String getFileName() {
return fileName;
}
}
} | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\mapper\MultipartFormData.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HUAccessService
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final IProductBL productBL = Services.get(IProductBL.class);
private final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class);
private final IHUStatusBL huStatusBL = Services.get(IHUStatusBL.cl... | return -1;
}
public Optional<IPair<ProductId, Quantity>> retrieveProductAndQty(@NonNull final I_M_HU vhu)
{
final IHUStorageFactory storageFactory = handlingUnitsBL.getStorageFactory();
final IHUStorage vhuStorage = storageFactory.getStorage(vhu);
if (vhuStorage == null)
{
return Optional.empty();
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\trace\HUAccessService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String profileDisplay(Model model) {
String displayusername,displaypassword,displayemail,displayaddress;
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ecommjava","root","");
PreparedStatement stmt = con.prepareStatement("sel... | try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/ecommjava","root","");
PreparedStatement pst = con.prepareStatement("update users set username= ?,email = ?,password= ?, address= ? where uid = ?;");
pst.setString(1, username);
p... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\controller\AdminController.java | 2 |
请完成以下Java代码 | public void setLieferscheinnummer(String value) {
this.lieferscheinnummer = value;
}
/**
* Gets the value of the pzn property.
*
*/
public long getPZN() {
return pzn;
}
/**
* Sets the value of the pzn property.
*
*/
public void setPZN(long value)... | this.retouregrund = value;
}
/**
* Gets the value of the charge property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCharge() {
return charge;
}
/**
* Sets the value of the charge property.
*
* @... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourePositionType.java | 1 |
请完成以下Java代码 | private void assertSameNotNullParentId(@NonNull final Collection<I_C_ElementValue> records)
{
if (records.isEmpty())
{
return;
}
ElementValueId commonParentId = null;
for (final I_C_ElementValue record : records)
{
final ElementValueId parentId = ElementValueId.ofRepoIdOrNull(record.getParent_ID());... | {
throw new AdempiereException("Element values have different parents: " + records);
}
}
}
// TODO: introduce ChartOfAccountsId as parameter
public ImmutableSet<ElementValueId> getElementValueIdsBetween(final String accountValueFrom, final String accountValueTo)
{
final AccountValueComparisonMode compar... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\ElementValueService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object postProcessAfterInitialization(Object bean, String beanName) {
if (bean instanceof DataSource) {
logger.info(() -> "DataSource bean has been found: " + bean);
final ProxyFactory proxyFactory = new ProxyFactory(bean);
proxyFactory.setProxyTargetClass(true);
... | this.dataSource = ProxyDataSourceBuilder.create(dataSource)
.name("DATA_SOURCE_PROXY")
.multiline()
.listener(listener)
.build();
}
@Override
public Object invoke(final MethodInvocation invocatio... | repos\Hibernate-SpringBoot-master\HibernateSpringBootLogSlowQueries\src\main\java\com\bookstore\config\DatasourceProxyBeanPostProcessor.java | 2 |
请完成以下Java代码 | public class Role {
@Id @GeneratedValue
Long id;
private Collection<String> roles;
@StartNode
private Person person;
@EndNode
private Movie movie;
public Role() {
}
public Collection<String> getRoles() {
return roles;
}
public Person getPerson() {
return p... | public Movie getMovie() {
return movie;
}
public void setRoles(Collection<String> roles) {
this.roles = roles;
}
public void setPerson(Person person) {
this.person = person;
}
public void setMovie(Movie movie) {
this.movie = movie;
}
} | repos\tutorials-master\persistence-modules\neo4j\src\main\java\com\baeldung\neo4j\domain\Role.java | 1 |
请完成以下Java代码 | protected String getXMLElementName() {
return ELEMENT_EVENT_START;
}
@Override
protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
String formKey = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_FORM_FORMKEY);
StartEvent... | writeQualifiedAttribute(ATTRIBUTE_EVENT_START_INITIATOR, startEvent.getInitiator(), xtw);
writeQualifiedAttribute(ATTRIBUTE_FORM_FORMKEY, startEvent.getFormKey(), xtw);
if (startEvent.getEventDefinitions() != null && startEvent.getEventDefinitions().size() > 0) {
writeDefaultAttribute(ATTRI... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\StartEventXMLConverter.java | 1 |
请完成以下Java代码 | public static String getCurrentTelemetryKey(OtaPackageType type, OtaPackageKey key) {
return getTelemetryKey("current_", type, key);
}
private static String getTelemetryKey(String prefix, OtaPackageType type, OtaPackageKey key) {
return prefix + type.getKeyPrefix() + "_" + key.getValue();
}... | default:
log.warn("Unsupported ota package type: [{}]", type);
return null;
}
}
public static <T> T getByOtaPackageType(Supplier<T> firmwareSupplier, Supplier<T> softwareSupplier, OtaPackageType type) {
switch (type) {
case FIRMWARE:
r... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\ota\OtaPackageUtil.java | 1 |
请完成以下Java代码 | public IScriptExecutor createScriptExecutor(final IDatabase targetDatabase, final ScriptType scriptType)
{
final Class<? extends IScriptExecutor> scriptExecutorClass = getScriptExecutorClass(targetDatabase.getDbType(), scriptType);
if (scriptExecutorClass == null)
{
throw new ScriptException("No script execut... | }
/**
* @return true if dry run mode is enabled
* @see #setDryRunMode(boolean)
*/
@Override
public boolean isDryRunMode()
{
return dryRunMode;
}
@Value(staticConstructor = "of")
private static class ScriptExecutorKey
{
final String dbType;
final ScriptType scriptType;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\executor\impl\DefaultScriptExecutorFactory.java | 1 |
请完成以下Java代码 | protected final BigDecimal getQtyToSet()
{
BigDecimal qty;
if (_qtySet)
{
qty = _qty;
}
else
{
final IProductionMaterial productionMaterial = getProductionMaterial();
qty = productionMaterial.getQty();
}
return qty;
}
@Override
public final IQualityInspectionLineBuilder setNegateQty(final... | {
_name = name;
return this;
}
protected final String getName()
{
return _name;
}
private IHandlingUnitsInfo getHandlingUnitsInfoToSet()
{
if (_handlingUnitsInfoSet)
{
return _handlingUnitsInfo;
}
return null;
}
@Override
public IQualityInspectionLineBuilder setHandlingUnitsInfo(final IHan... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionLineBuilder.java | 1 |
请完成以下Java代码 | public class ContractDiscount implements IPricingRule
{
private static final Logger logger = LogManager.getLogger(ContractDiscount.class);
@Override
public boolean applies(final IPricingContext pricingCtx, final IPricingResult result)
{
if (!result.isCalculated())
{
logger.debug("Cannot apply discount if th... | logger.debug("Not applying because pricingCtx has no referencedObject");
return false;
}
final I_C_Flatrate_Conditions conditions = ContractPricingUtil.getC_Flatrate_Conditions(referencedObject);
if (conditions == null)
{
logger.debug("Not applying because referencedObject='{}' has no C_Flatrate_Conditio... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\pricing\ContractDiscount.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void logUnconnectedRuntimeEnvironment(@NonNull Logger logger) {
if (logger.isInfoEnabled()) {
logger.info("No cluster was found; Spring Boot application is running in a [{}]"
+ " Cloud-managed Environment", getRuntimeEnvironmentName());
}
}
@Override
protected void configureTopology(@N... | extends ClusterAwareConfiguration.ClusterAwareCondition {
@Override
public synchronized boolean matches(@NonNull ConditionContext conditionContext,
@NonNull AnnotatedTypeMetadata typeMetadata) {
return isNotSupportedCloudPlatform(conditionContext)
&& super.matches(conditionContext, typeMetadata);
}
... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\ClusterAvailableConfiguration.java | 2 |
请完成以下Java代码 | public void delete(@NonNull final Document document)
{
trxManager.assertThreadInheritedTrxExists();
assertThisRepository(document.getEntityDescriptor());
DocumentPermissionsHelper.assertCanEdit(document, UserSession.getCurrentPermissions());
if (document.isNew())
{
throw new IllegalArgumentException("Can... | public int retrieveLastLineNo(final DocumentQuery query)
{
logger.debug("Retrieving last LineNo: query={}", query);
final DocumentEntityDescriptor entityDescriptor = query.getEntityDescriptor();
assertThisRepository(entityDescriptor);
final SqlDocumentQueryBuilder sqlBuilder = SqlDocumentQueryBuilder.of(quer... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlDocumentsRepository.java | 1 |
请完成以下Java代码 | public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
@Override
public org.compiere.model.I_M_RMA getRef_RMA() throws RuntimeException
{
r... | }
@Override
public void setSalesRep(org.compiere.model.I_AD_User SalesRep)
{
set_ValueFromPO(COLUMNNAME_SalesRep_ID, org.compiere.model.I_AD_User.class, SalesRep);
}
/** Set Vertriebsbeauftragter.
@param SalesRep_ID
Sales Representative or Company Agent
*/
@Override
public void setSalesRep_ID (int Sa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMA.java | 1 |
请完成以下Java代码 | public class IoUtil {
public static byte[] readInputStream(InputStream inputStream, String inputStreamName) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[16 * 1024];
try {
int bytesRead = inputStream.read(buffer);
while ... | BufferedOutputStream outputStream = null;
try {
outputStream = new BufferedOutputStream(new FileOutputStream(getFile(filePath)));
outputStream.write(content.getBytes());
outputStream.flush();
} catch (Exception e) {
throw new ActivitiException("Couldn't wr... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\IoUtil.java | 1 |
请完成以下Java代码 | public void save(@NonNull final ReplenishInfo replenishInfo)
{
final I_M_Replenish replenishRecord = getRecordByIdentifier(replenishInfo.getIdentifier())
.orElseGet(() -> initNewRecord(replenishInfo.getIdentifier()));
final BigDecimal levelMin = replenishInfo.getMin().getStockQty().toBigDecimal();
final Big... | @NonNull
private Optional<I_M_Replenish> getRecordByIdentifier(@NonNull final ReplenishInfo.Identifier identifier)
{
// if locator has been provided, give preference to replenish rules that are specific to that locator
final IQueryOrderBy locatorPreferenceOrderBy = queryBL.createQueryOrderByBuilder(I_M_Replenish.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\material\replenish\ReplenishInfoRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Optional<String> getValue(@NonNull final String name, @NonNull final ClientAndOrgId clientAndOrgId)
{
final Optional<String> value = SpringContextHolder.instance.getProperty(name);
if (value.isPresent())
{
return value;
}
return getMap().getValueAsString(name, clientAndOrgId);
}
@Override
publ... | final String sql = "SELECT Name, Value, AD_Client_ID, AD_Org_ID FROM AD_SysConfig"
+ " WHERE IsActive='Y'"
+ " ORDER BY Name, AD_Client_ID, AD_Org_ID";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
final ImmutableListMultimap.Builder<String, SysConfigEntryValue> resultBuilder = Immutab... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\impl\SysConfigDAO.java | 2 |
请完成以下Java代码 | public ExecutionQueryImpl orderByProcessDefinitionKey() {
orderBy(new QueryOrderingProperty(QueryOrderingProperty.RELATION_PROCESS_DEFINITION, ExecutionQueryProperty.PROCESS_DEFINITION_KEY));
return this;
}
public ExecutionQuery orderByTenantId() {
orderBy(ExecutionQueryProperty.TENANT_ID);
return ... | public String getExecutionId() {
return executionId;
}
public SuspensionState getSuspensionState() {
return suspensionState;
}
public void setSuspensionState(SuspensionState suspensionState) {
this.suspensionState = suspensionState;
}
public List<EventSubscriptionQueryValue> getEventSubscript... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExecutionQueryImpl.java | 1 |
请完成以下Java代码 | public IntentEventListenerInstanceQuery caseDefinitionId(String caseDefinitionId) {
innerQuery.caseDefinitionId(caseDefinitionId);
return this;
}
@Override
public IntentEventListenerInstanceQuery elementId(String elementId) {
innerQuery.planItemInstanceElementId(elementId);
... | @Override
public IntentEventListenerInstanceQuery orderBy(QueryProperty property) {
innerQuery.orderBy(property);
return this;
}
@Override
public IntentEventListenerInstanceQuery orderBy(QueryProperty property, NullHandlingOnOrder nullHandlingOnOrder) {
innerQuery.orderBy(proper... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\IntentEventListenerInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public void reportAdded(ObjectType objectType) {
getObjectGauge(objectType).incrementAndGet();
}
@Override
public void reportRemoved(ObjectType objectType) {
getObjectGauge(objectType).decrementAndGet();
}
@Override
public void reportEntityDataQuery(TenantId tenantId, EntityDat... | private void checkTiming(TenantId tenantId, EntityCountQuery query, long timingNanos) {
double timingMs = timingNanos / 1000_000.0;
String queryType = query instanceof EntityDataQuery ? "data" : "count";
if (timingMs < slowQueryThreshold) {
log.debug("[{}] Executed " + queryType + " ... | repos\thingsboard-master\common\edqs\src\main\java\org\thingsboard\server\edqs\stats\DefaultEdqsStatsService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PriorityChannel alphabetically() {
return new PriorityChannel(1000, (left, right) -> ((File) left.getPayload()).getName()
.compareTo(((File) right.getPayload()).getName()));
}
// @Bean
public IntegrationFlow fileMoverWithPriorityChannel() {
return IntegrationFlow.from(sou... | // @Bean
public IntegrationFlow anotherFileWriter() {
return IntegrationFlow.from("holdingTank")
.bridge(e -> e.poller(Pollers.fixedRate(Duration.of(2, TimeUnit.SECONDS.toChronoUnit()), Duration.of(10, TimeUnit.SECONDS.toChronoUnit()))))
.handle(anotherTargetDirectory())
... | repos\tutorials-master\spring-integration\src\main\java\com\baeldung\dsl\JavaDSLFileCopyConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ShipmentDeclarationId implements RepoIdAware
{
@JsonCreator
public static ShipmentDeclarationId ofRepoId(final int repoId)
{
return new ShipmentDeclarationId(repoId);
}
public static ShipmentDeclarationId ofRepoIdOrNull(@Nullable final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : null;
... | {
this.repoId = Check.assumeGreaterThanZero(repoId, "M_Shipment_Declaration_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static int toRepoId(final ShipmentDeclarationId id)
{
return id != null ? id.getRepoId() : -1;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipment\ShipmentDeclarationId.java | 2 |
请完成以下Java代码 | public Map<Class<?>, String> getBulkDeleteStatements() {
return bulkDeleteStatements;
}
public void setBulkDeleteStatements(Map<Class<?>, String> bulkDeleteStatements) {
this.bulkDeleteStatements = bulkDeleteStatements;
}
public Map<Class<?>, String> getSelectStatements() {
ret... | public String getDatabaseCatalog() {
return databaseCatalog;
}
public void setDatabaseCatalog(String databaseCatalog) {
this.databaseCatalog = databaseCatalog;
}
public String getDatabaseSchema() {
return databaseSchema;
}
public void setDatabaseSchema(String databaseS... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\db\DbSqlSessionFactory.java | 1 |
请完成以下Java代码 | public void setSendEMail (final boolean SendEMail)
{
set_Value (COLUMNNAME_SendEMail, SendEMail);
}
@Override
public boolean isSendEMail()
{
return get_ValueAsBoolean(COLUMNNAME_SendEMail);
}
@Override
public org.compiere.model.I_C_ElementValue getUser1()
{
return get_ValueAsPO(COLUMNNAME_User1_ID, or... | set_Value (COLUMNNAME_Volume, Volume);
}
@Override
public BigDecimal getVolume()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setWeight (final @Nullable BigDecimal Weight)
{
set_Value (COLUMNNAME_Weight, Weight);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOut.java | 1 |
请完成以下Java代码 | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Exam other = (Exam) obj;
if (description == null) {
if (other.description != null)
... | return false;
if (shortText == null) {
if (other.shortText != null)
return false;
} else if (!shortText.equals(other.shortText))
return false;
if (text == null) {
if (other.text != null)
return false;
} else if (!text.eq... | repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\text\Exam.java | 1 |
请完成以下Java代码 | public static final class VarBuilder extends Builder<VarBuilder> {
private VarBuilder(String name) {
super(name, false);
}
/**
* Sets no value.
* @return the property declaration
*/
public KotlinPropertyDeclaration empty() {
return new KotlinPropertyDeclaration(this);
}
@Override
protect... | return this;
}
/**
* Builds the accessor.
* @return the parent getter / setter
*/
public T buildAccessor() {
this.accessorFunction.accept(new Accessor(this));
return this.parent;
}
}
static final class Accessor implements Annotatable {
private final AnnotationContainer annotations;
pri... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\kotlin\KotlinPropertyDeclaration.java | 1 |
请完成以下Java代码 | public boolean isAutoInvoice(@NonNull final JsonOLCandCreateRequest request, @NonNull final BPartnerId bpartnerId)
{
if (request.getIsAutoInvoice() != null)
{
return request.getIsAutoInvoice();
}
return bPartnerEffectiveBL.getById(bpartnerId).isAutoInvoice(SOTrx.SALES);
}
@Nullable
public Incoterms getI... | {
incoterms = incotermsRepository.getByValue(request.getIncotermsValue(), orgId);
}
else
{
incoterms = bPartnerEffectiveBL.getById(bPartnerId).getIncoterms(SOTrx.SALES);
}
if(incoterms == null)
{
return null;
}
return StringUtils.trimBlankToNull(request.getIncotermsLocation()) == null ? incot... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\bpartner\BPartnerMasterdataProvider.java | 1 |
请完成以下Java代码 | 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)
{
if (ExternalSys... | set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setWriteAudit (final boolean WriteAudit)
{
set_Value (COLUMNNAME_WriteAudit, WriteAudit);
}
@Override
public boolean isWriteAudit()
{
return get_Va... | 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 EntityViewDataValidator extends DataValidator<EntityView> {
private final EntityViewDao entityViewDao;
private final TenantService tenantService;
private final CustomerDao customerDao;
@Override
protected void validateCreate(TenantId tenantId, EntityView entityView) {
entityVi... | protected void validateDataImpl(TenantId tenantId, EntityView entityView) {
validateString("Entity view name", entityView.getName());
validateString("Entity view type", entityView.getType());
if (entityView.getTenantId() == null) {
throw new DataValidationException("Entity view shoul... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\EntityViewDataValidator.java | 2 |
请完成以下Java代码 | public AdElementId getADElementIdByColumnNameOrNull(@NonNull final String columnName)
{
return queryADElementByColumnName(columnName)
.create()
.firstIdOnly(AdElementId::ofRepoIdOrNull);
}
private IQueryBuilder<I_AD_Element> queryADElementByColumnName(@NonNull final String columnName)
{
return Services... | private void make_AD_Element_Mandatory_In_AD_Tab()
{
final I_AD_Column elementIdColumn = Services.get(IADTableDAO.class).retrieveColumn(I_AD_Tab.Table_Name, I_AD_Tab.COLUMNNAME_AD_Element_ID);
makeElementColumnMandatory(elementIdColumn);
}
private void makeElementColumnMandatory(final I_AD_Column elementIdColu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\element\api\impl\ADElementDAO.java | 1 |
请完成以下Java代码 | public void setResetDate(Instant resetDate) {
this.resetDate = resetDate;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public Set<Authority> getAuthorities() {
return authorities;
}
... | @Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "User{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + em... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\domain\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/login").permitAll()
.antMatchers("/logout").permitAll()
.antMatchers("/images/**").permitAll()
... | public String encode(CharSequence rawPassword) {
return MD5Util.encode((String) rawPassword);
}
@Override
public boolean matches(CharSequence rawPassword, String encodedPassword) {
return encodedPassword.equals(MD5Util.encode((String) rawPassword));
... | repos\springBoot-master\springboot-springSecurity4\src\main\java\com\yy\example\config\WebSecurityConfig.java | 2 |
请完成以下Java代码 | public void valueChanged (ListSelectionEvent e)
{
if (e.getValueIsAdjusting())
return;
ListItem selected = null;
try
{ // throws a ArrayIndexOutOfBoundsException if root is selected
selected = (ListItem)centerList.getSelectedValue();
}
catch (Exception ex)
{
}
log.info("Selected=" + selected);
... | }
} // action_treeDelete
/**
* Action: Add All Nodes to Tree
*/
private void action_treeAddAll()
{
log.info("");
ListModel model = centerList.getModel();
int size = model.getSize();
int index = -1;
for (index = 0; index < size; index++)
{
ListItem item = (ListItem)model.getElementAt(index);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTreeMaintenance.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
spring.datasource.username=root
spring.datasource | .password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | repos\spring-boot-leaning-master\2.x_42_courses\第 3-1 课: Spring Boot 使用 JDBC 操作数据库\spring-boot-jdbc\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private static String timeToString(@Nullable final LocalTime time)
{
if (time == null)
{
return "";
}
return time.format(TIME_FORMATTER);
}
private static String intToString(@NonNull final Optional<Integer> integer)
{
if (integer.isPresent())
{
return Integer.toString(integer.get());
}
return... | }
private static String bigDecimalToString(@Nullable final BigDecimal bigDecimal)
{
if (bigDecimal == null)
{
return "";
}
return bigDecimal.toString();
}
private static String stringToString(@NonNull final Optional<String> string)
{
if (string.isPresent())
{
return string.get();
}
return "... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\misc\Converters.java | 1 |
请完成以下Java代码 | public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public String getText() {
return this.text;
}
public void setText(String text) {
... | }
public String getSummary() {
return this.summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
@Override
public String toString() {
return "Message{" +
"id=" + id +
", text='" + text + '\'' +
", summary='" + summary + '\'' +
", createDate=" + createDate +
'}'... | repos\spring-boot-leaning-master\2.x_42_courses\第 2-9 课:Spring Boot 中使用 Swagger2 构建 RESTful APIs\spring-boot-swagger\src\main\java\com\neo\model\Message.java | 1 |
请完成以下Java代码 | private static HUQRCodePackingInfo fromJson(@NonNull final JsonHUQRCodePackingInfoV1 json)
{
return HUQRCodePackingInfo.builder()
.huUnitType(json.getHuUnitType())
.packingInstructionsId(json.getPackingInstructionsId())
.caption(json.getCaption())
.build();
}
private static JsonHUQRCodeProductInfo... | .displayName(attribute.getDisplayName())
.value(attribute.getValue())
// NOTE: in order to make the generated JSON shorter,
// we will set valueRendered only if it's different from value.
.valueRendered(
!Objects.equals(attribute.getValue(), attribute.getValueRendered())
? attribute.getVal... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\model\json\v1\JsonConverterV1.java | 1 |
请完成以下Java代码 | public static void connectBeforeSubscribe() throws InterruptedException {
ConnectableObservable obs = getObservable().doOnNext(x -> LOGGER.info("saving " + x)).publish();
LOGGER.info("connecting:");
Subscription s = obs.connect();
Thread.sleep(1000);
LOGGER.info("subscribing #1"... | LOGGER.info("unsubscribe#1");
subscription1.unsubscribe();
Thread.sleep(1000);
LOGGER.info("unsubscribe#2");
subscription2.unsubscribe();
}
private static Observable getObservable() {
return Observable.create(subscriber -> {
frame.addMouseListener(new MouseA... | repos\tutorials-master\rxjava-modules\rxjava-observables\src\main\java\com\baeldung\rxjava\MultipleSubscribersHotObs.java | 1 |
请完成以下Java代码 | public String getAddressLine1() {
return addressLine1;
}
public void setAddressLine1(String addressLine1) {
this.addressLine1 = addressLine1;
}
public String getAddressLine2() {
return addressLine2;
}
public void setAddressLine2(String addressLine2) {
this.addr... | public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public String toString() {
return "Address [id=" + id + ", addressLine1=" + addressLine1 + ", addressLine2=" + addressLine2 + ", city=" + city + "]";
}
} | repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\ebean\model\Address.java | 1 |
请完成以下Java代码 | public String getPrvcOfBirth() {
return prvcOfBirth;
}
/**
* Sets the value of the prvcOfBirth property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrvcOfBirth(String value) {
this.prvcOfBirth = value;
}
... | *
*/
public void setCityOfBirth(String value) {
this.cityOfBirth = value;
}
/**
* Gets the value of the ctryOfBirth property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCtryOfBirth() {
return ctryOf... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\DateAndPlaceOfBirth.java | 1 |
请完成以下Java代码 | public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLastName() ... | return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public List<Address> getAddressList() {
return addressList;
}
public void setAddressList(List<Address> addressList) {
this.addressList = addressList;
}
} | repos\tutorials-master\persistence-modules\hibernate-jpa\src\main\java\com\baeldung\hibernate\pessimisticlocking\Customer.java | 1 |
请完成以下Java代码 | public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setQtyOnHand (final @Nullable BigDecimal QtyOnHand)
{
set_ValueNoCheck (COLUMNNAME_QtyOnHand, QtyOnHand);
}
@Override
public BigDecimal getQtyOnHand()
{
final BigDecimal bd = get_ValueAsBigDecimal(C... | }
@Override
public void setQtyReserved (final @Nullable BigDecimal QtyReserved)
{
set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved);
}
@Override
public BigDecimal getQtyReserved()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_RV_M_HU_Storage_InvoiceHistory.java | 1 |
请完成以下Java代码 | public void abort(final WFProcessId wfProcessId, final UserId callerId)
{
jobService.abort(wfProcessId, callerId);
}
@Override
public void abortAll(final UserId callerId)
{
jobService.abortAll(callerId);
}
@Override
public void logout(final @NonNull UserId userId)
{
abortAll(userId);
}
@Override
pu... | ? warehouses.getById(inventory.getWarehouseId()).getWarehouseName()
: "")
.build())
.build();
}
@NonNull
public static Inventory getInventory(final @NonNull WFProcess wfProcess)
{
return wfProcess.getDocumentAs(Inventory.class);
}
public static WFProcess mapJob(@NonNull final WFProcess wfPro... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\InventoryMobileApplication.java | 1 |
请完成以下Java代码 | private Object normalizeValue(final Object value, final ModelType model, final AggregationItem aggregationItem)
{
final int displayType = aggregationItem.getDisplayType();
if (DisplayType.isID(displayType))
{
final Integer valueInt = (Integer)value;
if (valueInt == null)
{
return 0;
}
else if... | }
else if (DisplayType.isText(displayType))
{
return value == null ? 0 : toHashcode(value.toString());
}
else if (displayType == DisplayType.YesNo)
{
return DisplayType.toBooleanNonNull(value, false);
}
else
{
return value;
}
}
private static int toHashcode(final String s)
{
if (Check.i... | repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\impl\GenericAggregationKeyBuilder.java | 1 |
请完成以下Java代码 | public Capacity getCapacity(
@NonNull final I_M_HU_Item huItem,
final I_M_Product product,
final I_C_UOM uom,
final ZonedDateTime date)
{
final ProductId productId = ProductId.ofRepoIdOrNull(product != null ? product.getM_Product_ID() : -1);
return getCapacity(huItem, productId, uom, date);
}
@Overr... | Check.assumeNotNull(itemDefProduct, "Error: Null record");
// item which allows any product should have infinite capacity and no product assigned
if (itemDefProduct.isAllowAnyProduct() && (itemDefProduct.getM_Product_ID() > 0 || !isInfiniteCapacity(itemDefProduct)))
{
return false;
}
if (isInfiniteCapacit... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUCapacityBL.java | 1 |
请完成以下Java代码 | public int getC_LicenseFeeSettings_ID()
{
return get_ValueAsInt(COLUMNNAME_C_LicenseFeeSettings_ID);
}
@Override
public void setCommission_Product_ID (final int Commission_Product_ID)
{
if (Commission_Product_ID < 1)
set_Value (COLUMNNAME_Commission_Product_ID, null);
else
set_Value (COLUMNNAME_Com... | {
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setPointsPrecision (final int PointsPrecision)
{
set_Value (COLUMNNAME_PointsPrecision, PointsPrecision);
}
@Override
public int getPointsPrecision... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_LicenseFeeSettings.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Table_ID);
}
@Override
public void setIsCreateWarningOnTarget (final boolean IsCreateWarningOnTarget)
{
set_Value (COLUMNNAME_IsCreateWarningOnTarget, IsCreateWarningOnTarget);
}
@Override
public boolean isCreateWarningOnTarget()
{
ret... | @Override
public void setValidation_Rule(final org.compiere.model.I_AD_Val_Rule Validation_Rule)
{
set_ValueFromPO(COLUMNNAME_Validation_Rule_ID, org.compiere.model.I_AD_Val_Rule.class, Validation_Rule);
}
@Override
public void setValidation_Rule_ID (final int Validation_Rule_ID)
{
if (Validation_Rule_ID < 1... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule.java | 1 |
请完成以下Java代码 | public void setBeanResolver(BeanResolver beanResolver) {
this.beanResolver = beanResolver;
}
/**
* Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use
* the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}.
*
* @since 5.8
*/
public void setSec... | /**
* Obtains the specified {@link Annotation} on the specified {@link MethodParameter}.
* {@link MethodParameter}
* @param parameter the {@link MethodParameter} to search for an {@link Annotation}
* @return the {@link Annotation} that was found or null.
*/
@SuppressWarnings("unchecked")
private @Nullable A... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\method\annotation\AuthenticationPrincipalArgumentResolver.java | 1 |
请完成以下Java代码 | public int getC_Location_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Location_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name,... | }
/** Set Suchschlüssel.
@param Value
Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Suchschlüssel für den Eintrag im erforderlichen Format... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_Allotment.java | 1 |
请完成以下Java代码 | final class CostCollectorCandidateFinishedGoodsHUProducer extends AbstractPPOrderReceiptHUProducer
{
private final transient IHUPPOrderBL huPPOrderBL = Services.get(IHUPPOrderBL.class);
private final I_PP_Order ppOrder;
private final ProductId productId;
public CostCollectorCandidateFinishedGoodsHUProducer(final ... | {
final I_PP_Order order = getPP_Order();
final PPOrderId orderId = PPOrderId.ofRepoId(order.getPP_Order_ID());
final OrgId orgId = OrgId.ofRepoId(order.getAD_Org_ID());
return ReceiptCandidateRequestProducer.builder()
.orderId(orderId)
.orgId(orgId)
.date(getMovementDate())
.locatorId(getLocat... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\CostCollectorCandidateFinishedGoodsHUProducer.java | 1 |
请完成以下Java代码 | public void setWeight (final @Nullable BigDecimal Weight)
{
set_Value (COLUMNNAME_Weight, Weight);
}
@Override
public BigDecimal getWeight()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Weight);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setWeight_UOM_ID (final int We... | @Override
public int getWeight_UOM_ID()
{
return get_ValueAsInt(COLUMNNAME_Weight_UOM_ID);
}
@Override
public void setWidthInCm (final int WidthInCm)
{
set_Value (COLUMNNAME_WidthInCm, WidthInCm);
}
@Override
public int getWidthInCm()
{
return get_ValueAsInt(COLUMNNAME_WidthInCm);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws IOException
{
if (args.length < 1) usage();
new Distance(args[0]).execute();
}
protected Result getTargetVector()
{
final int words = vectorsReader.getNumWords();
final int size = vectorsReader.getSize();
String[] in... | continue;
}
len = Math.sqrt(len);
for (int i = 0; i < size; i++)
{
vec[i] /= len;
}
return new Result(vec, new int[]{bi});
}
return null;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Distance.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8761 # 设置 Eureka-Server 的端口
spring:
application:
name: eureka-server
eureka:
client:
register-with-eureka: false # 不注册到 Eureka-Serve | r,默认为 true
fetch-registry: false # 不从 Eureka-Server 获取注册表,默认为 true | repos\SpringBoot-Labs-master\labx-22\labx-22-scn-eureka-server-standalone\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public OrderLineBuilder manualDiscount(final BigDecimal manualDiscount)
{
assertNotBuilt();
this.manualDiscount = manualDiscount;
return this;
}
public OrderLineBuilder setDimension(final Dimension dimension)
{
assertNotBuilt();
this.dimension = dimension;
return this;
}
public boolean isProductAn... | }
public OrderLineBuilder details(@NonNull final Collection<OrderLineDetailCreateRequest> details)
{
assertNotBuilt();
detailCreateRequests.addAll(details);
return this;
}
public OrderLineBuilder detail(@NonNull final OrderLineDetailCreateRequest detail)
{
assertNotBuilt();
detailCreateRequests.add(det... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderLineBuilder.java | 1 |
请完成以下Java代码 | public int[] getBrownClusterFullString()
{
return brownClusterFullString;
}
@Override
public boolean equals(Object obj)
{
if (obj instanceof Sentence)
{
Sentence sentence = (Sentence) obj;
if (sentence.words.length != words.length)
ret... | if (equals(o))
return 0;
return hashCode() - o.hashCode();
}
@Override
public int hashCode()
{
int hash = 0;
for (int tokenId = 0; tokenId < words.length; tokenId++)
{
hash ^= (words[tokenId] * tags[tokenId]);
}
return hash;
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\structures\Sentence.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Element getElementByTag(@NonNull final Node node, @NonNull final String tagName)
{
final Element element = node instanceof Document
? ((Document)node).getDocumentElement()
: (Element)node;
final NodeList nodeList = element.getElementsByTagName(tagName);
if (nodeList.getLength() == 0)
{
... | @NonNull
public static String addXMLDeclarationIfNeeded(@NonNull final String payload)
{
if (payload.trim().startsWith("<?xml")) {
// Payload already contains XML declaration
return payload;
}
final String xmlDeclaration = String.format(
"<?xml version=\"1.0\" encoding=\"%s\" standalone=\"%s\"?>\n",
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\util\XMLUtil.java | 2 |
请完成以下Java代码 | public void setIsPostalValidated (final boolean IsPostalValidated)
{
set_ValueNoCheck (COLUMNNAME_IsPostalValidated, IsPostalValidated);
}
@Override
public boolean isPostalValidated()
{
return get_ValueAsBoolean(COLUMNNAME_IsPostalValidated);
}
@Override
public void setLatitude (final @Nullable BigDecima... | }
@Override
public java.lang.String getPostal()
{
return get_ValueAsString(COLUMNNAME_Postal);
}
@Override
public void setPostal_Add (final @Nullable java.lang.String Postal_Add)
{
set_ValueNoCheck (COLUMNNAME_Postal_Add, Postal_Add);
}
@Override
public java.lang.String getPostal_Add()
{
return ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Location.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected Properties loadFrom(Resource location, String prefix, Charset encoding) throws IOException {
prefix = prefix.endsWith(".") ? prefix : prefix + ".";
Properties source = loadSource(location, encoding);
Properties target = new Properties();
for (String key : source.stringPropertyNames()) {
if (key.sta... | @Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
ResourceLoader loader = context.getResourceLoader();
Environment environment = context.getEnvironment();
String location = environment.getProperty("spring.info.git.location");
if (location == null... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\info\ProjectInfoAutoConfiguration.java | 2 |
请完成以下Java代码 | public de.metas.marketing.base.model.I_MKTG_Platform getMKTG_Platform() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_MKTG_Platform_ID, de.metas.marketing.base.model.I_MKTG_Platform.class);
}
@Override
public void setMKTG_Platform(de.metas.marketing.base.model.I_MKTG_Platform MKTG_Platform)
{
set_... | @Override
public void setRemoteRecordId (java.lang.String RemoteRecordId)
{
set_Value (COLUMNNAME_RemoteRecordId, RemoteRecordId);
}
/** Get Externe Datensatz-ID.
@return Externe Datensatz-ID */
@Override
public java.lang.String getRemoteRecordId ()
{
return (java.lang.String)get_Value(COLUMNNAME_Remot... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Campaign.java | 1 |
请完成以下Java代码 | public byte[] getBase64() {
return base64;
}
/**
* Sets the value of the base64 property.
*
* @param value
* allowed object is
* byte[]
*/
public void setBase64(byte[] value) {
this.base64 = value;
}
/**
* Gets the value of the title prop... | this.filename = value;
}
/**
* Gets the value of the mimeType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMimeType() {
return mimeType;
}
/**
* Sets the value of the mimeType property.
*
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\response\DocumentType.java | 1 |
请完成以下Java代码 | public KeyValues getLowCardinalityKeyValues(GatewayContext context) {
KeyValues keyValues = KeyValues.empty();
if (context.getCarrier() == null) {
return keyValues;
}
Route route = context.getServerWebExchange().getAttribute(ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR);
if (route != null) {
keyValues = ke... | public KeyValues getHighCardinalityKeyValues(GatewayContext context) {
return KeyValues.of(URI.withValue(context.getRequest().getURI().toString()));
}
@Override
public String getName() {
return "http.client.requests";
}
@Override
public @Nullable String getContextualName(GatewayContext context) {
if (cont... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\observation\DefaultGatewayObservationConvention.java | 1 |
请完成以下Java代码 | public void setM_FixChangeNotice_ID (int M_FixChangeNotice_ID)
{
if (M_FixChangeNotice_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_FixChangeNotice_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_FixChangeNotice_ID, Integer.valueOf(M_FixChangeNotice_ID));
}
/** Get Fixed in.
@return Fixed in Change Notice
... | set_ValueNoCheck (COLUMNNAME_PP_Product_BOM_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID));
}
/** Get BOM & Formula.
@return BOM & Formula
*/
public int getPP_Product_BOM_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID);
if (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ChangeRequest.java | 1 |
请完成以下Java代码 | public ShortValue createValue(Object value, Map<String, Object> valueInfo) {
return Variables.shortValue((Short) value, isTransient(valueInfo));
}
@Override
public ValueType getParent() {
return ValueType.NUMBER;
}
@Override
public ShortValue convertFromTypedValue(TypedValue typedV... | return true;
}
}
public static class StringTypeImpl extends PrimitiveValueTypeImpl {
private static final long serialVersionUID = 1L;
public StringTypeImpl() {
super(String.class);
}
public StringValue createValue(Object value, Map<String, Object> valueInfo) {
return Variables.st... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\type\PrimitiveValueTypeImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public URL getResourceURLOrNull(
@Nullable final PrintFormatId printFormatId,
@Nullable final String resourceName)
{
// Skip if it's not about our hooked image attachment resources
if (!isAttachmentImageResourceName(resourceName))
{
return null;
}
if (printFormatId == null)
{
return null;
}
... | final List<AttachmentEntry> entries = attachmentEntryService.getByReferencedRecord(TableRecordReference.of(I_AD_PrintFormat.Table_Name, printFormatId));
if (!entries.isEmpty())
{
final AttachmentEntry entry = entries.get(0);
return entry.getId();
}
else
{
return null;
}
}
/**
* @return true i... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\class_loader\images\attachment\AttachmentImageFileClassLoaderHook.java | 2 |
请完成以下Java代码 | public class CdiResolver extends ELResolver {
protected jakarta.el.ELContext context;
public CdiResolver() {
context = new jakarta.el.ELContext() {
@Override
public VariableMapper getVariableMapper() {
return null;
}
@Override
... | context.setPropertyResolved(result != null);
return result;
}
}
@Override
public boolean isReadOnly(ELContext context, Object base, Object property) {
return getWrappedResolver().isReadOnly(this.context, base, property);
}
@Override
public void setValue(ELContext co... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\el\CdiResolver.java | 1 |
请完成以下Java代码 | public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Calendar getCreated() {
return this.created;
}
public void setCreated(Calendar created) {
this.created = created;
}
public String getText() {
return this.text; | }
public void setText(String text) {
this.text = text;
}
public String getSummary() {
return this.summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
} | repos\spring-boot-leaning-master\2.x_42_courses\第 2-8 课: Spring Boot 构建一个 RESTful Web 服务\spring-boot-web-restful\src\main\java\com\neo\model\Message.java | 1 |
请完成以下Java代码 | public void setOperation (String Operation)
{
set_Value (COLUMNNAME_Operation, Operation);
}
/** Get Arbeitsvorgang .
@return Compare Operation
*/
public String getOperation ()
{
return (String)get_Value(COLUMNNAME_Operation);
}
/** Type AD_Reference_ID=540202 */
public static final int TYPE_AD_Ref... | public static final String TYPE_ContextValue = "CV";
/** Set Art.
@param Type
Type of Validation (SQL, Java Script, Java Language)
*/
public void setType (String Type)
{
set_Value (COLUMNNAME_Type, Type);
}
/** Get Art.
@return Type of Validation (SQL, Java Script, Java Language)
*/
public String... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_AD_TriggerUI_Criteria.java | 1 |
请完成以下Java代码 | public class JavaTypeDeclaration extends TypeDeclaration {
private int modifiers;
private final List<JavaFieldDeclaration> fieldDeclarations = new ArrayList<>();
private final List<JavaMethodDeclaration> methodDeclarations = new ArrayList<>();
JavaTypeDeclaration(String name) {
super(name);
}
/**
* Sets ... | }
/**
* Adds the given method declaration.
* @param methodDeclaration the method declaration
*/
public void addMethodDeclaration(JavaMethodDeclaration methodDeclaration) {
this.methodDeclarations.add(methodDeclaration);
}
/**
* Returns the method declarations.
* @return the method declarations
*/
p... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\java\JavaTypeDeclaration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<PMESU1> getPMESU1() {
if (pmesu1 == null) {
pmesu1 = new ArrayList<PMESU1>();
}
return this.pmesu1;
}
/**
* Gets the value of the phand1 property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. The... | * Gets the value of the detail property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the d... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\PPACK1.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode()
{
return Objects.hash(name, value);
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class EbayTaxReference {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).... | /**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o)
{
if (o == null)
{
return "null";
}
return o.toString().replace("\n", "\n ");
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\EbayTaxReference.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.