instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private void addNodesSF(
final ArrayList<WFNode> list,
@NonNull final WFNodeId nodeId,
@NonNull final ClientId clientId)
{
final ArrayList<WFNode> tmplist = new ArrayList<>();
final WFNode node = getNodeById(nodeId);
final ClientId nodeClientId = node.getClientId();
if (nodeClientId.isSystem() || Cl... | // Remainder Nodes not connected
for (final WFNode mwfNode : tmplist)
{
addNodesSF(list, mwfNode.getId(), clientId);
}
}
}
public ImmutableList<WFNodeTransition> getTransitionsFromNode(
@NonNull final WFNodeId nodeId,
@NonNull final ClientId clientId)
{
for (final WFNode node : getNodesInOrde... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\Workflow.java | 1 |
请完成以下Java代码 | public class PasswordPolicyDigitRuleImpl implements PasswordPolicyRule {
public static final String PLACEHOLDER = DefaultPasswordPolicyImpl.PLACEHOLDER_PREFIX + "DIGIT";
protected int minDigit;
public PasswordPolicyDigitRuleImpl(int minDigit) {
this.minDigit = minDigit;
}
@Override
public String g... | }
@Override
public boolean execute(String password) {
int digitCount = 0;
for (Character c : password.toCharArray()) {
if (Character.isDigit(c)) {
digitCount++;
}
if (digitCount >= this.minDigit) {
return true;
}
}
return false;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\PasswordPolicyDigitRuleImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Duration meterTTL() {
return obtain(AtlasProperties::getMeterTimeToLive, AtlasConfig.super::meterTTL);
}
@Override
public boolean lwcEnabled() {
return obtain(AtlasProperties::isLwcEnabled, AtlasConfig.super::lwcEnabled);
}
@Override
public Duration lwcStep() {
return obtain(AtlasProperties::getLwc... | return obtain(AtlasProperties::getConfigRefreshFrequency, AtlasConfig.super::configRefreshFrequency);
}
@Override
public Duration configTTL() {
return obtain(AtlasProperties::getConfigTimeToLive, AtlasConfig.super::configTTL);
}
@Override
public String configUri() {
return obtain(AtlasProperties::getConfigU... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public class SignalPayload implements Payload {
private String id;
private String name;
private Map<String, Object> variables = new HashMap<>();
public SignalPayload() {
this.id = UUID.randomUUID().toString();
}
public SignalPayload(String name, Map<String, Object> variables) {
... | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Map<String, Object> getVariables() {
return variables;
}
public void setVariables(Map<String, Object> variables) {
this.variables = variables;
}
} | repos\Activiti-develop\activiti-api\activiti-api-process-model\src\main\java\org\activiti\api\process\model\payloads\SignalPayload.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
} | public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public Map<String, String> getAttributes() {
return attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes... | repos\tutorials-master\persistence-modules\hibernate5\src\main\java\com\baeldung\hibernate\persistjson\Warehouse.java | 1 |
请完成以下Java代码 | public class SetCaseInstanceBusinessKeyCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
private final String caseInstanceId;
private final String businessKey;
public SetCaseInstanceBusinessKeyCmd(String caseInstanceId, String businessKey) {
if (cas... | }
@Override
public Void execute(CommandContext commandContext) {
CaseInstanceEntityManager caseInstanceEntityManager = CommandContextUtil.getCaseInstanceEntityManager(commandContext);
CaseInstanceEntity caseInstanceEntity = caseInstanceEntityManager.findById(caseInstanceId);
if (caseIns... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\SetCaseInstanceBusinessKeyCmd.java | 1 |
请完成以下Java代码 | protected @NonNull ObjectMapper newObjectMapper(@NonNull Object target) {
Assert.notNull(target, "Target object must not be null");
return newObjectMapper()
.addMixIn(target.getClass(), ObjectTypeMetadataMixin.class)
.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true)
.configure(MapperFeatu... | * @see com.fasterxml.jackson.databind.ObjectMapper
*/
@NonNull ObjectMapper newObjectMapper() {
return new ObjectMapper();
}
@JsonTypeInfo(
use = JsonTypeInfo.Id.CLASS,
include = JsonTypeInfo.As.PROPERTY,
property = AT_TYPE_METADATA_PROPERTY_NAME
)
@SuppressWarnings("all")
interface ObjectTypeMetadataM... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\json\converter\support\JacksonObjectToJsonConverter.java | 1 |
请完成以下Java代码 | default Deserializer<V> getValueDeserializer() {
return null;
}
/**
* Remove a listener.
* @param listener the listener.
* @return true if removed.
*/
default boolean removeListener(Listener<K, V> listener) {
return false;
}
/**
* Add a listener at a specific index.
* @param index the index (list... | * @param <K> the key type.
* @param <V> the value type.
*/
interface Listener<K, V> {
/**
* A new consumer was created.
* @param id the consumer id (factory bean name and client.id separated by a period).
* @param consumer the consumer.
*/
default void consumerAdded(String id, ShareConsumer<K, V> ... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\core\ShareConsumerFactory.java | 1 |
请完成以下Java代码 | public CaseReactivationBuilder variable(String name, Object value) {
if (variables == null) {
variables = new HashMap<>();
}
variables.put(name, value);
return this;
}
@Override
public CaseReactivationBuilder variables(Map<String, Object> variables) {
if ... | }
transientVariables.put(name, value);
return this;
}
@Override
public CaseReactivationBuilder transientVariables(Map<String, Object> variables) {
if (transientVariables == null) {
transientVariables = new HashMap<>();
}
transientVariables.putAll(variable... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\reactivation\CaseReactivationBuilderImpl.java | 1 |
请完成以下Java代码 | public String asQualityNoticesString()
{
if (qualityNoticesSet == null || qualityNoticesSet.isEmpty())
{
return "";
}
final StringBuilder qualityNoticesStr = new StringBuilder();
for (final String qualityNotice : qualityNoticesSet)
{
// skip empty notes
if (Check.isEmpty(qualityNotice, true))
... | if (qualityNoticesStr.length() > 0)
{
qualityNoticesStr.append(SEPARATOR_String);
}
qualityNoticesStr.append(qualityNotice.trim());
}
return qualityNoticesStr.toString();
}
public Set<String> getQualityNoticesSet()
{
// always return a copy!!!
return new TreeSet<>(this.qualityNoticesSet);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\spi\impl\QualityNoticesCollection.java | 1 |
请完成以下Java代码 | private I_MKTG_Campaign createOrUpdateRecordDontSave(@NonNull final Campaign campaign)
{
final I_MKTG_Campaign campaignRecord;
if (campaign.getCampaignId() != null)
{
campaignRecord = retrieveRecordById(campaign.getCampaignId());
}
else
{
campaignRecord = newInstance(I_MKTG_Campaign.class);
}
ca... | .firstId(CampaignId::ofRepoIdOrNull);
return Optional.ofNullable(defaultCampaignId);
}
public void removeContactPersonFromCampaign(
@NonNull final ContactPerson contactPerson,
@NonNull final Campaign campaign)
{
final ContactPersonId contactPersonId = Check.assumeNotNull(contactPerson.getContactPersonId(... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\CampaignRepository.java | 1 |
请完成以下Java代码 | protected static UUID getTenantUuid(TenantId tenantId) {
if (tenantId != null) {
return tenantId.getId();
} else {
return EntityId.NULL_UUID;
}
}
protected static <I> I getEntityId(UUID uuid, Function<UUID, I> creator) {
return DaoUtil.toEntityId(uuid, cr... | }
protected <T> T fromJson(JsonNode json, Class<T> type) {
return JacksonUtil.convertValue(json, type);
}
protected String listToString(List<?> list) {
if (list != null) {
return StringUtils.join(list, ',');
} else {
return "";
}
}
protected... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\BaseSqlEntity.java | 1 |
请完成以下Java代码 | public class C_BPartner_MoveToAnotherOrg_PostalChange extends C_BPartner_MoveToAnotherOrg_ProcessHelper
{
private final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class);
private final ILocationDAO locationDAO = Services.get(ILocationDAO.class);
@Nullable
@Override
public Object getParameterDefaultValu... | final OrgChangeBPartnerComposite orgChangePartnerComposite = service.getByIdAndOrgChangeDate(partnerId, orgChangeDate);
isShowMembershipParameter = orgChangePartnerComposite.hasMembershipSubscriptions()
&& service.hasAnyMembershipProduct(p_orgTargetId);
return isShowMembershipParameter;
}
else if (PARA... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\process\C_BPartner_MoveToAnotherOrg_PostalChange.java | 1 |
请完成以下Java代码 | public class EchoClient {
private DatagramSocket socket;
private InetAddress address;
private byte[] buf;
public EchoClient() {
try {
socket = new DatagramSocket();
address = InetAddress.getByName("localhost");
} catch (IOException e) {
e.printStackT... | DatagramPacket packet = null;
try {
buf = msg.getBytes();
packet = new DatagramPacket(buf, buf.length, address, 4445);
socket.send(packet);
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
} catch (IOException e) {
... | repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\networking\udp\EchoClient.java | 1 |
请完成以下Java代码 | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection token) {
String username = JWTUtil.getUsername(token.toString());
User user = SystemUtils.getUser(username);
SimpleAuthorizationInfo simpleAuthorizationInfo = new SimpleAuthorizationInfo();
// 获取用户角色集(模拟值,实际从数据库获取)
... | */
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
// 这里的 token是从 JWTFilter 的 executeLogin 方法传递过来的,已经经过了解密
String token = (String) authenticationToken.getCredentials();
String username = JWTUtil.get... | repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\authentication\ShiroRealm.java | 1 |
请完成以下Java代码 | public class AclEntryAfterInvocationCollectionFilteringProvider extends AbstractAclProvider {
protected static final Log logger = LogFactory.getLog(AclEntryAfterInvocationCollectionFilteringProvider.class);
public AclEntryAfterInvocationCollectionFilteringProvider(AclService aclService,
List<Permission> requireP... | continue;
}
if (!hasPermission(authentication, domainObject)) {
filterer.remove(domainObject);
logger.debug(LogMessage.of(() -> "Principal is NOT authorised for element: " + domainObject));
}
}
return filterer.getFilteredObject();
}
return returnedObject;
}
private Filterer getFiltere... | repos\spring-security-main\access\src\main\java\org\springframework\security\acls\afterinvocation\AclEntryAfterInvocationCollectionFilteringProvider.java | 1 |
请完成以下Java代码 | public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ... | /** Set Supervisor.
@param Supervisor_ID
Supervisor for this user/organization - used for escalation and approval
*/
public void setSupervisor_ID (int Supervisor_ID)
{
if (Supervisor_ID < 1)
set_Value (COLUMNNAME_Supervisor_ID, null);
else
set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Super... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertProcessor.java | 1 |
请完成以下Java代码 | protected ByteArrayEntity findByteArrayById(String byteArrayId, CommandContext commandContext) {
return commandContext.getDbEntityManager()
.selectById(ByteArrayEntity.class, byteArrayId);
}
protected HistoricDecisionInstanceEntity findDecisionInstanceById(String instanceId, CommandContext commandContext... | return new SetRemovalTimeBatchConfiguration(decisionInstanceIds)
.setRemovalTime(configuration.getRemovalTime())
.setHasRemovalTime(configuration.hasRemovalTime())
.setHierarchical(configuration.isHierarchical());
}
protected SetRemovalTimeJsonConverter getJsonConverterInstance() {
return Set... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\DecisionSetRemovalTimeJobHandler.java | 1 |
请完成以下Java代码 | public void setLetterBodyParsed (java.lang.String LetterBodyParsed)
{
set_Value (COLUMNNAME_LetterBodyParsed, LetterBodyParsed);
}
/** Get Body (parsed).
@return Body (parsed) */
@Override
public java.lang.String getLetterBodyParsed ()
{
return (java.lang.String)get_Value(COLUMNNAME_LetterBodyParsed);
... | {
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@return Direct internal record ID
*/
@Override
public int getRecord_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\letters\model\X_C_Letter.java | 1 |
请完成以下Java代码 | public class PvmAtomicOperationTransitionNotifyListenerEnd extends PvmAtomicOperationActivityInstanceEnd {
protected ScopeImpl getScope(PvmExecutionImpl execution) {
return execution.getActivity();
}
protected String getEventName() {
return ExecutionListener.EVENTNAME_END;
}
@Override
protected v... | public Void callback(PvmExecutionImpl execution) {
execution.leaveActivityInstance();
execution.performOperation(TRANSITION_DESTROY_SCOPE);
return null;
}
});
}
public String getCanonicalName() {
return "transition-notify-listener-end";
}
@Override
public boolean should... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationTransitionNotifyListenerEnd.java | 1 |
请完成以下Java代码 | public class CamundaGenericValueElementImpl extends BpmnModelElementInstanceImpl implements CamundaGenericValueElement {
public CamundaGenericValueElementImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
@SuppressWarnings("unchecked")
public <T extends BpmnModelElementInstance> T ... | public void removeValue() {
DomElement domElement = getDomElement();
List<DomElement> childElements = domElement.getChildElements();
for (DomElement childElement : childElements) {
domElement.removeChild(childElement);
}
}
public <T extends BpmnModelElementInstance> void setValue(T value) {
... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaGenericValueElementImpl.java | 1 |
请完成以下Java代码 | private void setOrderedData(
@NonNull final I_C_Invoice_Candidate ic,
@NonNull final I_C_OLCand olc)
{
ic.setDateOrdered(olc.getDateCandidate());
final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class);
final Quantity olCandQuantity = Quantity.of(olCandEffectiveValuesBL.getEffective... | olc,
null,
PricingSystemId.NULL,
TimeUtil.asLocalDate(olCandEffectiveValuesBL.getDatePromised_Effective(olc), timeZone));
return PriceAndTax.builder()
.priceUOMId(pricingResult.getPriceUomId())
.priceActual(pricingResult.getPriceStd())
.taxIncluded(pricingResult.isTaxIncluded())
.invoicab... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\invoicecandidate\spi\impl\C_OLCand_Handler.java | 1 |
请完成以下Java代码 | public LogicExpressionResult updateAndGetAllowDeleteDocument(final IncludedDocumentsCollectionActionsContext context)
{
final LogicExpressionResult allowDeleteOld = allowDelete;
final LogicExpressionResult allowDelete = computeAllowDeleteDocument(context);
this.allowDelete = allowDelete;
if (!allowDeleteOld.e... | if (!context.isParentDocumentActive())
{
return DISALLOW_ParentDocumentNotActive;
}
final LogicExpressionResult allowDelete = allowDeleteLogic.evaluateToResult(context.toEvaluatee(), OnVariableNotFound.ReturnNoResult);
return allowDelete;
}
public void onNewDocument(final Document document, final Include... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\IncludedDocumentsCollectionActions.java | 1 |
请完成以下Java代码 | public int getAD_User_Responsible_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_Responsible_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_WF_Responsible getAD_WF_Responsible() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_W... | else
set_ValueNoCheck (COLUMNNAME_C_Doc_Responsible_ID, Integer.valueOf(C_Doc_Responsible_ID));
}
/** Get Document Responsible.
@return Document Responsible */
@Override
public int getC_Doc_Responsible_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Doc_Responsible_ID);
if (ii == null)
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\workflow\model\X_C_Doc_Responsible.java | 1 |
请完成以下Java代码 | public java.lang.String getUserElementString7()
{
return get_ValueAsString(COLUMNNAME_UserElementString7);
}
@Override
public org.compiere.model.I_C_CostClassification_Category getC_CostClassification_Category()
{
return get_ValueAsPO(COLUMNNAME_C_CostClassification_Category_ID, org.compiere.model.I_C_CostCla... | public void setC_CostClassification(final org.compiere.model.I_C_CostClassification C_CostClassification)
{
set_ValueFromPO(COLUMNNAME_C_CostClassification_ID, org.compiere.model.I_C_CostClassification.class, C_CostClassification);
}
@Override
public void setC_CostClassification_ID (final int C_CostClassificatio... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Fact_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ESDocumentToIndex
{
@NonNull String documentId;
@NonNull String json;
@Builder
private ESDocumentToIndex(
@NonNull final String documentId,
@NonNull final String json)
{
this.documentId = documentId;
this.json = json;
}
public Set<ESFieldName> getESFieldNames()
{
try | {
final Map<String, Object> map = JsonObjectMapperHolder.sharedJsonObjectMapper().readValue(json, Map.class);
final HashSet<ESFieldName> fieldNames = new HashSet<>();
fieldNames.add(ESFieldName.ID);
map.keySet().stream().map(ESFieldName::ofString).forEach(fieldNames::add);
return fieldNames;
}
catch... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\ESDocumentToIndex.java | 2 |
请完成以下Java代码 | public static HttpStatusHolder valueOf(String status) {
HttpStatusCode httpStatus;
try {
httpStatus = HttpStatus.valueOf(status.toUpperCase(Locale.ROOT));
}
catch (IllegalArgumentException e) {
httpStatus = null;
}
final Integer intStatus;
if (httpStatus == null) {
intStatus = Integer.parseInt(st... | }
/**
* Whether this status code is in the HTTP series
* {@link HttpStatus.Series#CLIENT_ERROR}.
* @return <code>true</code> if status code is in the CLIENT_ERROR http series
*/
public boolean is4xxClientError() {
return HttpStatus.Series.CLIENT_ERROR.equals(getSeries());
}
/**
* Whether this status c... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\common\HttpStatusHolder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExternalSystemScriptedExportConversionConfigId implements IExternalSystemChildConfigId
{
int repoId;
@JsonCreator
@NonNull
public static ExternalSystemScriptedExportConversionConfigId ofRepoId(final int repoId)
{
return new ExternalSystemScriptedExportConversionConfigId(repoId);
}
@Nullable
pub... | public int toJson()
{
return getRepoId();
}
private ExternalSystemScriptedExportConversionConfigId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "ExternalSystem_Config_ScriptedExportConversion_ID");
}
@Override
public ExternalSystemType getType()
{
return ExternalSystemType.Scrip... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\ExternalSystemScriptedExportConversionConfigId.java | 2 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final String tableName = getTableName();
if (I_GL_JournalBatch.Table_Name.equals(tableName))
{
final I_GL_JournalBatch glJournalBatch = getRecord(I_GL_JournalBatch.class);
changePostingType(glJournalBatch);
}
else if (I_GL_Journal.Table_Name.equals(tableName))... | private void changePostingType(final I_GL_JournalBatch glJournalBatch)
{
glJournalBatch.setPostingType(p_PostingType);
InterfaceWrapperHelper.save(glJournalBatch);
final List<I_GL_Journal> glJournals = glJournalDAO.retrieveJournalsForBatch(glJournalBatch);
for (final I_GL_Journal glJournal : glJournals)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\GL_Journal_ChangePostingType.java | 1 |
请完成以下Java代码 | public class CustomerKey implements Serializable {
private static final long serialVersionUID = -3529253035303792458L;
private long id;
private String country;
public CustomerKey(long id) {
this.id = id;
this.country = "USA";
}
public CustomerKey(long id, String country) {
... | }
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CustomerKey that = (CustomerKey) o;
if (id != that.id)
return false;
return country != null ? countr... | repos\tutorials-master\apache-libraries-2\src\main\java\com\baeldung\apache\geode\CustomerKey.java | 1 |
请完成以下Java代码 | public Article unfavoriteArticle(Article articleToUnfavorite) {
articleFavorited.remove(articleToUnfavorite);
return articleToUnfavorite.afterUserUnFavoritesArticle(this);
}
User followUser(User followee) {
followingUsers.add(followee);
return this;
}
User unfollowUser(... | public Long getId() {
return id;
}
public Email getEmail() {
return email;
}
public UserName getName() {
return profile.getUserName();
}
String getBio() {
return profile.getBio();
}
Image getImage() {
return profile.getImage();
}
@Over... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\User.java | 1 |
请完成以下Java代码 | public class Assignment extends BaseElement {
protected String from;
protected String to;
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
} | public void setTo(String to) {
this.to = to;
}
public Assignment clone() {
Assignment clone = new Assignment();
clone.setValues(this);
return clone;
}
public void setValues(Assignment otherAssignment) {
setFrom(otherAssignment.getFrom());
setTo(otherAssi... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\Assignment.java | 1 |
请完成以下Java代码 | public boolean isEmpty(@Nullable final String str, final boolean trimWhitespaces)
{
if (str == null)
{
return true;
}
if (trimWhitespaces)
{
return str.trim().isEmpty();
}
else
{
return str.isEmpty();
}
} // isEmpty
/**
* @return true if the array is null or it's length is zero.
*/ | @Contract("null -> true")
public <T> boolean isEmpty(@Nullable final T[] arr)
{
return arr == null || arr.length == 0;
}
/**
* @return true if given collection is <code>null</code> or it has no elements
*/
@Contract("null -> true")
public boolean isEmpty(@Nullable final Collection<?> collection)
{
retur... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-util\src\main\java\de\metas\common\util\EmptyUtil.java | 1 |
请完成以下Java代码 | public int getAD_AttachmentEntry_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_AttachmentEntry_ID);
}
@Override
public void setBinaryData (final @Nullable byte[] BinaryData)
{
set_ValueNoCheck (COLUMNNAME_BinaryData, BinaryData);
}
@Override
public byte[] getBinaryData()
{
return (byte[])get_Value(COLUM... | @Override
public void setTags (final @Nullable java.lang.String Tags)
{
set_Value (COLUMNNAME_Tags, Tags);
}
@Override
public java.lang.String getTags()
{
return get_ValueAsString(COLUMNNAME_Tags);
}
/**
* Type AD_Reference_ID=540751
* Reference name: AD_AttachmentEntry_Type
*/
public static fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AttachmentEntry.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setS_Issue_ID (final int S_Issue_ID)
{
if (S_Issue_ID < 1)
set_ValueNoCheck (COLUMNNAME_S_Issue_ID, null);
else
set_ValueNoCheck (COLUMNNAME_S_Issue_ID, S_Issue_ID);
}
@Override
public int getS_Issue_ID()
{
return get_ValueAsInt(COLUMNNAME_S_Issue_ID);
}
@Override
public de.metas.se... | public void setS_Parent_Issue_ID (final int S_Parent_Issue_ID)
{
if (S_Parent_Issue_ID < 1)
set_Value (COLUMNNAME_S_Parent_Issue_ID, null);
else
set_Value (COLUMNNAME_S_Parent_Issue_ID, S_Parent_Issue_ID);
}
@Override
public int getS_Parent_Issue_ID()
{
return get_ValueAsInt(COLUMNNAME_S_Parent_Iss... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_Issue.java | 2 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_Tab_Callout[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Set AD_Tab_Callout.
@param AD_Tab_Callout_ID AD_Tab_Callout */
public void setAD_Tab_Callout_ID (int AD_Tab_Callout_ID)
{
if (AD_Tab_Callou... | /** EntityType AD_Reference_ID=389 */
public static final int ENTITYTYPE_AD_Reference_ID=389;
/** Set Entitäts-Art.
@param EntityType
Dictionary Entity Type; Determines ownership and synchronization
*/
public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_AD_Tab_Callout.java | 1 |
请完成以下Java代码 | public void receiveMessage() {
try {
Message message = receiver.receive(1000);
if (message instanceof TextMessage) {
TextMessage textMessage = (TextMessage) message;
long timestamp = message.getJMSTimestamp();
String messageId = message.get... | }
if (session != null) {
session.close();
}
if (connection != null) {
connection.close();
}
} catch (JMSException e) {
// handle exception
}
}
}
} | repos\tutorials-master\messaging-modules\ibm-mq\src\main\java\com\baeldung\ibmmq\MessageReceiver.java | 1 |
请完成以下Java代码 | public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public boolean isUsing2FA() {
return isUsing2FA;
}
public void setUsing2FA(boolean isUsing2FA) {
this.isUsing2FA = isUsing2FA;
}
@Overrid... | if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
User user = (User) obj;
if (!email.equals(user.email)) {
return false;
}
return... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\model\User.java | 1 |
请完成以下Spring Boot application配置 | spring:
ai:
openai:
api-key: "<YOUR-API-KEY>"
embedding:
options:
model: "text-embedding-3-small"
# Avoid starting docker | from the shared codebase
docker:
compose:
enabled: false | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\resources\application-embeddings.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PublicUserResource {
private static final List<String> ALLOWED_ORDERED_PROPERTIES = Collections.unmodifiableList(
Arrays.asList("id", "login", "firstName", "lastName", "email", "activated", "langKey")
);
private final Logger log = LoggerFactory.getLogger(PublicUserResource.class);
... | return Mono.just(ResponseEntity.badRequest().build());
}
return userService
.countManagedUsers()
.map(total -> new PageImpl<>(new ArrayList<>(), pageable, total))
.map(
page ->
PaginationUtil.generatePaginationHttpHeaders(
... | repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\web\rest\PublicUserResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public HistoricIdentityLinkEntity createHistoricIdentityLink() {
return getHistoricIdentityLinkEntityManager().create();
}
@Override
public void insertHistoricIdentityLink(HistoricIdentityLinkEntity identityLink, boolean fireCreateEvent) {
getHistoricIdentityLinkEntityManager().insert(i... | @Override
public void bulkDeleteHistoricIdentityLinksForTaskIds(Collection<String> taskIds) {
getHistoricIdentityLinkEntityManager().bulkDeleteHistoricIdentityLinksForTaskIds(taskIds);
}
@Override
public void bulkDeleteHistoricIdentityLinksByScopeIdsAndScopeType(Collection<String> scopeIds,... | repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\HistoricIdentityLinkServiceImpl.java | 2 |
请完成以下Java代码 | public class LockByKey {
private static class LockWrapper {
private final Lock lock = new ReentrantLock();
private final AtomicInteger numberOfThreadsInQueue = new AtomicInteger(1);
private LockWrapper addThreadInQueue() {
numberOfThreadsInQueue.incrementAndGet();
... | public void lock(String key) {
LockWrapper lockWrapper = locks.compute(key, (k, v) -> v == null ? new LockWrapper() : v.addThreadInQueue());
lockWrapper.lock.lock();
}
public void unlock(String key) {
LockWrapper lockWrapper = locks.get(key);
lockWrapper.lock.unlock();
... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-4\src\main\java\com\baeldung\lockbykey\LockByKey.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class HUsToReturnViewBasedProcess extends ViewBasedProcessTemplate
{
@Override
protected HUEditorView getView()
{
return HUEditorView.cast(super.getView());
}
public HUsToReturnViewContext getHUsToReturnViewContext()
{
return getView()
.getParameter(HUsToReturnViewFactory.PARAM_HUsToRetur... | final DocumentIdsSelection selectedRowIds = getSelectedRowIds();
if (!selectedRowIds.isSingleDocumentId())
{
return null;
}
final DocumentId rowId = selectedRowIds.getSingleDocumentId();
return getView().getById(rowId);
}
@Override
protected HUEditorRow getSingleSelectedRow()
{
return HUEditorRow.c... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\customerreturns\process\HUsToReturnViewBasedProcess.java | 2 |
请完成以下Java代码 | private boolean isLocalApplication(ConfigurableEnvironment environment) {
return environment.getPropertySources().get("remoteUrl") == null;
}
private boolean canAddProperties(Environment environment) {
if (environment.getProperty(ENABLED, Boolean.class, true)) {
return isRestarterInitialized() || isRemoteRest... | }
}
return false;
}
private @Nullable Class<?> resolveClassName(String candidate, ClassLoader classLoader) {
try {
return ClassUtils.resolveClassName(candidate, classLoader);
}
catch (IllegalArgumentException ex) {
return null;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\env\DevToolsPropertyDefaultsPostProcessor.java | 1 |
请完成以下Java代码 | public List<I_M_HU_Attribute> retrieveAllAttributesNoCache(final Collection<HuId> huIds)
{
final SaveDecoupledHUAttributesDAO delegate = getDelegate();
return delegate.retrieveAllAttributesNoCache(huIds);
}
@Override
public HUAndPIAttributes retrieveAttributesOrdered(final I_M_HU hu)
{
final SaveDecoupledHU... | {
final SaveDecoupledHUAttributesDAO delegate = getDelegate();
return delegate.retrieveAttribute(hu, attributeId);
}
@Override
public void flush()
{
final SaveDecoupledHUAttributesDAO attributesDAO = getDelegateOrNull();
if (attributesDAO != null)
{
attributesDAO.flush();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\SaveOnCommitHUAttributesDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class LocalDateType implements VariableType {
public static final String TYPE_NAME = "localdate";
@Override
public String getTypeName() {
return TYPE_NAME;
}
@Override
public boolean isCachable() {
return true;
}
@Override
public boolean isAbleToStore(Objec... | public Object getValue(ValueFields valueFields) {
Long longValue = valueFields.getLongValue();
if (longValue != null) {
return LocalDate.ofEpochDay(longValue);
}
return null;
}
@Override
public void setValue(Object value, ValueFields valueFields) {
if (va... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\LocalDateType.java | 2 |
请完成以下Java代码 | final class FailureAnalyzers implements SpringBootExceptionReporter {
private static final Log logger = LogFactory.getLog(FailureAnalyzers.class);
private final SpringFactoriesLoader springFactoriesLoader;
private final List<FailureAnalyzer> analyzers;
public FailureAnalyzers(@Nullable ConfigurableApplicationCo... | }
catch (Throwable ex) {
logger.trace(LogMessage.format("FailureAnalyzer %s failed", analyzer), ex);
}
}
return null;
}
private boolean report(@Nullable FailureAnalysis analysis) {
List<FailureAnalysisReporter> reporters = this.springFactoriesLoader.load(FailureAnalysisReporter.class);
if (analysis... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\diagnostics\FailureAnalyzers.java | 1 |
请完成以下Java代码 | public class ReceiptScheduleCreatedEvent extends AbstractReceiptScheduleEvent
{
public static ReceiptScheduleCreatedEvent cast(@NonNull final AbstractReceiptScheduleEvent event)
{
return (ReceiptScheduleCreatedEvent)event;
}
public static final String TYPE = "ReceiptScheduleCreatedEvent";
private final OrderLi... | receiptScheduleId);
this.purchaseCandidateRepoId = purchaseCandidateRepoId;
this.orderLineDescriptor = orderLineDescriptor;
this.vendorId = vendorId;
}
@Override
public BigDecimal getOrderedQuantityDelta()
{
return getMaterialDescriptor().getQuantity();
}
@Override
public BigDecimal getReservedQuantit... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\receiptschedule\ReceiptScheduleCreatedEvent.java | 1 |
请完成以下Java代码 | private final void updateRfQResponseLinesStatus(final I_C_RfQResponse rfqResponse)
{
final List<I_C_RfQResponseLine> rfqResponseLines = rfqDAO.retrieveResponseLines(rfqResponse);
updateRfQResponseLinesStatus(rfqResponse, rfqResponseLines);
}
private static final void updateRfQResponseLinesStatus(final I_C_RfQRe... | InterfaceWrapperHelper.save(rfqResponse);
}
@Override
public void unCloseIt(final DocumentTableFields docFields)
{
final I_C_RfQResponse rfqResponse = extractRfQResponse(docFields);
//
rfqEventDispacher.fireBeforeUnClose(rfqResponse);
//
// Mark as NOT closed
rfqResponse.setDocStatus(X_C_RfQResponse.... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\RfQResponseDocumentHandler.java | 1 |
请完成以下Java代码 | public void prepare() {
long common = 1;
elements = new Long[s];
for (int i = 0; i < s - 1; i++) {
elements[i] = common;
}
elements[s - 1] = pivot;
}
@Override
@TearDown
public void clean() {
elements = null;
}
@Override
@Benchmar... | @BenchmarkMode(Mode.AverageTime)
public int findPosition() {
int index = 0;
Long pivotWrapper = pivot;
while (!pivotWrapper.equals(elements[index])) {
index++;
}
return index;
}
@Override
public String getSimpleClassName() {
return LongWrappe... | repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\primitive\LongWrapperLookup.java | 1 |
请完成以下Java代码 | public AdProcessId getReportProcessIdByPrintFormatId(@NonNull final PrintFormatId printFormatId)
{
return getReportProcessIdByPrintFormatIdIfExists(printFormatId).get();
}
@NonNull
public ExplainedOptional<AdProcessId> getReportProcessIdByPrintFormatIdIfExists(@NonNull final PrintFormatId printFormatId)
{
fin... | @Nullable final I_C_DocType docType,
@Nullable final BPPrintFormatQuery bpPrintFormatQuery)
{
final BPPrintFormat bpPrintFormat = bpPrintFormatQuery == null ? null : bPartnerPrintFormatRepository.getByQuery(bpPrintFormatQuery);
if(bpPrintFormat == null)
{
return getDocumentCopies(docType);
}
return bp... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\DocumentReportAdvisorUtil.java | 1 |
请完成以下Java代码 | public void addResultSet(ResultSet rs) {
m_resultSets.add(rs);
}
public boolean getMoreResults() {
if (resultSetPointer >= m_resultSets.size())
return false;
//implicitly close the current resultset
try {
m_resultSets.get(resultSetPointer).close();
} catch (SQLException e) {}
resultSetPointer +... | public ResultSet getResultSet() {
if (resultSetPointer >= m_resultSets.size())
return null;
return m_resultSets.get(resultSetPointer);
}
public boolean isFirstResult() {
return firstResult;
}
public void setFirstResult(boolean firstResult) {
this.firstResult = firstResult;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\ExecuteResult.java | 1 |
请完成以下Java代码 | public class C_Order extends OrderFastInput
{
public String UpdateQuickEntry(final ICalloutField calloutField)
{
// Check: if is dirty/temporary value skip it
final Object value = calloutField.getValue();
if (value == null)
{
return NO_ERROR;
}
final String FLAGNAME = C_Order.class.getName() + "Updati... | // Otherwise, the fast input shall work as before ( just based on Product and Menge CU)
if (hasTus)
{
Services.get(IHUOrderBL.class).updateQtys(order, calloutField.getColumnName());
}
return CalloutEngine.NO_ERROR;
}
finally
{
Env.setContext(ctx, WindowNo, FLAGNAME, (String)null);
}
}
// ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\callout\C_Order.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class PropertiesOtlpLoggingConnectionDetails implements OtlpLoggingConnectionDetails {
private final OtlpLoggingProperties properties;
PropertiesOtlpLoggingConnectionDetails(OtlpLoggingProperties properties) {
this.properties = properties;
}
@Override
public String getUrl(Transport transpor... | OtlpLoggingConnectionDetails connectionDetails, ObjectProvider<MeterProvider> meterProvider) {
OtlpHttpLogRecordExporterBuilder builder = OtlpHttpLogRecordExporter.builder()
.setEndpoint(connectionDetails.getUrl(Transport.HTTP))
.setTimeout(properties.getTimeout())
.setConnectTimeout(properties.getConnec... | repos\spring-boot-4.0.1\module\spring-boot-opentelemetry\src\main\java\org\springframework\boot\opentelemetry\autoconfigure\logging\otlp\OtlpLoggingConfigurations.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static Map<String, String> getUrlParams(HttpServletRequest request) {
Map<String, String> result = new HashMap<>(16);
if (oConvertUtils.isEmpty(request.getQueryString())) {
return result;
}
String param = "";
try {
param = URLDecoder.decode(request.... | public static Map<String, String> getUrlParams(String queryString) {
Map<String, String> result = new HashMap<>(16);
if (oConvertUtils.isEmpty(queryString)) {
return result;
}
String param = "";
try {
param = URLDecoder.decode(queryString, "utf-8");
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\sign\util\HttpUtils.java | 2 |
请完成以下Java代码 | protected ModelEntityManager getModelEntityManager() {
return getProcessEngineConfiguration().getModelEntityManager();
}
protected ExecutionEntityManager getExecutionEntityManager() {
return getProcessEngineConfiguration().getExecutionEntityManager();
}
protected TaskEntityManager getT... | protected HistoricProcessInstanceEntityManager getHistoricProcessInstanceEntityManager() {
return getProcessEngineConfiguration().getHistoricProcessInstanceEntityManager();
}
protected HistoricDetailEntityManager getHistoricDetailEntityManager() {
return getProcessEngineConfiguration().getHisto... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\AbstractManager.java | 1 |
请完成以下Java代码 | public static SqlOptions usingTableName(final String tableName)
{
return SqlOptions.builder()
.useTableAlias(false)
.tableName(tableName)
.build();
}
private static final SqlOptions USE_TABLE_ALIAS_MASTER = SqlOptions.builder().useTableAlias(true).tableAlias("master").build();
private final boolean ... | public boolean isUseTableAlias()
{
return useTableAlias;
}
public String getTableAlias()
{
if (!useTableAlias)
{
throw new AdempiereException("tableAlias is not available for " + this);
}
return tableAlias;
}
public String getTableNameOrAlias()
{
return useTableAlias ? tableAlias : tableName;
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlOptions.java | 1 |
请完成以下Java代码 | public BigDecimal getVat() {
return vat;
}
/**
* Sets the value of the vat property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVat(BigDecimal value) {
this.vat = value;
}
/**
* Gets the value of ... | public void setVatNumber(String value) {
this.vatNumber = value;
}
/**
* Gets the value of the paymentPeriod property.
*
* @return
* possible object is
* {@link Duration }
*
*/
public Duration getPaymentPeriod() {
return paymentPeriod;
}
... | 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\BalanceType.java | 1 |
请完成以下Java代码 | public String getDelegateExpression() {
return delegateExpression;
}
public void setDelegateExpression(String delegateExpression) {
this.delegateExpression = delegateExpression;
}
}
@JsonInclude(Include.NON_NULL)
public static class RecordKey {
prot... | }
public void setEventField(String eventField) {
this.eventField = eventField;
}
public String getDelegateExpression() {
return delegateExpression;
}
public void setDelegateExpression(String delegateExpression) {
this.delegateExpression = de... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\KafkaOutboundChannelModel.java | 1 |
请完成以下Java代码 | public void addExecutionListener(ExecutionListener executionListener) {
super.addListener(ExecutionListener.EVENTNAME_TAKE, executionListener);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Deprecated
public List<ExecutionListener> getExecutionListeners() {
return (List) super.getListeners(Executio... | }
protected void setSource(ActivityImpl source) {
this.source = source;
}
public PvmActivity getDestination() {
return destination;
}
public List<Integer> getWaypoints() {
return waypoints;
}
public void setWaypoints(List<Integer> waypoints) {
this.waypoints = waypoints;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\TransitionImpl.java | 1 |
请完成以下Java代码 | public java.sql.Timestamp getDateTrx ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_DateTrx);
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Beschreibung.... | return "Y".equals(oo);
}
return false;
}
/** Set Verarbeiten.
@param Processing Verarbeiten */
@Override
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Verarbeiten.
@return Verarbeiten */
@Override
public boolean isProc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclaration.java | 1 |
请完成以下Java代码 | public boolean isEmpty() {return allLines.isEmpty();}
public void forEachRemove(@NonNull final Consumer<FactAcctChanges> consumer)
{
linesToRemoveByKey.values().forEach(consumer);
}
public FactAcctChangesList removingIf(@NonNull final Predicate<FactAcctChanges> predicate)
{
if (allLines.isEmpty())
{
ret... | final boolean remove = predicate.test(line);
if (!remove)
{
allLinesAfterRemove.add(line);
}
}
if (allLines.size() == allLinesAfterRemove.size())
{
return this; // no changes
}
return ofList(allLinesAfterRemove);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\factacct_userchanges\FactAcctChangesList.java | 1 |
请完成以下Java代码 | public String getName()
{
return name;
}
public boolean isCU()
{
return this == VHU || this == HUStorage;
}
public static HUEditorRowType ofHU_UnitType(final String huUnitType)
{
final HUEditorRowType type = huUnitType2type.get(huUnitType);
if (type == null)
{
throw new IllegalArgumentException("C... | public HuUnitType toHUUnitTypeOrNull()
{
if (this == HUStorage)
{
return HuUnitType.VHU;
}
return HuUnitType.ofNullableCode(huUnitType2type.inverse().get(this));
}
private static final BiMap<String, HUEditorRowType> huUnitType2type = ImmutableBiMap.<String, HUEditorRowType>builder()
.put(X_M_HU_PI_Ver... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowType.java | 1 |
请完成以下Java代码 | protected EventLoggerEventHandler instantiateEventHandler(FlowableEvent event,
Class<? extends EventLoggerEventHandler> eventHandlerClass) {
try {
EventLoggerEventHandler eventHandler = eventHandlerClass.newInstance();
eventHa... | }
public void setClock(Clock clock) {
this.clock = clock;
}
public ObjectMapper getObjectMapper() {
return objectMapper;
}
public void setObjectMapper(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
public List<EventLoggerListener> getListeners() ... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\event\logger\EventLogger.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ArticleApi {
private ArticleQueryService articleQueryService;
private ArticleRepository articleRepository;
private ArticleCommandService articleCommandService;
@GetMapping
public ResponseEntity<?> article(
@PathVariable("slug") String slug, @AuthenticationPrincipal User user) {
return ... | @DeleteMapping
public ResponseEntity deleteArticle(
@PathVariable("slug") String slug, @AuthenticationPrincipal User user) {
return articleRepository
.findBySlug(slug)
.map(
article -> {
if (!AuthorizationService.canWriteArticle(user, article)) {
thr... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\api\ArticleApi.java | 2 |
请完成以下Java代码 | public String toString()
{
return getClass().getSimpleName() + "["
+ "dbType=" + _dbType
+ ", jdbcDriverClassname=" + _jdbcDriverClassname
+ ", initialized=" + initialized
+ "]";
}
protected final boolean isInitialized()
{
return initialized;
}
protected final String getDbType()
{
return... | catch (final ClassNotFoundException e)
{
throw new RuntimeException("Cannot initialize postgresql database driver", e);
}
initialized = true;
}
@Override
public final Connection getConnection(final String hostname, final String port, final String dbName, final String user, final String password) throws SQ... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\sql\GenericSQLDatabaseDriver.java | 1 |
请完成以下Java代码 | public void onApplicationEvent(ApplicationEvent event) {
// log.info("APPLICATION EVENT: {}", event.getClass().getName());
if (this.shouldTriggerRefresh(event)) {
log.info("Refreshing cached encryptable property sources on {}", event.getClass().getSimpleName());
refreshCachedPrope... | private void refreshPropertySource(PropertySource<?> propertySource) {
if (propertySource instanceof CompositePropertySource) {
CompositePropertySource cps = (CompositePropertySource) propertySource;
cps.getPropertySources().forEach(this::refreshPropertySource);
} else if (proper... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\RefreshScopeRefreshedEventListener.java | 1 |
请完成以下Java代码 | public void onImport(IImportProcess<?> process, Object importModel, Object targetModel, int timing)
{
if (timing != IImportInterceptor.TIMING_AFTER_IMPORT)
{
return;
}
final I_I_BPartner ibpartner = InterfaceWrapperHelper.create(importModel, I_I_BPartner.class);
if (targetModel instanceof org.compiere.m... | .build();
}
config = configRepo.save(config);
importRecord.setMSV3_Vendor_Config_ID(config.getConfigId().getRepoId());
}
}
private URL toURL(@NonNull final I_I_BPartner importRecord)
{
try
{
return new URL(importRecord.getMSV3_BaseUrl());
}
catch (MalformedURLException e)
{
throw new Ad... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\interceptor\MSV3PharmaImportPartnerInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class SecurityConfiguration {
/**
* This section defines the user accounts which can be used for authentication as well as the roles each user has.
*/
@Bean
InMemoryUserDetailsManager userDetailsManager() {
var builder = User.builder().passwordEncoder(PasswordEncoderFactories.createDelegatingPa... | *
* @param http
* @throws Exception
*/
@Bean
protected SecurityFilterChain configure(HttpSecurity http) throws Exception {
return http.authorizeHttpRequests((authorize) -> {
authorize //
.requestMatchers(HttpMethod.POST, "/employees").hasRole("ADMIN") //
.requestMatchers(HttpMethod.PUT... | repos\spring-data-examples-main\rest\security\src\main\java\example\springdata\rest\security\Application.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Boolean getPrettyPrinting() {
return this.prettyPrinting;
}
public void setPrettyPrinting(@Nullable Boolean prettyPrinting) {
this.prettyPrinting = prettyPrinting;
}
public @Nullable Strictness getStrictness() {
return this.strictness;
}
public void setStrictness(@Nullable Strictness str... | public void setDateFormat(@Nullable String dateFormat) {
this.dateFormat = dateFormat;
}
/**
* Enumeration of levels of strictness. Values are the same as those on
* {@link com.google.gson.Strictness} that was introduced in Gson 2.11. To maximize
* backwards compatibility, the Gson enum is not used directly.... | repos\spring-boot-4.0.1\module\spring-boot-gson\src\main\java\org\springframework\boot\gson\autoconfigure\GsonProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | void setRestTemplateCustomizers(@Nullable List<RestTemplateCustomizer> restTemplateCustomizers) {
this.restTemplateCustomizers = restTemplateCustomizers;
}
void setRestTemplateRequestCustomizers(
@Nullable List<RestTemplateRequestCustomizer<?>> restTemplateRequestCustomizers) {
this.restTemplateRequestCustomi... | }
builder = addCustomizers(builder, this.restTemplateCustomizers, RestTemplateBuilder::customizers);
builder = addCustomizers(builder, this.restTemplateRequestCustomizers, RestTemplateBuilder::requestCustomizers);
return builder;
}
private <T> RestTemplateBuilder addCustomizers(RestTemplateBuilder builder, @Nu... | repos\spring-boot-4.0.1\module\spring-boot-restclient\src\main\java\org\springframework\boot\restclient\autoconfigure\RestTemplateBuilderConfigurer.java | 2 |
请完成以下Java代码 | public class SecurityIdentification14 {
@XmlElement(name = "ISIN")
protected String isin;
@XmlElement(name = "OthrId")
protected List<OtherIdentification1> othrId;
@XmlElement(name = "Desc")
protected String desc;
/**
* Gets the value of the isin property.
*
* @return
... | * <pre>
* getOthrId().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link OtherIdentification1 }
*
*
*/
public List<OtherIdentification1> getOthrId() {
if (othrId == null) {
othrId = new Arr... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\SecurityIdentification14.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Correlation getCorrelation() {
return this.correlation;
}
public void setCorrelation(Correlation correlation) {
this.correlation = correlation;
}
public List<String> getRemoteFields() {
return this.remoteFields;
}
public List<String> getLocalFields() {
return this.localFields;
}
p... | * Tracing context propagation types consumed by the application.
*/
private List<PropagationType> consume = List.of(PropagationType.values());
public void setType(@Nullable List<PropagationType> type) {
this.type = type;
}
public void setProduce(List<PropagationType> produce) {
this.produce = produce... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\TracingProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
em.setPackagesToScan(new String[] { "com.baeldung.persistence.model", "com.baeldung.springpaginat... | }
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
return new PersistenceExceptionTranslationPostProcessor();
}
final Properties additionalProperties() {
final Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("... | repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\spring\PersistenceConfig.java | 2 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.add("size", byTableId.size())
.toString();
}
@Nullable
public POInfo getByTableIdOrNull(@NonNull final AdTableId tableId)
{
return byTableId.get(tableId);
}
@NonNull
public POInfo getByTableId(@NonNull final AdTableId ... | public POInfo getByTableNameOrNull(@NonNull final String tableName)
{
return byTableNameUC.get(tableName.toUpperCase());
}
@NonNull
public POInfo getByTableName(@NonNull final String tableName)
{
final POInfo poInfo = getByTableNameOrNull(tableName);
if (poInfo == null)
{
throw new AdempiereE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\POInfo.java | 1 |
请完成以下Java代码 | public class HumanTaskXmlConverter extends TaskXmlConverter {
@Override
public String getXMLElementName() {
return CmmnXmlConstants.ELEMENT_HUMAN_TASK;
}
@Override
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {
HumanTask task = new Human... | task.setCategory(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_CATEGORY));
task.setTaskIdVariableName(xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_TASK_ID_VARIABLE_NAME));
task.setTaskCompleterVariable... | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\HumanTaskXmlConverter.java | 1 |
请完成以下Java代码 | public WindowId getWindowId()
{
return windowId;
}
@JsonIgnore
public DocumentId getId()
{
return id;
}
@JsonIgnore
public String getTabId()
{
return tabId;
}
@JsonIgnore
public DocumentId getRowId()
{
return rowId;
}
public final void setDeleted()
{
deleted = Boolean.TRUE;
}
@JsonAnyGe... | public final void setFields(final Collection<JSONDocumentField> fields)
{
setFields(fields == null ? null : Maps.uniqueIndex(fields, JSONDocumentField::getField));
}
@JsonIgnore
protected final void setFields(final Map<String, JSONDocumentField> fieldsByName)
{
this.fieldsByName = fieldsByName;
if (unboxPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentBase.java | 1 |
请完成以下Java代码 | public void onBeforeClose(@NonNull final I_PP_Order order)
{
final PPOrderId ppOrderId = PPOrderId.ofRepoId(order.getPP_Order_ID());
if (huPPOrderQtyDAO.hasUnprocessedOrderQty(ppOrderId))
{
throw new AdempiereException(ERROR_MSG_MANUFACTURING_WITH_UNPROCESSED_CANDIDATES);
}
ppOrderIssueScheduleRepository... | }
if (candidates.size() > 1)
{
throw new AdempiereException("More than one candidate found for maturing !");
}
// dev-note: use WorkPackage, otherwise PP_Cost_Collector is posted before PP_Order and therefore posting is failing
HUMaturingWorkpackageProcessor.prepareWorkpackage()
.ppOrder(order)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\interceptor\PP_Order.java | 1 |
请完成以下Java代码 | public Set<String> getIds() {
return ids;
}
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public Set<String> getProcessInstanceIds() {
return processInstanceIds;
}
public String getExecutionId... | return executable;
}
public Date getNow() {
return ClockUtil.getCurrentTime();
}
public boolean isWithException() {
return withException;
}
public String getExceptionMessage() {
return exceptionMessage;
}
public boolean getAcquired() {
return acquired;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java | 1 |
请完成以下Java代码 | public class Node<T> implements LinkedListNode<T> {
private T value;
private DoublyLinkedList<T> list;
private LinkedListNode next;
private LinkedListNode prev;
public Node(T value, LinkedListNode<T> next, DoublyLinkedList<T> list) {
this.value = value;
this.next = next;
thi... | }
@Override
public LinkedListNode<T> setPrev(LinkedListNode<T> prev) {
this.prev = prev;
return this;
}
@Override
public LinkedListNode<T> setNext(LinkedListNode<T> next) {
this.next = next;
return this;
}
@Override
public LinkedListNode<T> getPrev() {
... | repos\tutorials-master\data-structures\src\main\java\com\baeldung\lrucache\Node.java | 1 |
请完成以下Java代码 | public class SysGatewayRoute implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private String id;
/**routerKEy*/
@Schema(description = "路由ID")
private String routerId;
/**服务名*/
@Exce... | /**是否在接口文档中展示:0-否 1-是*/
@Excel(name = "在接口文档中展示", width = 15)
@Schema(description = "在接口文档中展示")
@Dict(dicCode = "yn")
private Integer showApi;
/**状态 1有效 0无效*/
@Excel(name = "状态", width = 15)
@Schema(description = "状态")
@Dict(dicCode = "yn")
private Integer status;
/**创建人*/
... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysGatewayRoute.java | 1 |
请完成以下Java代码 | private BufferedImage loadProductLogoImage()
{
final Image logo = Adempiere.getProductLogoLarge();
if (logo == null)
{
return null;
}
return toBufferedImage(logo);
}
/**
* Converts a given Image into a BufferedImage
*
* @param image The Image to be converted
* @return The converted BufferedIma... | final AffineTransform at = new AffineTransform();
at.scale(scale, scale);
final AffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);
imageScaled = scaleOp.filter(image, imageScaled);
}
else
{
imageScaled = image;
}
final ByteArrayOutputStream pngBuf = new ByteAr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\adempiere\serverRoot\servlet\ImagesServlet.java | 1 |
请完成以下Java代码 | public String getStringValue() {
return stringValue;
}
public void setStringValue(final String stringValue) {
this.stringValue = stringValue;
}
public int getIntValue() {
return intValue;
}
public void setIntValue(final int intValue) {
this.intValue = intValue;... | public boolean isBooleanValue() {
return booleanValue;
}
public void setBooleanValue(final boolean booleanValue) {
this.booleanValue = booleanValue;
}
//
@Override
public String toString() {
return "MyDto [stringValue=" + stringValue + ", intValue=" + intValue + ", boo... | repos\tutorials-master\jackson-modules\jackson-annotations-2\src\main\java\com\baeldung\jackson\jsonproperty\MyDto.java | 1 |
请完成以下Java代码 | public void setA_RegistrationAttribute_ID (int A_RegistrationAttribute_ID)
{
if (A_RegistrationAttribute_ID < 1)
set_ValueNoCheck (COLUMNNAME_A_RegistrationAttribute_ID, null);
else
set_ValueNoCheck (COLUMNNAME_A_RegistrationAttribute_ID, Integer.valueOf(A_RegistrationAttribute_ID));
}
/** Get Registrat... | /** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_RegistrationAttribute.java | 1 |
请完成以下Java代码 | public class ModelImpl extends Model
{
private int nbest_;
private int vlevel_;
private DecoderFeatureIndex featureIndex_;
public ModelImpl()
{
nbest_ = vlevel_ = 0;
featureIndex_ = null;
}
public Tagger createTagger()
{
if (featureIndex_ == null)
{
... | return featureIndex_.getTemplate();
}
else
{
return null;
}
}
public int getNbest_()
{
return nbest_;
}
public void setNbest_(int nbest_)
{
this.nbest_ = nbest_;
}
public int getVlevel_()
{
return vlevel_;
}
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\ModelImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ExternalIdentifier getExternalIdentifier(@Nullable final String metasfreshIdJsonPath, @Nullable final String shopwareIdJsonPath)
{
final String id = getCustomField(metasfreshIdJsonPath);
if (Check.isNotBlank(id))
{
return ExternalIdentifier.builder()
.identifier(id)
.rawValue(id)
.build... | .rawValue(customerId)
.build();
}
@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);
}
... | 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 |
请完成以下Java代码 | public boolean isServerProcess ()
{
Object oo = get_Value(COLUMNNAME_IsServerProcess);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
publ... | }
/** Set OS Command.
@param OS_Command
Operating System Command
*/
public void setOS_Command (String OS_Command)
{
set_Value (COLUMNNAME_OS_Command, OS_Command);
}
/** Get OS Command.
@return Operating System Command
*/
public String getOS_Command ()
{
return (String)get_Value(COLUMNNAME_OS_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Task.java | 1 |
请完成以下Java代码 | public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaInputOutput.class, CAMUNDA_ELEMENT_INPUT_OUTPUT)
.namespaceUri(CAMUNDA_NS)
.instanceProvider(new ModelTypeInstanceProvider<CamundaInputOutput>() {
public CamundaInput... | typeBuilder.build();
}
public CamundaInputOutputImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public Collection<CamundaInputParameter> getCamundaInputParameters() {
return camundaInputParameterCollection.get(this);
}
public Collection<CamundaOutputParameter> getCamund... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaInputOutputImpl.java | 1 |
请完成以下Java代码 | public class CustomClassloader extends ClassLoader {
public static final String PREFIX = "com.baeldung.classloader";
public CustomClassloader(ClassLoader parent) {
super(parent);
}
@Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
if (name.startsWith... | }
private Class<?> getClass(String name) {
String fileName = name.replace('.', File.separatorChar) + ".class";
try {
byte[] byteArr = IOUtils.toByteArray(getClass().getClassLoader().getResourceAsStream(fileName));
Class<?> c = defineClass(name, byteArr, 0, byteArr.length);
... | repos\tutorials-master\core-java-modules\core-java-jvm-3\src\main\java\com\baeldung\staticgc\CustomClassloader.java | 1 |
请完成以下Java代码 | public static String max(Map<String, Double> scoreMap)
{
double max = Double.NEGATIVE_INFINITY;
String best = null;
for (Map.Entry<String, Double> entry : scoreMap.entrySet())
{
Double score = entry.getValue();
if (score > max)
{
ma... | System.arraycopy(src, 0, output[0], 0, output[0].length);
System.arraycopy(src, output[0].length, output[1], 0, output[1].length);
return output;
}
/**
* 分割Map,其中旧map直接被改变
* @param src
* @param rate
* @return
*/
public static Map<String, String[]> splitMap(Map<Strin... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\utilities\CollectionUtility.java | 1 |
请完成以下Java代码 | public class FieldExtensionParser extends BaseChildElementParser {
public String getElementName() {
return ELEMENT_FIELD;
}
public boolean accepts(BaseElement element) {
return (
(element instanceof ActivitiListener) ||
(element instanceof ServiceTask) ||
... | extension.setStringValue(xtr.getElementText().trim());
} else if (
xtr.isStartElement() && ATTRIBUTE_FIELD_EXPRESSION.equalsIgnoreCase(xtr.getLocalName())
) {
extension.setExpression(xtr.getElementText().trim());
... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\child\FieldExtensionParser.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String prefix() {
return "management.influx.metrics.export";
}
@Override
public String db() {
return obtain(InfluxProperties::getDb, InfluxConfig.super::db);
}
@Override
public InfluxConsistency consistency() {
return obtain(InfluxProperties::getConsistency, InfluxConfig.super::consistency);
}
@... | return obtain(InfluxProperties::getUri, InfluxConfig.super::uri);
}
@Override
public boolean compressed() {
return obtain(InfluxProperties::isCompressed, InfluxConfig.super::compressed);
}
@Override
public boolean autoCreateDb() {
return obtain(InfluxProperties::isAutoCreateDb, InfluxConfig.super::autoCreat... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public boolean hasNext() {
return false;
}
@Override
public E next() {
return null;
}
}
@Override
public Object[] toArray() {
return new Object[0];
}
@Override
public <T> T[] toArray(T[] a) {
return null;
}
@Over... | }
@Override
public E get(int index) {
return null;
}
@Override
public E set(int index, E element) {
return null;
}
@Override
public void add(int index, E element) {
}
@Override
public E remove(int index) {
return null;
}
@Override
pub... | repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\customiterators\MyList.java | 1 |
请完成以下Java代码 | public class MHRPayrollConcept extends X_HR_PayrollConcept
{
/**
*
*/
private static final long serialVersionUID = -4335196239535511224L;
/**
* Standard Constructor
* @param ctx context
* @param HR_Concept_ID id
*/
public MHRPayrollConcept (Properties ctx, int HR_Concept_ID, String trxName)
{
supe... | //setIsIncluded(true);
setIsActive(true);
}
/**
* Get Concept's of Payroll Type
* @param p HR process
* @return array of HR concepts
*/
public static MHRPayrollConcept[] getPayrollConcepts (MHRProcess p)
{
List<MHRPayrollConcept> list = new Query(p.getCtx(), Table_Name, COLUMNNAME_HR_Payroll_ID+"=?... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRPayrollConcept.java | 1 |
请完成以下Java代码 | public void updateQtyTU(final I_M_InOutLine inOutLine, final ICalloutField field)
{
final IHUInOutBL huInOutBL = Services.get(IHUInOutBL.class);
final I_M_InOut inOut = inOutLine.getM_InOut();
// Applied only to customer return inout lines.
if (!huInOutBL.isCustomerReturn(inOut))
{
return;
}
final ... | * @param inOutLine
* @param field
*/
@CalloutMethod(columnNames = { I_M_InOutLine.COLUMNNAME_QtyEnteredTU, I_M_InOutLine.COLUMNNAME_M_HU_PI_Item_Product_ID })
public void updateQtyCU(final I_M_InOutLine inOutLine, final ICalloutField field)
{
final IHUInOutBL huInOutBL = Services.get(IHUInOutBL.class);
fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\callout\M_InOutLine.java | 1 |
请完成以下Java代码 | private void subtractQtyInvoiceable(
@NonNull final InvoiceCandidateId invoiceCandidateId,
@NonNull final StockQtyAndUOMQty qtyInvoiced)
{
final StockQtyAndUOMQty qtyInvoiceable = _ic2QtyInvoiceable.get(invoiceCandidateId);
final StockQtyAndUOMQty qtyInvoiceableNew = StockQtyAndUOMQtys.subtract(qtyInvoiceabl... | {
// We can consider manual invoices as amount based invoices
if (cand.isManual())
{
return true;
}
// We can consider those candidates which have a SplitAmt set to be amount based invoices
final BigDecimal splitAmt = cand.getSplitAmt();
if (splitAmt.signum() != 0)
{
return true;
}
// More i... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\impl\aggregator\standard\InvoiceCandidateWithInOutLineAggregator.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Project.
@param ProjectName
Name of the Proj... | /** Set Roll the Script.
@param ScriptRoll Roll the Script */
public void setScriptRoll (String ScriptRoll)
{
set_Value (COLUMNNAME_ScriptRoll, ScriptRoll);
}
/** Get Roll the Script.
@return Roll the Script */
public String getScriptRoll ()
{
return (String)get_Value(COLUMNNAME_ScriptRoll);
}
/*... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\ad\migration\model\X_AD_MigrationScript.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class OrderStatusWebServiceImpl
{
private static final Logger logger = LoggerFactory.getLogger(OrderStatusWebServiceImpl.class);
private final MSV3ServerAuthenticationService authService;
private final OrderStatusServerJAXBConverters jaxbConverters;
private final OrderService orderService;
@Builder
private Orde... | authService.assertValidClientSoftwareId(jaxbConverters.getClientSoftwareIdFromClientRequest(soapRequest));
final BPartnerId bpartner = authService.getCurrentBPartner();
final Id orderId = jaxbConverters.getOrderIdFromClientRequest(soapRequest);
final OrderStatusResponse response = orderService.getOrderStatus(ord... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\order\OrderStatusWebServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UserModuleController {
static Map<Integer, User> usersMap = Collections.synchronizedMap(new HashMap<Integer, User>());
// 初始化 usersMap
static {
User user = new User();
user.setId(1);
user.setName("lanqiao1");
user.setPassword("111111");
User user2 = new... | return "新增成功";
}
@Operation(summary = "获取用户详细信息", description = "根据id来获取用户详细信息")
@GetMapping("/users/{id}")
public User getUser(@PathVariable Integer id) {
return usersMap.get(id);
}
@Operation(summary = "更新用户详细信息", description = "")
@PutMapping("/users/{id}")
public String put... | repos\spring-boot-projects-main\玩转SpringBoot系列案例源码\spring-boot-swagger\src\main\java\cn\lanqiao\springboot3\controller\UserModuleController.java | 2 |
请完成以下Java代码 | public void onDeviceUpdate(TransportProtos.SessionInfoProto sessionInfo, DeviceId gatewayId) {
var state = states.get(gatewayId);
if (state != null) {
state.updateSessionInfo(sessionInfo);
}
}
public void onDeviceDelete(DeviceId deviceId) {
states.remove(deviceId);
... | return;
}
var result = state.getStateResult();
var kvProto = TransportProtos.KeyValueProto.newBuilder()
.setKey(GATEWAY_METRICS)
.setType(TransportProtos.KeyValueType.JSON_V)
.setJsonV(JacksonUtil.toString(result))
.build();
... | repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\gateway\GatewayMetricsService.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.