instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper("memoizing-last-call")
.addValue(delegate)
.toString();
}
@Override
public R apply(final T input)
{
final K key = keyFunction.apply(input);
lock.readLock().lock();
boolean readLockAcquired = true;
boolean writeLockAcquired... | {
final ReadLock readLock = lock.readLock();
readLock.lock();
try
{
return lastValue;
}
finally
{
readLock.unlock();
}
}
@Override
public void forget()
{
final WriteLock writeLock = lock.writeLock();
writeLock.lock();
try
{
lastKey = null;
lastValue = null;... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\Functions.java | 1 |
请完成以下Java代码 | public class JpaAlarmCommentDao extends JpaPartitionedAbstractDao<AlarmCommentEntity, AlarmComment> implements AlarmCommentDao, TenantEntityDao<AlarmComment> {
private final SqlPartitioningRepository partitioningRepository;
@Value("${sql.alarm_comments.partition_size:168}")
private int partitionSizeInHours;... | }
@Override
public PageData<AlarmComment> findAllByTenantId(TenantId tenantId, PageLink pageLink) {
return DaoUtil.toPageData(alarmCommentRepository.findByTenantId(tenantId.getId(), DaoUtil.toPageable(pageLink)));
}
@Override
protected Class<AlarmCommentEntity> getEntityClass() {
r... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\alarm\JpaAlarmCommentDao.java | 1 |
请完成以下Java代码 | public <T> T findInCache(Class<T> entityClass, String id) {
CachedEntity cachedObject = null;
Map<String, CachedEntity> classCache = cachedObjects.get(entityClass);
if (classCache == null) {
classCache = findClassCacheByCheckingSubclasses(entityClass);
}
if (classCa... | if (classCache == null) {
classCache = findClassCacheByCheckingSubclasses(entityClass);
}
if (classCache != null) {
List<T> entities = new ArrayList<T>(classCache.size());
for (CachedEntity cachedObject : classCache.values()) {
entities.add((T) cached... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\cache\EntityCacheImpl.java | 1 |
请完成以下Java代码 | public String[] getActiveContextsInfo()
{
final List<Properties> activeContextsCopy = new ArrayList<>(activeContexts);
final int count = activeContextsCopy.size();
final List<String> activeContextsInfo = new ArrayList<>(count);
int index = 1;
for (final Properties ctx : activeContextsCopy)
{
if (ctx == ... | final int adUserId = Env.getAD_User_ID(ctx);
final int adRoleId = Env.getAD_Role_ID(ctx);
final int adSessionId = Env.getAD_Session_ID(ctx);
return "Thread=" + threadName + "(" + threadId + ")"
//
+ "\n"
+ ", Client/Org=" + adClientId + "/" + adOrgId
+ ", User/Role=" + adUserId + "/" + adRoleId
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\context\TraceContextProviderListener.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Produkt.
@return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()
{
Integer... | set_Value (COLUMNNAME_MultiplyRate, MultiplyRate);
}
/** Get Faktor.
@return Rate to multiple the source by to calculate the target.
*/
@Override
public java.math.BigDecimal getMultiplyRate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MultiplyRate);
if (bd == null)
return BigDecimal.ZERO;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_UOM_Conversion.java | 1 |
请完成以下Java代码 | public static class CheckTableRecordReferenceInterceptor extends AbstractModelInterceptor
{
public static CheckTableRecordReferenceInterceptor INSTANCE = new CheckTableRecordReferenceInterceptor();
private CheckTableRecordReferenceInterceptor()
{
}
@Override
protected void onInit(final IModelValidationEn... | final PartitionConfig augmentedConfig = partitionerService.augmentPartitionerConfig(config, Collections.singletonList(descriptor));
if (!augmentedConfig.isChanged())
{
return; // we are done
}
// now that the augmented config is stored, further changes will be handeled by AddToPartitionInterceptor.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\model\interceptor\PartitionerInterceptor.java | 1 |
请完成以下Java代码 | public void onError(Throwable e) {
System.out.println("error");
}
@Override
public void onCompleted() {
System.out.println("Subscriber1 completed");
}
};
}
static Observer<Integer> getSecondObserver() {
return new ... | @Override
public void onError(Throwable e) {
System.out.println("error");
}
@Override
public void onCompleted() {
System.out.println("Subscriber2 completed");
}
};
}
public static void main(String[] args) throw... | repos\tutorials-master\rxjava-modules\rxjava-core\src\main\java\com\baeldung\rxjava\SubjectImpl.java | 1 |
请完成以下Java代码 | private static void finishJob(XxlJobLog xxlJobLog){
// 1、handle success, to trigger child job
String triggerChildMsg = null;
if (XxlJobContext.HANDLE_CODE_SUCCESS == xxlJobLog.getHandleCode()) {
XxlJobInfo xxlJobInfo = XxlJobAdminConfig.getAdminConfig().getXxlJobInfoDao().loadById(x... | }
}
if (triggerChildMsg != null) {
xxlJobLog.setHandleMsg( xxlJobLog.getHandleMsg() + triggerChildMsg );
}
// 2、fix_delay trigger next
// on the way
}
private static boolean isNumeric(String str){
try {
int result = Integer.valueOf(str)... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\complete\XxlJobCompleter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableList<IssueEntity> listIssues()
{
return root.listAllNodesBelow()
.stream()
.map(Node::getValue)
.collect(ImmutableList.toImmutableList());
}
public boolean hasNodeForId(@NonNull final IssueId issueId)
{
return listIssues().stream().map(IssueEntity::getIssueId).anyMatch(issueId::equa... | .stream()
.map(Node::getValue)
.collect(ImmutableList.toImmutableList());
}
private Optional<IssueEntity> getIssueForId(@NonNull final IssueId issueId)
{
return listIssues()
.stream()
.filter(issueEntity -> issueId.equalsNullSafe(issueEntity.getIssueId()))
.findFirst();
}
private IssueHiera... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\issue\hierarchy\IssueHierarchy.java | 2 |
请完成以下Java代码 | public void notify(DmnDecisionTableEvaluationEvent evaluationEvent) {
// collector is registered as decision evaluation listener
}
public void notify(DmnDecisionEvaluationEvent evaluationEvent) {
long executedDecisionInstances = evaluationEvent.getExecutedDecisionInstances();
long executedDecisionEleme... | public long getExecutedDecisionElements() {
return executedDecisionElements.get();
}
@Override
public long clearExecutedDecisionInstances() {
return executedDecisionInstances.getAndSet(0);
}
@Override
public long clearExecutedDecisionElements() {
return executedDecisionElements.getAndSet(0);
... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\metrics\DefaultEngineMetricCollector.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected SecurityUser authenticateByPublicId(String publicId, String authContextName, UserPrincipal userPrincipal) {
TenantId systemId = TenantId.SYS_TENANT_ID;
CustomerId customerId;
try {
customerId = new CustomerId(UUID.fromString(publicId));
} catch (Exception e) {
... | UserPrincipal principal = userPrincipal == null ? new UserPrincipal(UserPrincipal.Type.PUBLIC_ID, publicId) : userPrincipal;
return new SecurityUser(user, true, principal);
}
protected SecurityUser authenticateByUserId(TenantId tenantId, UserId userId) {
UserAuthDetails userAuthDetails = userA... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\AbstractAuthenticationProvider.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Config
{
/**
* 是否是索引分词(合理地最小分割),indexMode代表全切分词语的最小长度(包含)
*/
public int indexMode = 0;
/**
* 是否识别中国人名
*/
public boolean nameRecognize = true;
/**
* 是否识别音译人名
*/
public boolean translatedNameRecognize = true;
/**
* 是否识别日本人名
*/
public boo... | * 是否识别数字和量词
*/
public boolean numberQuantifierRecognize = false;
/**
* 并行分词的线程数
*/
public int threadNumber = 1;
/**
* 更新命名实体识别总开关
*/
public void updateNerConfig()
{
ner = nameRecognize || translatedNameRecognize || japaneseNameRecognize || placeRecognize || orga... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Config.java | 2 |
请完成以下Java代码 | static class FullTextSearchRowFilter extends RowFilter<TableModel, Integer>
{
public static FullTextSearchRowFilter ofText(final String text)
{
if (Check.isEmpty(text, true))
{
return null;
}
else
{
return new FullTextSearchRowFilter(text);
}
}
private final String textUC;
private... | if (entryValue == null || entryValue.isEmpty())
{
continue;
}
entryValue = entryValue.toUpperCase();
if (entryValue.indexOf(textUC) >= 0)
{
return true;
}
}
return false;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\plaf\UIDefaultsEditorDialog.java | 1 |
请完成以下Java代码 | public void setM_ChangeNotice_ID (int M_ChangeNotice_ID)
{
if (M_ChangeNotice_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_ChangeNotice_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_ChangeNotice_ID, Integer.valueOf(M_ChangeNotice_ID));
}
/** Get Change Notice.
@return Bill of Materials (Engineering) Change... | public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (bool... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ChangeNotice.java | 1 |
请完成以下Java代码 | public void setDateEnd(XMLGregorianCalendar value) {
this.dateEnd = value;
}
/**
* Gets the value of the canton property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCanton() {
return canton;
}
/**
*... | * @param value
* allowed object is
* {@link String }
*
*/
public void setApid(String value) {
this.apid = value;
}
/**
* Gets the value of the acid property.
*
* @return
* possible object is
* {@link String }
*
*/
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\TreatmentType.java | 1 |
请完成以下Java代码 | public Object getPersistentState() {
Map<String, Object> persistentState = (Map<String, Object>) super.getPersistentState();
persistentState.put("lockOwner", lockOwner);
persistentState.put("lockExpirationTime", lockExpirationTime);
return persistentState;
}
// getters and sett... | public void setLockOwner(String claimedBy) {
this.lockOwner = claimedBy;
}
public Date getLockExpirationTime() {
return lockExpirationTime;
}
public void setLockExpirationTime(Date claimedUntil) {
this.lockExpirationTime = claimedUntil;
}
@Override
public String to... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\JobEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDefaultBillingAddressId()
{
return Optional.ofNullable(customer)
.map(JsonCustomer::getDefaultBillingAddressId)
.orElse(null);
}
@Nullable
public String getGroupId()
{
return Optional.ofNullable(customer)
.map(JsonCustomer::getGroupId)
.orElse(null);
}
@NonNull
public Exte... | }
@Nullable
@VisibleForTesting
public String getCustomField(@Nullable final String customPath)
{
return Optional.ofNullable(customPath)
.filter(Check::isNotBlank)
.map(customerNode::at)
.map(JsonNode::asText)
.filter(Check::isNotBlank)
.orElse(null);
}
@NonNull
public Instant getUpdatedAt... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\api\model\order\Customer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PaymentReservationCapture
{
@NonNull
PaymentReservationId reservationId;
@NonNull
@NonFinal
PaymentReservationCaptureStatus status;
@NonNull
Money amount;
@NonNull
OrgId orgId;
@NonNull | OrderId salesOrderId;
@NonNull
InvoiceId salesInvoiceId;
@NonNull
PaymentId paymentId;
@Nullable
@NonFinal
@Setter(AccessLevel.PACKAGE)
PaymentReservationCaptureId id;
public void setStatusAsCompleted()
{
status = PaymentReservationCaptureStatus.COMPLETED;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\reservation\PaymentReservationCapture.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractRepository<T, ID extends Serializable> {
protected DynamoDBMapper mapper;
protected Class<T> entityClass;
protected AbstractRepository() {
ParameterizedType genericSuperclass = (ParameterizedType) getClass().getGenericSuperclass();
// This entityClass refers ... | return mapper.load(entityClass, id);
}
/**
* <strong>WARNING:</strong> It is not recommended to perform full table scan
* targeting the real production environment.
*
* @return All items
*/
public List<T> findAll() {
DynamoDBScanExpression scanExpression = new DynamoDBScanE... | repos\tutorials-master\aws-modules\aws-dynamodb\src\main\java\com\baeldung\dynamodb\repository\AbstractRepository.java | 2 |
请完成以下Java代码 | public Optional<HierarchyNode> getParent(final HierarchyNode child)
{
return Optional.ofNullable(child2Parent.get(child));
}
public ImmutableList<HierarchyNode> getChildren(@NonNull final HierarchyNode parent)
{
return parent2Children.get(parent);
}
public static class HierarchyBuilder
{
private final Im... | @NonNull final HierarchyNode first)
{
this.child2Parent = childAndParent;
this.next = first;
}
@Override
public boolean hasNext()
{
return next != null;
}
@Override
public HierarchyNode next()
{
final HierarchyNode result = next;
if (result == null)
{
throw new NoSuchElementExc... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\hierarchy\Hierarchy.java | 1 |
请完成以下Java代码 | public class PPRouting
{
@NonNull PPRoutingId id;
@Default boolean valid = true;
@NonNull @Default Range<Instant> validDates = Range.all();
@NonNull String code;
@NonNull WFDurationUnit durationUnit;
@NonNull Duration duration;
@NonNull @Default BigDecimal qtyPerBatch = BigDecimal.ONE;
/** The Yield is the perc... | return isValid()
&& validDates.contains(dateTime);
}
public PPRoutingActivity getActivityById(@NonNull final PPRoutingActivityId activityId)
{
return activities.stream()
.filter(activity -> activityId.equals(activity.getId()))
.findFirst()
.orElseThrow(() -> new AdempiereException("No activity by ... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\PPRouting.java | 1 |
请完成以下Java代码 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
@Override
public IdmEngine getObject() throws Exception {
configureExternallyManagedTransactions();
if (idmEngineConfiguration.ge... | public Class<IdmEngine> getObjectType() {
return IdmEngine.class;
}
@Override
public boolean isSingleton() {
return true;
}
public IdmEngineConfiguration getIdmEngineConfiguration() {
return idmEngineConfiguration;
}
public void setIdmEngineConfiguration(IdmEngineC... | repos\flowable-engine-main\modules\flowable-idm-spring\src\main\java\org\flowable\idm\spring\IdmEngineFactoryBean.java | 1 |
请完成以下Java代码 | public void setQtyShipped (final @Nullable BigDecimal QtyShipped)
{
set_Value (COLUMNNAME_QtyShipped, QtyShipped);
}
@Override
public BigDecimal getQtyShipped()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyShipped);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setTot... | return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setTotalWeightInKg (final BigDecimal TotalWeightInKg)
{
set_Value (COLUMNNAME_TotalWeightInKg, TotalWeightInKg);
}
@Override
public BigDecimal getTotalWeightInKg()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TotalWeightInKg);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Item.java | 1 |
请完成以下Java代码 | private void directlyExportToAllMatchingConfigs(@NonNull final I_M_HU_Trace huTrace)
{
final ImmutableList<ExternalSystemParentConfig> configs = externalSystemConfigRepo.getActiveByType(ExternalSystemType.GRSSignum);
for (final ExternalSystemParentConfig config : configs)
{
final ExternalSystemGRSSignumConfi... | return huTraceType.equals(TRANSFORM_LOAD) || huTraceType.equals(TRANSFORM_PARENT);
}
private boolean shouldExportToExternalSystem(@NonNull final ExternalSystemGRSSignumConfig grsSignumConfig, @NonNull final HUTraceType huTraceType)
{
switch (huTraceType)
{
case MATERIAL_RECEIPT:
return grsSignumConfig.is... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\grssignum\ExportHUToGRSService.java | 1 |
请完成以下Java代码 | public InventoryLineHU withAddingQtyCount(@NonNull final Quantity qtyCountToAdd)
{
return withQtyCount(getQtyCount().add(qtyCountToAdd));
}
public InventoryLineHU withZeroQtyCount()
{
return withQtyCount(getQtyCount().toZero());
}
public InventoryLineHU withQtyCount(@NonNull final Quantity newQtyCount)
{
... | {
return builder().updatingFrom(request).build();
}
//
//
//
// -------------------------------------------------------------------------
//
//
//
@SuppressWarnings("unused")
public static class InventoryLineHUBuilder
{
InventoryLineHUBuilder updatingFrom(@NonNull final InventoryLineCountRequest reque... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLineHU.java | 1 |
请完成以下Java代码 | protected void produceHistoricExternalTaskCreatedEvent() {
CommandContext commandContext = Context.getCommandContext();
commandContext.getHistoricExternalTaskLogManager().fireExternalTaskCreatedEvent(this);
}
protected void produceHistoricExternalTaskFailedEvent() {
CommandContext commandContext = Cont... | Set<String> referencedEntityIds = new HashSet<>();
return referencedEntityIds;
}
@Override
public Map<String, Class> getReferencedEntitiesIdAndClass() {
Map<String, Class> referenceIdAndClass = new HashMap<>();
if (executionId != null) {
referenceIdAndClass.put(executionId, ExecutionEntity.cla... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ExternalTaskEntity.java | 1 |
请完成以下Java代码 | protected void prepare()
{
for (final ProcessInfoParameter para : getParameters())
{
final String name = para.getParameterName();
if (para.getParameter() == null)
{
;
}
else if (name.equals("PP_Product_BOM_ID"))
{
fromProductBOMId = para.getParameterAsInt();
}
else
{
log.erro... | }
if (toProductBOMId == fromProductBOMId)
{
return MSG_OK;
}
final I_PP_Product_BOM fromBom = productBOMsRepo.getById(fromProductBOMId);
final I_PP_Product_BOM toBOM = productBOMsRepo.getById(toProductBOMId);
if (!productBOMsRepo.retrieveLines(toBOM).isEmpty())
{
throw new AdempiereException("@Erro... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\CopyFromBOM.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Edge assignEdgeToPublicCustomer(TenantId tenantId, EdgeId edgeId, User user) throws ThingsboardException {
ActionType actionType = ActionType.ASSIGNED_TO_CUSTOMER;
Customer publicCustomer = customerService.findOrCreatePublicCustomer(tenantId);
CustomerId customerId = publicCustomer.getId(... | @Override
public Edge setEdgeRootRuleChain(Edge edge, RuleChainId ruleChainId, User user) throws Exception {
TenantId tenantId = edge.getTenantId();
EdgeId edgeId = edge.getId();
try {
Edge updatedEdge = edgeService.setEdgeRootRuleChain(tenantId, edge, ruleChainId);
l... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\edge\DefaultTbEdgeService.java | 2 |
请完成以下Java代码 | public HistoricCaseInstanceQuery orderByCaseDefinitionId() {
return orderBy(HistoricCaseInstanceQueryProperty.PROCESS_DEFINITION_ID);
}
public HistoricCaseInstanceQuery orderByCaseInstanceId() {
return orderBy(HistoricCaseInstanceQueryProperty.PROCESS_INSTANCE_ID_);
}
public HistoricCaseInstanceQuery ... | }
public String getCaseInstanceId() {
return caseInstanceId;
}
public Set<String> getCaseInstanceIds() {
return caseInstanceIds;
}
public String getStartedBy() {
return createdBy;
}
public String getSuperCaseInstanceId() {
return superCaseInstanceId;
}
public void setSuperCaseInst... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public class Hero {
@Id
private String id;
private String name;
private String city;
private ComicUniversum universum;
public Hero(String name, String city, ComicUniversum universum) {
this.name = name;
this.city = city;
this.universum = universum;
}
public ... | if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Hero hero = (Hero) o;
return Objects.equals(name, hero.name) &&
Objects.equals(city, hero.city) &&
universum == hero.universum;
}
@Override
public int hashCode() {
... | repos\spring-boot-demo-master (1)\src\main\java\com\github\sparsick\springbootexample\hero\universum\Hero.java | 1 |
请完成以下Java代码 | private static String extractApproveUrlOrNull(@NonNull final com.paypal.orders.Order apiOrder)
{
return extractUrlOrNull(apiOrder, "approve");
}
private static String extractUrlOrNull(@NonNull final com.paypal.orders.Order apiOrder, @NonNull final String rel)
{
for (final LinkDescription link : apiOrder.links(... | }
public PayPalOrder markRemoteDeleted(@NonNull final PayPalOrderId id)
{
final I_PayPal_Order existingRecord = getRecordById(id);
final PayPalOrder order = toPayPalOrder(existingRecord)
.toBuilder()
.status(PayPalOrderStatus.REMOTE_DELETED)
.build();
updateRecord(existingRecord, order);
saveRe... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\client\PayPalOrderRepository.java | 1 |
请完成以下Java代码 | public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Preis.
@param Price
Price
*/
@Override
public void setPrice (java.math.BigDecimal Price)
{
set_Value (COLUMNNAME_Price, Price);
}
/** Get Preis.
@return Price
*/
@Override
public java.math.B... | Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Ranking.
@param Ranking
Relative Rank Number
*/
@Override
public void setRanking (int Ranking)
{
set_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponse.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Enforce Client Security.
@param... | }
/** Get Valid.
@return Element is valid
*/
public boolean isValid ()
{
Object oo = get_Value(COLUMNNAME_IsValid);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Alert.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaymentTermQuery
{
OrgId orgId;
ExternalId externalId;
String value;
BPartnerId bPartnerId;
/**
* Ignored, unless bPartnerId is given.
*/
SOTrx soTrx;
boolean fallBackToDefault;
@Builder(toBuilder = true)
private PaymentTermQuery(
@Nullable final OrgId orgId,
@Nullable final ExternalI... | this.soTrx = CoalesceUtil.coalesceNotNull(soTrx, SOTrx.SALES);
this.fallBackToDefault = CoalesceUtil.coalesceNotNull(fallBackToDefault, false);
}
/**
* Convenience method. If there is no payment term for the given bpartner and soTrx, it tries to fall back to the default term.
*/
public static PaymentTermQuer... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\repository\PaymentTermQuery.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ProcessApplicationDeploymentBuilderImpl addDeploymentResourceById(String deploymentId, String resourceId) {
return (ProcessApplicationDeploymentBuilderImpl) super.addDeploymentResourceById(deploymentId, resourceId);
}
@Override
public ProcessApplicationDeploymentBuilderImpl addDeploymentResourcesById(... | }
// getters / setters ///////////////////////////////////////////////
public boolean isResumePreviousVersions() {
return isResumePreviousVersions;
}
public ProcessApplicationReference getProcessApplicationReference() {
return processApplicationReference;
}
public String getResumePreviousVersion... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\ProcessApplicationDeploymentBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableList<Issue> fetchIssues(@NonNull final RetrieveIssuesRequest retrieveIssuesRequest)
{
final ImmutableList<Issue> issueList;
final List<String> pathVariables = Arrays.asList(
REPOS.getValue(),
retrieveIssuesRequest.getRepositoryOwner(),
retrieveIssuesRequest.getRepositoryId(),
ISSUE... | return issueList.stream()
.filter(issue -> !issue.isPullRequest())
.collect(ImmutableList.toImmutableList());
}
public Issue fetchIssueById(@NonNull final FetchIssueByIdRequest fetchIssueByIdRequest)
{
final List<String> pathVariables = Arrays.asList(
REPOS.getValue(),
fetchIssueByIdRequest.getRep... | repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.github\src\main\java\de\metas\issue\tracking\github\api\v3\service\GithubClient.java | 2 |
请完成以下Java代码 | public class GameAnnotatedByJsonSerializeDeserialize {
private Long id;
private String name;
@JsonSerialize(using = NumericBooleanSerializer.class)
@JsonDeserialize(using = NumericBooleanDeserializer.class)
private Boolean paused;
@JsonSerialize(using = NumericBooleanSerializer.class)
@Js... | public Boolean isPaused() {
return paused;
}
public void setPaused(Boolean paused) {
this.paused = paused;
}
public Boolean isOver() {
return over;
}
public void setOver(Boolean over) {
this.over = over;
}
} | repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\booleanAsInt\GameAnnotatedByJsonSerializeDeserialize.java | 1 |
请完成以下Java代码 | public class FillRuleUtil {
/**
* @param ruleCode ruleCode
* @return
*/
@SuppressWarnings("unchecked")
public static Object executeRule(String ruleCode, JSONObject formData) {
if (!StringUtils.isEmpty(ruleCode)) {
try {
// 获取 Service
Servic... | String parameter = request.getParameter(key);
if (oConvertUtils.isNotEmpty(parameter)) {
params.put(key, parameter);
continue;
}
}
String value = params.getString(key);
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\FillRuleUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HUMovementGenerateRequest
{
@Nullable LocatorId fromLocatorId;
@NonNull LocatorId toLocatorId;
@Singular("huIdToMove")
@NonNull ImmutableSet<HuId> huIdsToMove;
@NonNull Instant movementDate;
@Nullable ClientAndOrgId clientAndOrgId;
@Nullable DDOrderAndLineId ddOrderLineId;
@Nullable String poRe... | //
// Shipper
@Nullable ShipperId shipperId;
@Nullable FreightCostRule freightCostRule;
@Nullable BigDecimal freightAmt;
//
// Delivery Rules & Priority
@Nullable DeliveryRule deliveryRule;
@Nullable DeliveryViaRule deliveryViaRule;
@Nullable String priorityRule;
//
// Others
@Nullable Dimension dimension... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\movement\generate\HUMovementGenerateRequest.java | 2 |
请完成以下Java代码 | private int retrieveFirstFlatrateConditionsIdForCompensationGroup(final GroupId groupId)
{
final Integer flatrateConditionsId = groupChangesHandler.retrieveGroupOrderLinesQuery(groupId)
.addNotNull(I_C_OrderLine.COLUMNNAME_C_Flatrate_Conditions_ID)
.orderBy(I_C_OrderLine.COLUMNNAME_Line)
.orderBy(I_C_Ord... | }, ifColumnsChanged = { de.metas.interfaces.I_C_OrderLine.COLUMNNAME_QtyEntered,
de.metas.interfaces.I_C_OrderLine.COLUMNNAME_Price_UOM_ID,
de.metas.interfaces.I_C_OrderLine.COLUMNNAME_C_UOM_ID,
de.metas.interfaces.I_C_OrderLine.COLUMNNAME_M_Product_ID
})
public void setQtyEnteredInPriceUOM(final I_C_OrderLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\interceptor\C_OrderLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Attachment uploadDate(String uploadDate) {
this.uploadDate = uploadDate;
return this;
}
/**
* Der Zeitstempel des Hochladens
* @return uploadDate
**/
@Schema(example = "2020-11-18T10:33:08.995Z", description = "Der Zeitstempel des Hochladens")
public String getUploadDate() {
return ... | @Override
public int hashCode() {
return Objects.hash(_id, filename, contentType, uploadDate, metadata);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Attachment {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\Attachment.java | 2 |
请完成以下Java代码 | public class InfoProductRelated implements IInfoProductDetail
{
private final Logger log = LogManager.getLogger(getClass());
private IMiniTable relatedTbl = null;
private String m_sqlRelated;
public InfoProductRelated()
{
initUI();
init();
}
private void initUI()
{
MiniTable table = new MiniTable();
... | try
{
pstmt = DB.prepareStatement(sql, null);
pstmt.setInt(1, M_Product_ID);
pstmt.setInt(2, M_PriceList_Version_ID);
rs = pstmt.executeQuery();
relatedTbl.loadTable(rs);
rs.close();
}
catch (Exception e)
{
log.warn(sql, e);
}
finally
{
DB.close(rs, pstmt);
rs = null;
pstmt =... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoProductRelated.java | 1 |
请完成以下Java代码 | public void setJobType (final @Nullable java.lang.String JobType)
{
set_Value (COLUMNNAME_JobType, JobType);
}
@Override
public java.lang.String getJobType()
{
return get_ValueAsString(COLUMNNAME_JobType);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name... | public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
return get_ValueAsString(COLUMNNAME_Value);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CRM_Occupation.java | 1 |
请完成以下Java代码 | public final Reader getCharacterStream(final int parameterIndex) throws SQLException
{
return getCCallableStatementImpl().getCharacterStream(parameterIndex);
}
@Override
public final Reader getCharacterStream(final String parameterName) throws SQLException
{
return getCCallableStatementImpl().getCharacterStre... | @Override
public final void setBinaryStream(final String parameterName, final InputStream x) throws SQLException
{
getCCallableStatementImpl().setBinaryStream(parameterName, x);
}
@Override
public final void setCharacterStream(final String parameterName, final Reader reader) throws SQLException
{
getCCallabl... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\CCallableStatementProxy.java | 1 |
请完成以下Java代码 | public boolean isEligibleForReview()
{
if (size() == 0)
{
return false;
}
final boolean allApproved = streamByIds(DocumentIdsSelection.ALL).allMatch(ProductsToPickRow::isApproved);
if (allApproved)
{
return false;
}
return streamByIds(DocumentIdsSelection.ALL)
.allMatch(ProductsToPickRow::i... | {
rowsData.updateViewRowFromPickingCandidate(rowId, pickingCandidate);
}
public boolean isApproved()
{
if (size() == 0)
{
return false;
}
return streamByIds(DocumentIdsSelection.ALL)
.allMatch(ProductsToPickRow::isApproved);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\ProductsToPickView.java | 1 |
请完成以下Java代码 | public class RetrieveEmailFolder {
public List<String> connectToMailServer(String imapHost, String email, String password) throws Exception {
Properties properties = getMailProperties(imapHost);
Session session = Session.getDefaultInstance(properties);
Store store = session.getStore();
... | List<String> folderList = new ArrayList<>();
Folder defaultFolder = store.getDefaultFolder();
listFolders(defaultFolder, folderList);
return folderList;
}
void listFolders(Folder folder, List<String> folderList) throws MessagingException {
Folder[] subfolders = folder.list();
... | repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\retrievemailfolder\RetrieveEmailFolder.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
@Override
public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME... | }
/** Set Node_ID.
@param Node_ID Node_ID */
@Override
public void setNode_ID (int Node_ID)
{
if (Node_ID < 0)
set_Value (COLUMNNAME_Node_ID, null);
else
set_Value (COLUMNNAME_Node_ID, Integer.valueOf(Node_ID));
}
/** Get Node_ID.
@return Node_ID */
@Override
public int getNode_ID ()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_TreeBar.java | 1 |
请完成以下Java代码 | public DocumentId getId() {return rowId;}
@Override
public boolean isProcessed() {return false;}
@Nullable
@Override
public DocumentPath getDocumentPath() {return null;}
@Override
public Set<String> getFieldNames() {return values.getFieldNames();}
@Override
public ViewRowFieldNameAndJsonValues getFieldName... | {
return OIRowUserInputPart.builder()
.rowId(rowId)
.factAcctId(factAcctId)
.selected(selected)
.build();
}
else
{
return null;
}
}
public OIRow withUserInput(@Nullable final OIRowUserInputPart userInput)
{
final boolean selectedNew = userInput != null && userInput.isSelected();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\gljournal_sap\select_open_items\OIRow.java | 1 |
请完成以下Java代码 | protected final <ID extends RepoIdAware> void postDependingDocuments(
final String tableName,
final Collection<ID> documentIds)
{
if (documentIds == null || documentIds.isEmpty())
{
return; // nothing to do
}
// task 08643: the list of documentModels might originate from a bag (i.e. InArrayFilter doe... | }
final ClientId clientId = getClientId();
documentIds.stream()
.map(documentId -> DocumentPostRequest.builder()
.record(TableRecordReference.of(tableName, documentId))
.clientId(clientId)
.build())
.collect(DocumentPostMultiRequest.collect())
.ifPresent(services::scheduleReposting);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc.java | 1 |
请完成以下Java代码 | public Collection<Object> values() {
List<Object> values = new ArrayList<Object>();
for (TypedValue typedValue : outputValues.values()) {
values.add(typedValue.getValue());
}
return values;
}
@Override
public String toString() {
return outputValues.toString();
}
@Override
publi... | }
protected class DmnDecisionRuleOutputEntry implements Entry<String, Object> {
protected final String key;
protected final TypedValue typedValue;
public DmnDecisionRuleOutputEntry(String key, TypedValue typedValue) {
this.key = key;
this.typedValue = typedValue;
}
@Override
pu... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionResultEntriesImpl.java | 1 |
请完成以下Java代码 | public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
@Override
public boolean isAccountNonExpired() {
return false;
}
@Override
public boolean isAccountNonLocked() {
return false;
... | }
@Override
public boolean isEnabled() {
return false;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
User user = (User) o;
return Objects.equals(us... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\mongoauth\domain\User.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final IQueryFilter<I_C_Invoice_Candidate> selectedICsFilter = getProcessInfo().getQueryFilterOrElseFalse();
logger.debug("selectedICsFilter={}", selectedICsFilter);
Loggables.withLogger(logger, Level.DEBUG).addLog("Processing sales order InvoiceCandidates");
final It... | logger.debug("Processing invoiceCandidate");
final I_C_Invoice_Candidate invoiceCandidateRecord = invoiceCandDAO.getById(invoiceCandidateId);
invoiceCandidateFacadeService.syncICToCommissionInstance(invoiceCandidateRecord, false/* candidateDeleted */);
});
counter++;
}
catch (final RuntimeExcep... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\process\C_Invoice_Candidate_CreateOrUpdateCommissionInstance.java | 1 |
请完成以下Java代码 | public List<I_M_Package> retrievePackages(final I_M_HU hu, final String trxName)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(hu);
return queryBL.createQueryBuilder(I_M_Package_HU.class, ctx, trxName)
.addEqualsFilter(I_M_Package_HU.COLUMN_M_HU_ID, hu.getM_HU_ID())
.addOnlyActiveRecordsFilter()
... | }
return queryBL.createQueryBuilder(I_M_Package_HU.class)
.addInArrayFilter(I_M_Package_HU.COLUMNNAME_M_Package_ID, packageIds)
.create()
.listDistinct(I_M_Package_HU.COLUMNNAME_M_Package_ID, PackageId.class);
}
@Override
public I_M_Package retrievePackage(final I_M_HU hu)
{
final List<I_M_Package... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPackageDAO.java | 1 |
请完成以下Java代码 | public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getTextColor() {
return textColor;
}
public void setTextColor(String textColor) {
this.textColor = textColor;
}
public Strin... | public String getTextSize() {
return textSize;
}
public void setTextSize(String textSize) {
this.textSize = textSize;
}
public String getTextWeight() {
return textWeight;
}
public void setTextWeight(String textWeight) {
this.textWeight = textWeight;
}
} | repos\tutorials-master\spring-web-modules\spring-mvc-java-2\src\main\java\com\baeldung\excel\MyCell.java | 1 |
请完成以下Java代码 | public int getS_ExternalReference_ID()
{
return get_ValueAsInt(COLUMNNAME_S_ExternalReference_ID);
}
/**
* Type AD_Reference_ID=541127
* Reference name: ExternalReferenceType
*/
public static final int TYPE_AD_Reference_ID=541127;
/** UserID = UserID */
public static final String TYPE_UserID = "UserID"... | public void setType (final java.lang.String Type)
{
set_ValueNoCheck (COLUMNNAME_Type, Type);
}
@Override
public java.lang.String getType()
{
return get_ValueAsString(COLUMNNAME_Type);
}
@Override
public void setVersion (final @Nullable java.lang.String Version)
{
set_Value (COLUMNNAME_Version, Versio... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalreference\src\main\java-gen\de\metas\externalreference\model\X_S_ExternalReference.java | 1 |
请完成以下Java代码 | public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
final ResourceAsPermission other = EqualsBuilder.getOther(this, obj);
if (other == null)
{
return false;
}
return new EqualsBuilder()
.append(this.name, other.name)
.isEqual();
}
@Override
public Resource get... | {
return this;
}
@Override
public boolean hasAccess(final Access access)
{
// TODO: return accesses.contains(access);
throw new UnsupportedOperationException("Not implemented");
}
@Override
public Permission mergeWith(Permission accessFrom)
{
checkCompatibleAndCast(accessFrom);
return this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ResourceAsPermission.java | 1 |
请完成以下Java代码 | public InfoBuilder setWhereClause(final String whereClause)
{
_whereClause = whereClause;
return this;
}
public String getWhereClause()
{
return _whereClause;
}
public InfoBuilder setAttributes(final Map<String, Object> attributes)
{
_attributes = attributes;
return this;
}
private Map<String, Obj... | {
if (Check.isEmpty(iconName, true))
{
return setIcon(null);
}
else
{
final Image icon = Images.getImage2(iconName + "16");
return setIcon(icon);
}
}
public InfoBuilder setIcon(final Image icon)
{
this._iconImage = icon;
return this;
}
private Image getIconImage()
{
return _iconImage;... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoBuilder.java | 1 |
请完成以下Java代码 | public class DBRes_ja extends ListResourceBundle
{
/** Data */
static final Object[][] contents = new String[][]{
{ "CConnectionDialog", "\u30a2\u30c7\u30f3\u30d4\u30a8\u30fc\u30ec\u306e\u63a5\u7d9a" },
{ "Name", "\u540d\u524d" },
{ "AppsHost", "\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30fb... | { "TerminalServer", "Terminal Server" },
{ "VPN", "VPN" },
{ "WAN", "WAN" },
{ "ConnectionError", "\u63a5\u7d9a\u30a8\u30e9\u30fc" },
{ "ServerNotActive", "\u30b5\u30fc\u30d0\u30fc\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093" }
};
/**
* Get Contsnts
* @return contents
*/
public Object[][] g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_ja.java | 1 |
请完成以下Java代码 | public void setExternalSystemValue (final java.lang.String ExternalSystemValue)
{
set_Value (COLUMNNAME_ExternalSystemValue, ExternalSystemValue);
}
@Override
public java.lang.String getExternalSystemValue()
{
return get_ValueAsString(COLUMNNAME_ExternalSystemValue);
}
@Override
public void setIsAutoSend... | public void setIsSyncHUsOnMaterialReceipt (final boolean IsSyncHUsOnMaterialReceipt)
{
set_Value (COLUMNNAME_IsSyncHUsOnMaterialReceipt, IsSyncHUsOnMaterialReceipt);
}
@Override
public boolean isSyncHUsOnMaterialReceipt()
{
return get_ValueAsBoolean(COLUMNNAME_IsSyncHUsOnMaterialReceipt);
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_GRSSignum.java | 1 |
请完成以下Spring Boot application配置 | server.port=8085
spring.main.allow-bean-definition-overriding=true
logging.level.com.baeldung.cloud.openfeign.client=INFO
feign.hystrix.enabled=true
feign.client.config.paymentMethodClient.readTimeout: 200
feign.client.config.paymentMethodClient.connectTime | out: 100
feign.client.config.reportClient.readTimeout: 200
feign.client.config.reportClient.connectTimeout: 100 | repos\tutorials-master\spring-cloud-modules\spring-cloud-openfeign-2\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private ProductId getProductId(@NonNull final String productSearchKey)
{
final I_M_Product product = getProductNotNull(productSearchKey);
return ProductId.ofRepoId(product.getM_Product_ID());
}
@NonNull
private I_C_UOM getStockingUOM(@NonNull final String productSearchKey)
{
final I_M_Product produ... | return product;
}
private I_M_Product loadProduct(@NonNull final String productSearchKey)
{
return productRepo.retrieveProductByValue(productSearchKey);
}
private OrgId retrieveOrgId(@NonNull final String orgCode)
{
final OrgQuery query = OrgQuery.builder()
.orgValue(orgCode)
.failIfNotExi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\receipt\CustomerReturnRestService.java | 1 |
请完成以下Java代码 | public void save(RedisIndexedSessionRepository.RedisSession session) {
long expirationInMillis = getExpirationTime(session).toEpochMilli();
this.redisOps.opsForZSet().add(this.expirationsKey, session.getId(), expirationInMillis);
}
/**
* Remove the session id from the sorted set.
* @param sessionId the sessi... | private String getSessionKey(String sessionId) {
return this.namespace + ":sessions:" + sessionId;
}
/**
* Set the namespace for the keys.
* @param namespace the namespace
*/
public void setNamespace(String namespace) {
Assert.hasText(namespace, "namespace cannot be null or empty");
this.namespace = nam... | repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\SortedSetRedisSessionExpirationStore.java | 1 |
请完成以下Java代码 | public class UserDto1 {
private long id;
private String username;
// constructors
public UserDto1() {
super();
}
public UserDto1(long id, String username) {
super();
this.id = id;
this.username = username;
}
// getters and setters
... | this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Override
public String toString() {
return "UserDto [id=" + id + ", username=" + username + "]";
}
} | repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\jmapper\relational\UserDto1.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setTRANPORTTERMSDESC(String value) {
this.tranporttermsdesc = value;
}
/**
* Gets the value of the locationqual property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLOCATIONQUAL() {
return locationqua... | /**
* Gets the value of the locationname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLOCATIONNAME() {
return locationname;
}
/**
* Sets the value of the locationname property.
*
* @param value
... | 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\HTRSC1.java | 2 |
请完成以下Java代码 | class M_CostType
{
private final IAcctSchemaDAO acctSchemaDAO;
public M_CostType(@NonNull final IAcctSchemaDAO acctSchemaDAO)
{
this.acctSchemaDAO = acctSchemaDAO;
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE })
public void beforeSave(final I_M_CostType costType... | @ModelChange(timings = { ModelValidator.TYPE_BEFORE_DELETE })
public void beforeDelete(final I_M_CostType costType)
{
final CostTypeId costTypeId = CostTypeId.ofRepoId(costType.getM_CostType_ID());
final ClientId clientId = ClientId.ofRepoId(costType.getAD_Client_ID());
for (final AcctSchema as : acctSchemaDAO... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\interceptors\M_CostType.java | 1 |
请完成以下Java代码 | public boolean isExpired() {
return this.reason == Reason.EXPIRED;
}
/**
* True if no {@link FactorGrantedAuthority#getAuthority()} on the
* {@link org.springframework.security.core.Authentication} matched
* {@link RequiredFactor#getAuthority()}.
* @return true if missing, else false.
*/
public boolean ... | }
/**
* The reason that the error occurred.
*
* @author Rob Winch
* @since 7.0
*/
private enum Reason {
/**
* The authority was missing.
* @see #isMissing()
*/
MISSING,
/**
* The authority was considered expired.
* @see #isExpired()
*/
EXPIRED
}
} | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\RequiredFactorError.java | 1 |
请完成以下Java代码 | public Balance computeDiffToBalance()
{
final Money diff = toMoney();
if (isReversal())
{
return diff.signum() < 0 ? ofCredit(diff) : ofDebit(diff.negate());
}
else
{
return diff.signum() < 0 ? ofDebit(diff.negate()) : ofCredit(diff);
}
}
public Balance invert()
{
return new Balance(this.cred... | public void add(@Nullable Money debitToAdd, @Nullable Money creditToAdd)
{
if (debitToAdd != null)
{
this.debit = this.debit != null ? this.debit.add(debitToAdd) : debitToAdd;
}
if (creditToAdd != null)
{
this.credit = this.credit != null ? this.credit.add(creditToAdd) : creditToAdd;
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Balance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected String doIt()
{
final HUEditorRow row = getSingleSelectedRow();
final HUsToReturnViewContext viewContext = getHUsToReturnViewContext();
final HuId huId = row.getHuId();
final InOutId customerReturnsId = viewContext.getCustomerReturnsId();
if (isValidHuForInOut(customerReturnsId, huId))
{
repa... | }
getResult().setCloseWebuiModalView(true);
getView().removeHUIdsAndInvalidate(ImmutableList.of(huId));
return MSG_OK;
}
private boolean isValidHuForInOut(final InOutId inOutId, final HuId huId)
{
return repairCustomerReturnsService.isValidHuForInOut(inOutId, huId);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\customerreturns\process\HUsToReturn_SelectHU.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static class Event
{
String id;
EventType type;
EventStatus status;
/**
* e.g. 2024-10-05T12:48:34.312Z
*/
String timestamp;
BigDecimal amount;
@JsonProperty("fee_amount") BigDecimal fee_amount;
// other fields:
// "deducted_amount": 0.0,
// "deducted_fee_amount": 0.0,
// "transac... | public BigDecimal getAmountPlusFee()
{
BigDecimal result = BigDecimal.ZERO;
if (amount != null)
{
result = result.add(amount);
}
if (amount != null)
{
result = result.add(fee_amount);
}
return result;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\client\json\JsonGetTransactionResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private LocatorId getDropToLocatorId()
{
if (dropToQRCode == null)
{
return null;
}
LocatorId dropToLocatorId = this._dropToLocatorId;
if (dropToLocatorId == null)
{
dropToLocatorId = this._dropToLocatorId = warehouseService.resolveLocator(dropToQRCode).getLocatorId();
}
return dropToLocatorId;
... | private List<DistributionJob> tryCompleteJobsIfFullyMoved(@NonNull final List<DistributionJob> jobs)
{
return jobs.stream()
.map(this::completeJobIfFullyMoved)
.collect(ImmutableList.toImmutableList());
}
private DistributionJob completeJobIfFullyMoved(@NonNull final DistributionJob job)
{
if (!job.isF... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\service\commands\drop_to\DistributionJobDropToCommand.java | 2 |
请完成以下Java代码 | void start() {
this.handler.initializeHandler();
this.webServer.start();
this.applicationContext
.publishEvent(new ReactiveWebServerInitializedEvent(this.webServer, this.applicationContext));
}
void shutDownGracefully(GracefulShutdownCallback callback) {
this.webServer.shutDownGracefully(callback);
}
v... | private Mono<Void> handleUninitialized(ServerHttpRequest request, ServerHttpResponse response) {
throw new IllegalStateException("The HttpHandler has not yet been initialized");
}
@Override
public Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response) {
return this.delegate.handle(reques... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\reactive\context\WebServerManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDATEQUAL() {
return datequal;
}
/**
* Sets the value of the datequal property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDATEQUAL(String value) {
this.datequal = value;
}
/**
* G... | this.dateto = value;
}
/**
* Gets the value of the days property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDAYS() {
return days;
}
/**
* Sets the value of the days property.
*
* @param value
... | 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\DDATE1.java | 2 |
请完成以下Java代码 | public Integer getId() {
return id;
}
public UserDO setId(Integer id) {
this.id = id;
return this;
}
public String getUsername() {
return username;
}
public UserDO setUsername(String username) {
this.username = username;
return this;
}
... | return this;
}
public Integer getDeleted() {
return deleted;
}
public UserDO setDeleted(Integer deleted) {
this.deleted = deleted;
return this;
}
@Override
public String toString() {
return "UserDO{" +
"id=" + id +
", usernam... | repos\SpringBoot-Labs-master\lab-21\lab-21-cache-redis\src\main\java\cn\iocoder\springboot\lab21\cache\dataobject\UserDO.java | 1 |
请完成以下Java代码 | private CommissionPoints computeCustomerBasedCPointsPerUnit(
@NonNull final CommissionPoints commissionPointsBase,
@NonNull final Quantity totalQtyInvolved,
@NonNull final Integer pointsPrecision)
{
final BigDecimal customerPricePerQty = commissionPointsBase.toBigDecimal()
.divide(totalQtyInvolved.toBig... | .productId(commissionTriggerData.getProductId())
.qty(commissionTriggerData.getTotalQtyInvolved())
.customerCurrencyId(commissionTriggerData.getDocumentCurrencyId())
.commissionDate(commissionTriggerData.getTriggerDocumentDate())
.build();
final ProductPrice salesRepNetUnitPrice = customerTradeMargin... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\margin\MarginAlgorithm.java | 1 |
请完成以下Java代码 | public class LoopDiagonally {
public String loopDiagonally(String[][] twoDArray) {
int length = twoDArray.length;
int diagonalLines = (length + length) - 1;
int itemsInDiagonal = 0;
int midPoint = (diagonalLines / 2) + 1;
StringBuilder output = new StringBuilder();
... | columnIndex = j;
items.append(twoDArray[rowIndex][columnIndex]);
}
} else {
itemsInDiagonal--;
for (int j = 0; j < itemsInDiagonal; j++) {
rowIndex = (length - 1) - j;
columnIndex = (i - length) + j;
... | repos\tutorials-master\core-java-modules\core-java-arrays-multidimensional\src\main\java\com\baeldung\array\looping\LoopDiagonally.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class EventDescriptor
{
@NonNull String eventId;
@NonNull ClientAndOrgId clientAndOrgId;
@NonNull UserId userId;
@Nullable String traceId;
public static EventDescriptor ofClientAndOrg(final int adClientId, final int adOrgId)
{
return ofClientOrgAndTraceId(ClientAndOrgId.ofClientAndOrg(adClientId, adOrgI... | {
return getClientAndOrgId().getClientId();
}
public OrgId getOrgId()
{
return getClientAndOrgId().getOrgId();
}
@NonNull
public EventDescriptor withNewEventId()
{
return toBuilder()
.eventId(newEventId())
.build();
}
@NonNull
public EventDescriptor withClientAndOrg(@NonNull final ClientAndOr... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\EventDescriptor.java | 2 |
请完成以下Java代码 | public HUPPOrderIssueProducer targetOrderBOMLine(@NonNull final PPOrderBOMLineId targetOrderBOMLineId)
{
final I_PP_Order_BOMLine targetOrderBOMLine = ppOrderBOMsRepo.getOrderBOMLineById(targetOrderBOMLineId);
return targetOrderBOMLine(targetOrderBOMLine);
}
public HUPPOrderIssueProducer fixedQtyToIssue(@Nullab... | final PPOrderPlanningStatus orderPlanningStatus = PPOrderPlanningStatus.ofCode(ppOrder.getPlanningStatus());
return PPOrderPlanningStatus.COMPLETE.equals(orderPlanningStatus);
}
else
{
throw new AdempiereException("Unknown processCandidatesPolicy: " + processCandidatesPolicy);
}
}
public HUPPOrderIssue... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\HUPPOrderIssueProducer.java | 1 |
请完成以下Java代码 | private WeightingSpecifications getWeightSpecificationsAndUpdateIfNotSet(final I_PP_Order_Weighting_Run weightingRun)
{
final WeightingSpecificationsId currentWeightingSpecificationsId = WeightingSpecificationsId.ofRepoIdOrNull(weightingRun.getPP_Weighting_Spec_ID());
if (currentWeightingSpecificationsId != null)
... | }
else
{
final WeightingSpecifications weightingSpecifications = weightingSpecificationsRepository.getById(weightingSpecificationsId);
weightingRun.setC_UOM_ID(weightingSpecifications.getUomId().getRepoId());
weightingRun.setTolerance_Perc(weightingSpecifications.getTolerance().toBigDecimal());
weightin... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\run\callout\PP_Order_Weighting_Run.java | 1 |
请完成以下Java代码 | protected ObjectNode createOrGetBpmnNode(ObjectNode infoNode) {
if (!infoNode.has(BPMN_NODE)) {
infoNode.putObject(BPMN_NODE);
}
return (ObjectNode) infoNode.get(BPMN_NODE);
}
protected ObjectNode getBpmnNode(ObjectNode infoNode) {
return (ObjectNode) infoNode.get(BP... | ObjectNode languageNode = (ObjectNode) localizationNode.get(language);
if (!languageNode.has(id)) {
languageNode.putObject(id);
}
((ObjectNode) languageNode.get(id)).put(propertyName, propertyValue);
}
protected ObjectNode createOrGetLocalizationNode(ObjectNode infoNode) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DynamicBpmnServiceImpl.java | 1 |
请完成以下Java代码 | public @NonNull String getHandledTableName()
{
return I_M_InOut.Table_Name;
}
@Override
public StandardDocumentReportType getStandardDocumentReportType()
{
return StandardDocumentReportType.SHIPMENT;
}
@Override
public @NonNull DocumentReportInfo getDocumentReportInfo(
@NonNull final TableRecordReferen... | return DocumentReportInfo.builder()
.recordRef(TableRecordReference.of(I_M_InOut.Table_Name, inoutId))
.reportProcessId(util.getReportProcessIdByPrintFormatId(printFormatId))
.copies(util.getDocumentCopies(docType, bpPrintFormatQuery))
.documentNo(inout.getDocumentNo())
.bpartnerId(bpartnerId)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\InOutDocumentReportAdvisor.java | 1 |
请完成以下Java代码 | private static final class AttributeListValueMap
{
public static AttributeListValueMap ofList(final List<AttributeListValue> list)
{
if (list.isEmpty())
{
return EMPTY;
}
return new AttributeListValueMap(list);
}
private static final AttributeListValueMap EMPTY = new AttributeListValueMap();
... | @Nullable
public AttributeListValue getByIdOrNull(@NonNull final AttributeValueId id)
{
return map.values()
.stream()
.filter(av -> AttributeValueId.equals(av.getId(), id))
.findFirst()
.orElse(null);
}
public AttributeListValue getByValueOrNull(final String value)
{
return map.get(... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeDAO.java | 1 |
请完成以下Java代码 | public List<MetricIntervalValue> interval() {
callback = new MetricsQueryIntervalCmd(this);
return (List<MetricIntervalValue>) commandExecutor.execute(this);
}
@Override
public List<MetricIntervalValue> interval(long interval) {
this.interval = interval;
return interval();
}
public long sum... | return interval;
}
@Override
public int getMaxResults() {
if (maxResults > DEFAULT_LIMIT_SELECT_INTERVAL) {
return DEFAULT_LIMIT_SELECT_INTERVAL;
}
return super.getMaxResults();
}
protected class MetricsQueryIntervalCmd implements Command<Object> {
protected MetricsQueryImpl metricsQu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\MetricsQueryImpl.java | 1 |
请完成以下Java代码 | public class GetRenderedTaskFormCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
protected String taskId;
protected String formEngineName;
public GetRenderedTaskFormCmd(String taskId, String formEngineName) {
this.taskId = taskId;
this.formEngineName = f... | }
ensureNotNull("Task form definition for '" + taskId + "' not found", "task.getTaskDefinition()", task.getTaskDefinition());
TaskFormHandler taskFormHandler = task.getTaskDefinition().getTaskFormHandler();
if (taskFormHandler == null) {
return null;
}
FormEngine formEngine = Context
.... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetRenderedTaskFormCmd.java | 1 |
请完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
@Override
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
... | return true;
}
/**
* 用户账号是否被锁定
*/
@Override
public boolean isAccountNonLocked() {
return true;
}
/**
* 用户密码是否过期
*/
@Override
public boolean isCredentialsNonExpired() {
return true;
}
/**
* 用户是否可用
*/
@Override
public boolean... | repos\SpringBootLearning-master (1)\springboot-jwt\src\main\java\com\gf\entity\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class PropagationWithBaggage {
private final TracingProperties tracingProperties;
PropagationWithBaggage(TracingProperties tracingProperties) {
this.tracingProperties = tracingProperties;
}
@Bean
@ConditionalOnEnabledTracingExport
TextMapPropagator textMapPropagatorWithBaggage(OtelCurrentTraceC... | return new Slf4JBaggageEventListener(this.tracingProperties.getBaggage().getCorrelation().getFields());
}
}
/**
* Propagates neither traces nor baggage.
*/
@Configuration(proxyBeanMethods = false)
static class NoPropagation {
@Bean
@ConditionalOnMissingBean
TextMapPropagator noopTextMapPropagator() {... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\OpenTelemetryPropagationConfigurations.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String[] getAllExclude() {
List<String> allExclude = new ArrayList<>();
if (StringUtils.hasText(this.exclude)) {
allExclude.addAll(StringUtils.commaDelimitedListToSet(... | public boolean isLogConditionEvaluationDelta() {
return this.logConditionEvaluationDelta;
}
public void setLogConditionEvaluationDelta(boolean logConditionEvaluationDelta) {
this.logConditionEvaluationDelta = logConditionEvaluationDelta;
}
}
/**
* LiveReload properties.
*/
public static class Live... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\DevToolsProperties.java | 2 |
请完成以下Java代码 | public List<String> shortcutFieldOrder() {
return Arrays.asList("languageServiceEndpoint", "defaultLanguage");
}
@Override
public GatewayFilter apply(Config config) {
return (exchange, chain) -> {
return client.get()
.uri(config.getLanguageServiceEndpoint())
... | public String getLanguageServiceEndpoint() {
return languageServiceEndpoint;
}
public void setLanguageServiceEndpoint(String languageServiceEndpoint) {
this.languageServiceEndpoint = languageServiceEndpoint;
}
public String getDefaultLanguage() {
ret... | repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\customfilters\gatewayapp\filters\factories\ChainRequestGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public Map<DocumentId, PaymentToReconcileRow> getDocumentId2TopLevelRows()
{
return rowsHolder.getDocumentId2TopLevelRows();
}
@Override
public DocumentIdsSelection getDocumentIdsToInvalidate(TableRecordReferenceSet recordRefs)
{
return recordRefs.streamIds(I_C_Payment.Table_Name, PaymentId::ofRepoId)
.ma... | public void invalidateAll()
{
invalidate(DocumentIdsSelection.ALL);
}
@Override
public void invalidate(final DocumentIdsSelection rowIds)
{
final ImmutableSet<PaymentId> paymentIds = rowsHolder
.getRecordIdsToRefresh(rowIds, PaymentToReconcileRow::convertDocumentIdToPaymentId);
final List<PaymentToReco... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\PaymentToReconcileRows.java | 1 |
请完成以下Java代码 | private static boolean isEmptyPOFieldValue(final Object value)
{
if (value == null)
{
return true;
}
else if (value instanceof String)
{
return ((String)value).isEmpty();
}
else
{
return false;
}
}
private IQueryBuilder<Object> toQueryBuilder(final SqlDocumentEntityDataBindingDescriptor d... | }
return TableRecordReference.of(rootTableName, rootRecordId);
}
private static DocumentId extractDocumentId(final PO po, SqlDocumentEntityDataBindingDescriptor dataBinding)
{
if (dataBinding.isSingleKey())
{
return DocumentId.of(InterfaceWrapperHelper.getId(po));
}
else
{
final List<SqlDocumentF... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\save\DefaultSaveHandler.java | 1 |
请完成以下Java代码 | public class M_Attribute extends CalloutEngine
{
public String onSetADJavaClass(final Properties ctx, final int WindowNo,
final GridTab mTab, final GridField mField, final Object value,
final Object oldValue)
{
final I_M_Attribute attribute = InterfaceWrapperHelper.create(mTab, I_M_Attribute.class);
final ... | }
else
{
// Update Attribute's value type from generator
final String valueType = handler.getAttributeValueType();
if(valueType != null)
{
attribute.setAttributeValueType(valueType);
}
}
}
return NO_ERROR;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\callout\M_Attribute.java | 1 |
请在Spring Boot框架中完成以下Java代码 | @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2022-02-18T14:17:41.660Z[GMT]")public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
*
* @param array The array
* @param value The value to... | * if one of those libraries is added as dependency.
* </p>
*
* @param array The array of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(String[] array, String separator) {
int len = array.length;
if (len == 0) return "";
StringBu... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\StringUtil.java | 2 |
请完成以下Java代码 | public class AttachmentEntity implements Attachment, PersistentObject, HasRevision, Serializable {
private static final long serialVersionUID = 1L;
protected String id;
protected int revision;
protected String name;
protected String description;
protected String type;
protected String task... | public void setType(String type) {
this.type = type;
}
@Override
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
}
@Override
public String getProcessInstanceId() {
return processInstanceId;
}... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntity.java | 1 |
请完成以下Java代码 | public List<I_C_Period> retrievePeriods(
final Properties ctx,
final I_C_Year year,
final String trxName)
{
return new Query(ctx, I_C_Period.Table_Name, I_C_Period.COLUMNNAME_C_Year_ID + "=?", trxName)
.setParameters(year.getC_Year_ID())
.setOnlyActiveRecords(true)
.setClient_ID()
.setOrderB... | .list(I_C_Year.class);
}
@Override
public I_C_Period retrieveFirstPeriodOfTheYear(final I_C_Year year)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(year);
final String trxName = InterfaceWrapperHelper.getTrxName(year);
return new Query(ctx, I_C_Period.Table_Name, I_C_Period.COLUMNNAME_C_Year_ID + ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\calendar\impl\CalendarDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public List<RestVariable> getVariables() {
return variables;
}
public void setVariables(List<RestVariable> variables) {
this.variables = variables;
}
public void ... | public String getPropagatedStageInstanceId() {
return propagatedStageInstanceId;
}
public void setPropagatedStageInstanceId(String propagatedStageInstanceId) {
this.propagatedStageInstanceId = propagatedStageInstanceId;
}
public void setTenantId(String tenantId) {
this.tenantId... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskInstanceResponse.java | 2 |
请完成以下Java代码 | public boolean rollback()
{
throw new UnsupportedOperationException();
}
@Override
public boolean rollback(final boolean throwException) throws SQLException
{
throw new UnsupportedOperationException();
}
@Override
public boolean rollback(final ITrxSavepoint savepoint) throws DBException
{
throw new Uns... | {
throw new UnsupportedOperationException();
}
@Override
public <T> T getProperty(final String name)
{
throw new UnsupportedOperationException();
}
@Override
public <T> T getProperty(final String name, final Supplier<T> valueInitializer)
{
throw new UnsupportedOperationException();
}
@Override
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\NullTrxPlaceholder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JAXBElement<Integer> createSignatureCheck(Integer value) {
return new JAXBElement<Integer>(_SignatureCheck_QNAME, Integer.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}
*
* @param value
* Java instance representi... | public JAXBElement<SignatureVerificationType> createSignatureVerification(SignatureVerificationType value) {
return new JAXBElement<SignatureVerificationType>(_SignatureVerification_QNAME, SignatureVerificationType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@l... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\ObjectFactory.java | 2 |
请完成以下Java代码 | public void setR_IssueStatus_ID (int R_IssueStatus_ID)
{
if (R_IssueStatus_ID < 1)
set_Value (COLUMNNAME_R_IssueStatus_ID, null);
else
set_Value (COLUMNNAME_R_IssueStatus_ID, Integer.valueOf(R_IssueStatus_ID));
}
/** Get Issue Status.
@return Status of an Issue
*/
public int getR_IssueStatus_ID ()... | public void setSourceClassName (String SourceClassName)
{
set_Value (COLUMNNAME_SourceClassName, SourceClassName);
}
/** Get Source Class.
@return Source Class Name
*/
public String getSourceClassName ()
{
return (String)get_Value(COLUMNNAME_SourceClassName);
}
/** Set Source Method.
@param SourceM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueKnown.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Sequences
{
@NonNull
SimpleSequence packSeqNoSequence;
@NonNull
SimpleSequence packItemLineSequence;
}
/**
* All that's needed to create with a pack-request that includes a pack-item-request or just a single pack-item-request.
*/
@Value
@RequiredArgsConstructor
public static class... | I_EDI_DesadvLine desadvLineRecord;
@NonNull
I_M_InOutLine inOutLineRecord;
@NonNull
DesadvLineWithDraftedPackItems desadvLineWithPacks;
@NonNull
InvoicableQtyBasedOn invoicableQtyBasedOn;
@Nullable
BigDecimal uomToStockRatio;
@NonNull
SimpleSequence packSeqNoSequence;
@NonNull
SimpleSequence pac... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\impl\pack\EDIDesadvPackService.java | 2 |
请完成以下Java代码 | public Builder addColumn(final List<DocumentLayoutElementDescriptor.Builder> elementsBuilders)
{
if (elementsBuilders == null || elementsBuilders.isEmpty())
{
return this;
}
final DocumentLayoutElementGroupDescriptor.Builder elementsGroupBuilder = DocumentLayoutElementGroupDescriptor.builder();
el... | }
public boolean isValid()
{
return invalidReason == null;
}
public boolean isInvalid()
{
return invalidReason != null;
}
public boolean isNotEmpty()
{
return streamElementBuilders().findAny().isPresent();
}
private Stream<DocumentLayoutElementDescriptor.Builder> streamElementBuilders()... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSectionDescriptor.java | 1 |
请完成以下Java代码 | private static ProductsProposalRow reduceUserRequest(final ProductsProposalRow row, final UserChange request)
{
final ProductsProposalRowBuilder newRowBuilder = row.toBuilder();
if (request.getQty() != null)
{
newRowBuilder.qty(request.getQty().orElse(null));
}
if (request.getPrice() != null)
{
if ... | newRowBuilder.description(request.getDescription().orElse(null));
}
return newRowBuilder.build();
}
private static ProductsProposalRow reduceRowUpdate(final ProductsProposalRow row, final RowUpdate request)
{
return row.toBuilder()
.price(request.getPrice())
.lastShipmentDays(request.getLastShipmentD... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductsProposalRowReducers.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.