instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class HibernateLifecycleUtil {
private static SessionFactory sessionFactory;
private static Connection connection;
public static void init() throws Exception {
Properties hbConfigProp = getHibernateProperties();
Class.forName(hbConfigProp.getProperty("hibernate.connection.driver_clas... | Properties properties = getHibernateProperties();
return new StandardServiceRegistryBuilder().applySettings(properties).build();
}
private static Properties getHibernateProperties() throws IOException {
Properties properties = new Properties();
URL propertiesURL = Thread.currentThread()... | repos\tutorials-master\persistence-modules\hibernate5\src\main\java\com\baeldung\hibernate\lifecycle\HibernateLifecycleUtil.java | 1 |
请完成以下Java代码 | public Object getParameterToComponent(final int index)
{
return null;
}
@Override
public Object getParameterValue(final int index, final boolean returnValueTo)
{
return null;
}
@Override
public String[] getWhereClauses(final List<Object> params)
{
if (!checkbox.isEnabled() || !checkbox.isSelected())
... | @Override
public String getText()
{
return null;
}
@Override
public void prepareEditor(final CEditor editor, final Object value, final int rowIndexModel, final int columnIndexModel)
{
// nothing
}
@Override
public String getProductCombinations()
{
// nothing to do
return null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\InfoProductQtyController.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override
public int getAD_User_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
@Override
public void setPP_... | @Override
public org.compiere.model.I_S_Resource getWorkStation()
{
return get_ValueAsPO(COLUMNNAME_WorkStation_ID, org.compiere.model.I_S_Resource.class);
}
@Override
public void setWorkStation(final org.compiere.model.I_S_Resource WorkStation)
{
set_ValueFromPO(COLUMNNAME_WorkStation_ID, org.compiere.model... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_Workstation_UserAssign.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class LdapClient {
@Autowired
private Environment env;
@Autowired
private ContextSource contextSource;
@Autowired
private LdapTemplate ldapTemplate;
public void authenticate(final String username, final String password) {
contextSource.getContext("cn=" + username + ",ou=us... | context.setAttributeValues("objectclass", new String[] { "top", "person", "organizationalPerson", "inetOrgPerson" });
context.setAttributeValue("cn", username);
context.setAttributeValue("sn", username);
context.setAttributeValue("userPassword", digestSHA(password));
ldapTemplate.modify... | repos\tutorials-master\spring-security-modules\spring-security-ldap\src\main\java\com\baeldung\ldap\client\LdapClient.java | 2 |
请完成以下Java代码 | public QueueBuilder quorum() {
return withArgument("x-queue-type", "quorum");
}
/**
* Set the queue argument to declare a queue of type 'stream' instead of 'classic'.
* @return the builder.
* @since 2.4
*/
public QueueBuilder stream() {
return withArgument("x-queue-type", "stream");
}
/**
* Set the... | /**
* Deploy on the node with the fewest queue leaders.
*/
minLeaders("min-masters"),
/**
* Deploy on the node we are connected to.
*/
clientLocal("client-local"),
/**
* Deploy on a random node.
*/
random("random");
private final String value;
LeaderLocator(String value) {
this.va... | repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\QueueBuilder.java | 1 |
请完成以下Java代码 | public class Document {
@XmlElement(name = "CstmrDrctDbtInitn", required = true)
protected CustomerDirectDebitInitiationV02 cstmrDrctDbtInitn;
/**
* Gets the value of the cstmrDrctDbtInitn property.
*
* @return
* possible object is
* {@link CustomerDirectDebitInitiationV0... | }
/**
* Sets the value of the cstmrDrctDbtInitn property.
*
* @param value
* allowed object is
* {@link CustomerDirectDebitInitiationV02 }
*
*/
public void setCstmrDrctDbtInitn(CustomerDirectDebitInitiationV02 value) {
this.cstmrDrctDbtInitn = value;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\Document.java | 1 |
请完成以下Java代码 | public int getC_Invoice_Candidate_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Invoice_Candidate_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public de.metas.invoicecandidate.model.I_C_Invoice_Candidate getC_Invoice_Cand_ToClear() throws RuntimeException
{
return get_Value... | if (ii == null)
return 0;
return ii.intValue();
}
/** Set Rechnungskanditad - Verrechnung.
@param C_Invoice_Clearing_Alloc_ID Rechnungskanditad - Verrechnung */
@Override
public void setC_Invoice_Clearing_Alloc_ID (int C_Invoice_Clearing_Alloc_ID)
{
if (C_Invoice_Clearing_Alloc_ID < 1)
set_ValueNo... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Invoice_Clearing_Alloc.java | 1 |
请完成以下Java代码 | public static void main(String[] arguments) {
String emptyString = "";
String string = "Estimating Object Size Using Instrumentation";
String[] stringArray = { emptyString, string, "com.baeldung" };
String[] anotherStringArray = new String[100];
List<String> stringList = new Arra... | printObjectSize(maxIntPrimitive);
printObjectSize(minIntPrimitive);
printObjectSize(maxInteger);
printObjectSize(minInteger);
printObjectSize(zeroLong);
printObjectSize(zeroDouble);
printObjectSize(falseBoolean);
printObjectSize(Day.TUESDAY);
printObjectSi... | repos\tutorials-master\core-java-modules\core-java-jvm\src\main\java\com\baeldung\objectsize\InstrumentationExample.java | 1 |
请完成以下Java代码 | public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID < 1)
set_Value (COLUMNNAME_AD_Table_ID, null);
else
set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID));
}
/** Get DB-Tabelle.
@return Database Table information
*/
@Override
public int getAD_Table_ID ()
{
Integer ii ... | @Override
public void setAD_Val_Rule_ID (int AD_Val_Rule_ID)
{
if (AD_Val_Rule_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Val_Rule_ID, Integer.valueOf(AD_Val_Rule_ID));
}
/** Get Dynamische Validierung.
@return Regel für die dynamische Validierun... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Dep.java | 1 |
请完成以下Java代码 | public static ObjectNode mapLinks(List<Link> links) {
ObjectNode result = nodeFactory.objectNode();
Map<String, List<Link>> byRel = new LinkedHashMap<>();
links.forEach((it) -> byRel.computeIfAbsent(it.getRel(), (k) -> new ArrayList<>()).add(it));
byRel.forEach((rel, l) -> {
if (l.size() == 1) {
ObjectNo... | result.set(rel, root);
}
});
return result;
}
private static void mapLink(Link link, ObjectNode node) {
node.put("href", link.getHref());
if (link.isTemplated()) {
node.put("templated", true);
}
if (link.getDescription() != null) {
node.put("title", link.getDescription());
}
}
} | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\LinkMapper.java | 1 |
请完成以下Java代码 | public void applyPropertiesFrom(ClientProperties clientConfigurationProps) {
ClientConfiguration clientConfiguration = new ClientConfiguration();
if (clientConfigurationProps.getBaseUrl() != null) {
clientConfiguration.setBaseUrl(clientConfigurationProps.getBaseUrl());
}
if (clientConfigurationPro... | }
if (clientConfigurationProps.getAsyncResponseTimeout() != null) {
clientConfiguration.setAsyncResponseTimeout(clientConfigurationProps.getAsyncResponseTimeout());
}
if (clientConfigurationProps.getDisableAutoFetching() != null &&
clientConfigurationProps.getDisableAutoFetching()) {
cli... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring-boot\src\main\java\org\camunda\bpm\client\spring\boot\starter\impl\PropertiesAwareClientFactory.java | 1 |
请完成以下Java代码 | public GroupCompensationLine getCompensationLineById(@NonNull final RepoIdAware id)
{
return compensationLines.stream()
.filter(line -> Objects.equals(line.getRepoId(), id))
.collect(GuavaCollectors.singleElementOrThrow(() -> new AdempiereException("None or more then one compensation lines found for id=" + i... | .productId(request.getProductId())
.uomId(request.getUomId())
.type(request.getType())
.amtType(request.getAmtType())
.percentage(request.getPercentage())
.price(price)
.qtyEntered(qtyEntered)
.lineNetAmt(lineNetAmt)
.groupTemplateLineId(request.getGroupTemplateLineId())
.build();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\Group.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result update(@RequestParam("newsId") Long newsId,
@RequestParam("newsTitle") String newsTitle,
@RequestParam("newsCategoryId") Long newsCategoryId,
@RequestParam("newsContent") String newsContent,
@RequestParam("... | if ("success".equals(updateResult)) {
return ResultGenerator.genSuccessResult("修改成功");
} else {
return ResultGenerator.genFailResult(updateResult);
}
}
@PostMapping("/news/delete")
@ResponseBody
public Result delete(@RequestBody Integer[] ids) {
if (ids.l... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\NewsController.java | 2 |
请完成以下Java代码 | public IDataSet shrink(int[] idMap)
{
try
{
clear();
Iterator<Document> iterator = iterator();
initCache();
while (iterator.hasNext())
{
Document document = iterator.next();
FrequencyMap<Integer> tfMap = new ... | boolean next = in.available() > 0;
if (!next) in.close();
return next;
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
@Ov... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\FileDataSet.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setDebug(Boolean debug) {
this.debug = debug;
}
@Override
public void afterPropertiesSet() throws Exception {
Assert.hasText(this.servicePrincipal, "servicePrincipal must be specified");
if (this.keyTabLocation != null && this.keyTabLocation instanceof ClassPathResource) {
LOG.warn(
"Your... | public AppConfigurationEntry[] getAppConfigurationEntry(String name) {
HashMap<String, String> options = new HashMap<>();
options.put("principal", this.servicePrincipal);
if (this.keyTabLocation != null) {
options.put("useKeyTab", "true");
options.put("keyTab", this.keyTabLocationAsString);
options.put... | repos\spring-security-main\kerberos\kerberos-client\src\main\java\org\springframework\security\kerberos\client\config\SunJaasKrb5LoginConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ExecutionActionRequest extends RestActionRequest {
public static final String ACTION_SIGNAL = "signal";
public static final String ACTION_TRIGGER = "trigger";
public static final String ACTION_SIGNAL_EVENT_RECEIVED = "signalEventReceived";
public static final String ACTION_MESSAGE_EVENT_RE... | @ApiModelProperty(value = "Name of the signal", example = "My Signal")
public String getSignalName() {
return signalName;
}
public void setSignalName(String signalName) {
this.signalName = signalName;
}
@ApiModelProperty(value = "Message of the signal", example = "My Signal")
p... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionActionRequest.java | 2 |
请完成以下Java代码 | private static DocumentFieldWidgetType extractWidgetType(final DocumentLayoutElementFieldDescriptor.LookupSource lookupSource)
{
Check.assumeNotNull(lookupSource, "Parameter lookupSource is not null");
switch (lookupSource)
{
case list:
return DocumentFieldWidgetType.List;
case lookup:
return Docum... | return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (DisplayType.Table == displayType)
{
return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (DisplayType.isAnyLookup(displayType))
{
return DocumentLayoutElementFieldDescriptor.LookupSource.lookup;
}
else if... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\DescriptorsFactoryHelper.java | 1 |
请完成以下Java代码 | public class BPartnerGlobalIDImportProcess extends SimpleImportProcessTemplate<I_I_BPartner_GlobalID>
{
@Override
public Class<I_I_BPartner_GlobalID> getImportModelClass()
{
return I_I_BPartner_GlobalID.class;
}
@Override
public String getImportTableName()
{
return I_I_BPartner_GlobalID.Table_Name;
}
@O... | }
/*
* @param isInsertOnly ignored. This import is only for updates.
*/
@Override
protected ImportRecordResult importRecord(@NonNull IMutable<Object> state,
@NonNull I_I_BPartner_GlobalID importRecord,
final boolean isInsertOnly)
{
final IBPartnerDAO partnerDAO = Services.get(IBPartnerDAO.class);
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\globalid\impexp\BPartnerGlobalIDImportProcess.java | 1 |
请完成以下Java代码 | public String toSql()
{
String sqlWithInlinedParams = this._sqlWithInlinedParams;
if (sqlWithInlinedParams == null)
{
sqlWithInlinedParams = this._sqlWithInlinedParams = buildFinalSql();
}
return sqlWithInlinedParams;
}
private String buildFinalSql()
{
final StringBuilder finalSql = new StringBuilde... | return finalSql.toString();
}
private static String toSqlCommentLine(@Nullable final String comment)
{
final String commentNorm = StringUtils.trimBlankToNull(comment);
if (commentNorm == null)
{
return null;
}
return "-- "
+ commentNorm
.replace("\r\n", "\n")
.replace("\n", "\n-- ")
+ "... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\Sql.java | 1 |
请完成以下Java代码 | public Object getMessage() {
return message;
}
public void setMessage(Object message) {
this.message = message;
}
public int getRetryCount() {
return retryCount;
}
public void setRetryCount(int retryCount) {
this.retryCount = retryCount;
} | public String getExchange() {
return exchange;
}
public void setExchange(String exchange) {
this.exchange = exchange;
}
public String getRoutingKey() {
return routingKey;
}
public void setRoutingKey(String routingKey) {
this.routingKey = routingKey;
}
} | repos\spring-boot-student-master\spring-boot-student-rabbitmq\src\main\java\com\xiaolyuh\mq\CorrelationData.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ConfigBean {
private String name;
private int age;
private int number;
private String uuid;
private int max;
private String value;
private String greeting;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name... | }
public void setUuid(String uuid) {
this.uuid = uuid;
}
public int getMax() {
return max;
}
public void setMax(int max) {
this.max = max;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value... | repos\SpringBootLearning-master\springboot-config\src\main\java\com\forezp\bean\ConfigBean.java | 2 |
请完成以下Java代码 | public <T> T executeCommand(Command<T> command) {
if (command == null) {
throw new ActivitiIllegalArgumentException("The command is null");
}
return commandExecutor.execute(command);
}
public <T> T executeCommand(CommandConfig config, Command<T> command) {
if (config... | );
}
@Override
public List<EventLogEntry> getEventLogEntries(Long startLogNr, Long pageSize) {
return commandExecutor.execute(new GetEventLogEntriesCmd(startLogNr, pageSize));
}
@Override
public List<EventLogEntry> getEventLogEntriesByProcessInstanceId(String processInstanceId) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ManagementServiceImpl.java | 1 |
请完成以下Java代码 | public void setDatum (final @Nullable java.lang.String Datum)
{
set_Value (COLUMNNAME_Datum, Datum);
}
@Override
public java.lang.String getDatum()
{
return get_ValueAsString(COLUMNNAME_Datum);
}
@Override
public void setFS (final int FS)
{
set_Value (COLUMNNAME_FS, FS);
}
@Override
public int get... | }
@Override
public void setUmsatz (final @Nullable java.lang.String Umsatz)
{
set_Value (COLUMNNAME_Umsatz, Umsatz);
}
@Override
public java.lang.String getUmsatz()
{
return get_ValueAsString(COLUMNNAME_Umsatz);
}
@Override
public void setZI_Art (final @Nullable java.lang.String ZI_Art)
{
set_Value... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExportLine.java | 1 |
请完成以下Java代码 | private ImmutableList<DDOrderLineToAllocate> ofDDOrderLinesOrAlternatives(final Collection<I_DD_OrderLine_Or_Alternative> ddOrderLinesOrAlt)
{
Check.assumeNotEmpty(ddOrderLinesOrAlt, "ddOrderLinesOrAlt not empty");
return ddOrderLinesOrAlt.stream()
.map(this::toDDOrderLineToAllocate)
.collect(ImmutableList... | throw new AdempiereException("Invalid I_DD_OrderLine_Or_Alternative implementation passed; Expected " + I_DD_OrderLine.class + " or " + I_DD_OrderLine_Alternative.COLUMNNAME_AD_Client_ID + ", but was " + ddOrderLineOrAlt);
}
return DDOrderLineToAllocate.builder()
.uomConversionBL(uomConversionBL)
//
.d... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\generate_from_hu\DDOrderLineToAllocateFactory.java | 1 |
请完成以下Java代码 | public BPartnerId getCurrentBPartnerIdOrNull()
{
final I_I_BPartner currentImportRecord = getCurrentImportRecord();
return currentImportRecord != null
? BPartnerId.ofRepoIdOrNull(currentImportRecord.getC_BPartner_ID())
: null;
}
public void setCurrentBPartnerId(@NonNull final BPartnerId bpartnerId)
{
... | final I_I_BPartner currentImportRecord = getCurrentImportRecord();
return currentImportRecord != null
? BPartnerContactId.ofRepoIdOrNull(currentImportRecord.getC_BPartner_ID(), currentImportRecord.getAD_User_ID())
: null;
}
public void setCurrentBPartnerContactId(@NonNull final BPartnerContactId bpContactI... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnerImportContext.java | 1 |
请完成以下Java代码 | public class LicenseCreatorParam implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 证书 subject
*/
private String subject;
/**
* 密钥(私钥)别称
*/
private String privateAlias;
/**
* 密钥(私钥)密码(需要妥善保管,不能让使用者知道)
*/
private String keyPass;
... | * 证书失效时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date expiryTime;
/**
* 用户类型
*/
private String consumerType = "user";
/**
* 用户数量
*/
private Integer consumerAmount = 1;
/**
* 描述信息
*/
private String description = "";... | repos\springboot-demo-master\SoftwareLicense\src\main\java\com\et\license\license\LicenseCreatorParam.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class NodeServiceImpl implements NodeService {
private final NodeRepository nodeRepository;
private final RelationRepository relationRepository;
@Override
public Node save(Node node) {
Node save = nodeRepository.save(node);
return save;
}
@Override
public void bind(S... | if (Objects.isNull(subject) || Objects.isNull(object))
return null;
Node startNode = addNode(subject);
Node endNode = addNode(object);
String relationName = GraphUtil.getNodeValue(predicate);//关系词
List<Relation> oldRelation = relationRepository
.findRelation... | repos\springboot-demo-master\neo4j\src\main\java\com\et\neo4j\service\NodeServiceImpl.java | 2 |
请完成以下Java代码 | public void setQR_IBAN (final @Nullable java.lang.String QR_IBAN)
{
set_Value (COLUMNNAME_QR_IBAN, QR_IBAN);
}
@Override
public java.lang.String getQR_IBAN()
{
return get_ValueAsString(COLUMNNAME_QR_IBAN);
}
/**
* R_AvsAddr AD_Reference_ID=213
* Reference name: C_Payment AVS
*/
public static final... | @Override
public java.lang.String getR_AvsZip()
{
return get_ValueAsString(COLUMNNAME_R_AvsZip);
}
@Override
public void setRoutingNo (final @Nullable java.lang.String RoutingNo)
{
set_Value (COLUMNNAME_RoutingNo, RoutingNo);
}
@Override
public java.lang.String getRoutingNo()
{
return get_ValueAsStr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_BankAccount.java | 1 |
请完成以下Java代码 | public void setClassification(@Nullable final String classification)
{
this.classification = classification;
this.classificationSet = true;
}
public void setCareDegree(@Nullable final BigDecimal careDegree)
{
this.careDegree = careDegree;
this.careDegreeSet = true;
}
public void setCreatedAt(@Nullable f... | }
public void setUpdatedAt(@Nullable final Instant updatedAt)
{
this.updatedAt = updatedAt;
this.updatedAtSet = true;
}
public void setUpdateByIdentifier(@Nullable final String updateByIdentifier)
{
this.updateByIdentifier = updateByIdentifier;
this.updateByIdentifierSet = true;
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\alberta\JsonAlbertaPatient.java | 1 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("adWindowId", windowIdString)
.add("target", target)
.add("automaticallySetReferencingDocumentPaths", automaticallySetReferencingDocumentPaths)
.add("records", records)
.add("automaticallySetRefe... | {
this.code = code;
}
}
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, isGetterVisibility = Visibility.NONE, setterVisibility = Visibility.NONE)
@lombok.Value
@lombok.Builder
public static class WebuiNewRecord
{
/**
* If this string is used as field value
* the... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessExecutionResult.java | 1 |
请完成以下Java代码 | public void setM_Product_Mapping_ID (int M_Product_Mapping_ID)
{
if (M_Product_Mapping_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_Mapping_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_Mapping_ID, Integer.valueOf(M_Product_Mapping_ID));
}
/** Get Produkt-Zuordnung.
@return Produkt-Zuordnun... | Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\product\model\X_M_Product_Mapping.java | 1 |
请完成以下Java代码 | public String getRePresntmntRsn() {
return rePresntmntRsn;
}
/**
* Sets the value of the rePresntmntRsn property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRePresntmntRsn(String value) {
this.rePresntmntRsn = ... | */
public void setPdct(Product2 value) {
this.pdct = value;
}
/**
* Gets the value of the vldtnDt property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getVldtnDt() {
return vldtnDt;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\CardIndividualTransaction2.java | 1 |
请完成以下Java代码 | Collection<O> createOperations(EndpointId id, Object target) {
return MethodIntrospector
.selectMethods(target.getClass(), (MetadataLookup<O>) (method) -> createOperation(id, target, method))
.values();
}
private @Nullable O createOperation(EndpointId endpointId, Object target, Method method) {
return OPER... | private OperationInvoker applyAdvisors(EndpointId endpointId, OperationMethod operationMethod,
OperationInvoker invoker) {
if (this.invokerAdvisors != null) {
for (OperationInvokerAdvisor advisor : this.invokerAdvisors) {
invoker = advisor.apply(endpointId, operationMethod.getOperationType(), operationMetho... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\annotation\DiscoveredOperationsFactory.java | 1 |
请完成以下Java代码 | public boolean handlesMode(final String mode) {
return StringUtils.equalsIgnoreCase(mode, getDeploymentMode());
}
/**
* Determines the name to be used for the provided resource.
*
* @param resource
* the resource to get the name for
* @return the name of the resourc... | resourceName = ((ContextResource) resource).getPathWithinContext();
} else if (resource instanceof ByteArrayResource) {
resourceName = resource.getDescription();
} else {
try {
resourceName = resource.getFile().getAbsolutePath();
} catch (IOException... | repos\flowable-engine-main\modules\flowable5-spring\src\main\java\org\activiti\spring\autodeployment\AbstractAutoDeploymentStrategy.java | 1 |
请完成以下Java代码 | public static class HierarchyBuilder
{
private final ImmutableListMultimap.Builder<HierarchyNode, HierarchyNode> parent2Children = ImmutableListMultimap.builder();
private final HashMap<Beneficiary, HierarchyNode> beneficiary2Node = new HashMap<>();
public HierarchyBuilder addChildren(final HierarchyNode parent... | this.next = first;
}
@Override
public boolean hasNext()
{
return next != null;
}
@Override
public HierarchyNode next()
{
final HierarchyNode result = next;
if (result == null)
{
throw new NoSuchElementException("Previous HierarchyNode=" + previous + " had no parent");
}
previous ... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\hierarchy\Hierarchy.java | 1 |
请完成以下Java代码 | public int getReplenishRate() {
return replenishRate;
}
public Config setReplenishRate(int replenishRate) {
this.replenishRate = replenishRate;
return this;
}
public long getBurstCapacity() {
return burstCapacity;
}
public Config setBurstCapacity(long burstCapacity) {
Assert.isTrue(burstCa... | return this;
}
@Override
public String toString() {
return new ToStringCreator(this).append("replenishRate", replenishRate)
.append("burstCapacity", burstCapacity)
.append("requestedTokens", requestedTokens)
.toString();
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\ratelimit\RedisRateLimiter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDeploymentUrl() {
return deploymentUrl;
}
public void setDeploymentUrl(String deploymentUrl) {
this.deploymentUrl = deploymentUrl;
}
@ApiModelProperty(example = "Examples")
public String getCategory() {
return category;
}
public void setCategory(St... | public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}
public void setResource(String resource) {
this.resource = resource;
}
@ApiModelProperty(example = "http://localhost:8182/event-registry-repository/deployments/2/resources/oneEvent.event", value = "C... | repos\flowable-engine-main\modules\flowable-event-registry-rest\src\main\java\org\flowable\eventregistry\rest\service\api\repository\EventDefinitionResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static ServiceRepairProjectCostCollectorId ofRepoIdOrNull(final int projectRepoId, final int repoId)
{
if (repoId <= 0)
{
return null;
}
final ProjectId projectId = ProjectId.ofRepoIdOrNull(projectRepoId);
if (projectId == null)
{
return null;
}
return new ServiceRepairProjectCostCollect... | ProjectId projectId;
int repoId;
private ServiceRepairProjectCostCollectorId(@NonNull final ProjectId projectId, final int repoId)
{
this.projectId = projectId;
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Project_Repair_CostCollector_ID");
}
public static boolean equals(
@Nullable final ServiceRe... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\model\ServiceRepairProjectCostCollectorId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public LogoutSuccessHandler logoutSuccessHandler() {
return new LogoutController();
}
@Bean
public AuthenticationController authenticationController() throws UnsupportedEncodingException {
JwkProvider jwkProvider = new JwkProviderBuilder(domain).build();
return AuthenticationControl... | return managementApiClientId;
}
public String getManagementApiClientSecret() {
return managementApiClientSecret;
}
public String getGrantType() {
return grantType;
}
public String getUserInfoUrl() {
return "https://" + getDomain() + "/userinfo";
}
public Strin... | repos\tutorials-master\spring-security-modules\spring-security-auth0\src\main\java\com\baeldung\auth0\AuthConfig.java | 2 |
请完成以下Java代码 | public void setC_SubAcct_ID (int C_SubAcct_ID)
{
if (C_SubAcct_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_SubAcct_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_SubAcct_ID, Integer.valueOf(C_SubAcct_ID));
}
/** Get Sub Account.
@return Sub account for Element Value
*/
public int getC_SubAcct_ID ()
{... | 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);
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_SubAcct.java | 1 |
请完成以下Java代码 | public class ResourceValue {
private LwM2mResource lwM2mResource;
private ResourceModel resourceModel;
public ResourceValue(LwM2mResource lwM2mResource, ResourceModel resourceModel) {
this.resourceModel = resourceModel;
updateLwM2mResource(lwM2mResource, Mode.UPDATE);
}
public voi... | Set<LwM2mResourceInstance> instancesSet = new HashSet<>(lwM2mResource.getInstances().values());
if (Mode.REPLACE.equals(mode) && this.lwM2mResource != null) {
Map<Integer, LwM2mResourceInstance> oldInstances = this.lwM2mResource.getInstances();
oldInstances.values... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\client\ResourceValue.java | 1 |
请完成以下Java代码 | private AvailableForSalesConfig ofRecord(@Nullable final I_MD_AvailableForSales_Config configRecord)
{
if (configRecord == null)
{
return AvailableForSalesConfig
.builder()
.featureEnabled(false)
.insufficientQtyAvailableForSalesColorId(null)
.salesOrderLookBehindHours(0)
.shipmentDateL... | .salesOrderLookBehindHours(configRecord.getSalesOrderLookBehindHours())
.shipmentDateLookAheadHours(configRecord.getShipmentDateLookAheadHours())
.runAsync(configRecord.isAsync())
.asyncTimeoutMillis(configRecord.getAsyncTimeoutMillis())
.qtyPerWarehouse(configRecord.isQtyPerWarehouse())
.build();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSalesConfigRepo.java | 1 |
请完成以下Java代码 | public void setC_PaymentProcessor_ID (int C_PaymentProcessor_ID)
{
if (C_PaymentProcessor_ID < 1)
set_Value (COLUMNNAME_C_PaymentProcessor_ID, null);
else
set_Value (COLUMNNAME_C_PaymentProcessor_ID, Integer.valueOf(C_PaymentProcessor_ID));
}
/** Get Payment Processor.
@return Payment processor for el... | /** Set Processed.
@param Processed
The document has been processed
*/
public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentBatch.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean verify(String hostname, SSLSession session) { return true; }
};
} else if (sslCaCert != null) {
char[] password = null; // Any password will work.
CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
C... | } else {
httpClient.setSslSocketFactory(null);
}
httpClient.setHostnameVerifier(hostnameVerifier);
} catch (GeneralSecurityException e) {
throw new RuntimeException(e);
}
}
private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecur... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\ApiClient.java | 2 |
请完成以下Java代码 | private static void sortGuava() {
final Ordering naturalOrdering =
Ordering.natural().onResultOf(Functions.forMap(map, null));
System.out.println(ImmutableSortedMap.copyOf(map, naturalOrdering));
}
private static void sortStream() {
map.entrySet().stream()
.sort... | private static void arrayListSortByValue() {
List<Employee> employeeById = new ArrayList<>(map.values());
Collections.sort(employeeById);
System.out.println(employeeById);
}
private static void arrayListSortByKey() {
List<String> employeeByKey = new ArrayList<>(map.keySet());
... | repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\sort\SortHashMap.java | 1 |
请完成以下Java代码 | protected boolean isMultipleResults(BuiltinAggregator aggregator) {
return aggregator == null;
}
protected Entry<String, List<Double>> composeOutputValues(ELExecutionContext executionContext) {
Collection<Map<String, Object>> ruleResults = new ArrayList<>(executionContext.getRuleResults().value... | }
return aggregate;
}
protected Double aggregateMin(List<Double> values) {
return Collections.min(values);
}
protected Double aggregateMax(List<Double> values) {
return Collections.max(values);
}
protected Double aggregateCount(List<Double> values) {
return (do... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\hitpolicy\HitPolicyCollect.java | 1 |
请完成以下Java代码 | public List<User> findUserByQueryCriteria(UserQueryImpl query) {
return dataManager.findUserByQueryCriteria(query);
}
@Override
public long findUserCountByQueryCriteria(UserQueryImpl query) {
return dataManager.findUserCountByQueryCriteria(query);
}
@Override
public UserQuery c... | public Picture getUserPicture(User user) {
UserEntity userEntity = (UserEntity) user;
return userEntity.getPicture();
}
@Override
public void setUserPicture(User user, Picture picture) {
UserEntity userEntity = (UserEntity) user;
userEntity.setPicture(picture);
dataM... | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\UserEntityManagerImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getDocumentID() {
return documentID;
}
/**
* Sets the value of the documentID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDocumentID(String value) {
this.documentID = value;
}
/*... | * possible object is
* {@link DescriptionType }
*
*/
public DescriptionType getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link DescriptionType }
*... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\SupplierReferenceType.java | 2 |
请完成以下Java代码 | protected IExternalSystemChildConfigId getExternalChildConfigId()
{
final int id;
if (this.childConfigId > 0)
{
id = this.childConfigId;
}
else
{
final IExternalSystemChildConfig childConfig = externalSystemConfigDAO.getChildByParentIdAndType(ExternalSystemParentConfigId.ofRepoId(getRecord_ID()), ge... | }
@Override
protected ExternalSystemType getExternalSystemType()
{
return ExternalSystemType.ScriptedImportConversion;
}
@Override
protected long getSelectedRecordCount(final IProcessPreconditionsContext context)
{
return context.getSelectedIncludedRecords()
.stream()
.filter(recordRef -> I_Externa... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeScriptedImportConversionAction.java | 1 |
请完成以下Java代码 | public class SubmitStartFormCmd extends NeedsActiveProcessDefinitionCmd<ProcessInstance> {
private static final long serialVersionUID = 1L;
protected final String businessKey;
protected Map<String, String> properties;
public SubmitStartFormCmd(String processDefinitionId, String businessKey, Map<Strin... | processInstance = (ExecutionEntity) processInstanceHelper.createProcessInstance(processDefinition, null, null, null, null, null, null, null);
}
CommandContextUtil.getHistoryManager(commandContext).recordFormPropertiesSubmitted(processInstance.getExecutions().get(0), properties, null,
pr... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\SubmitStartFormCmd.java | 1 |
请完成以下Java代码 | public CorrelationProperty newInstance(ModelTypeInstanceContext instanceContext) {
return new CorrelationPropertyImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
.build();
typeAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_TYPE... | public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public ItemDefinition getType() {
return typeAttribute.getReferenceTargetElement(this);
}
public void setType(ItemDefinition type) {
typeAttribute.setR... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CorrelationPropertyImpl.java | 1 |
请完成以下Java代码 | public byte[] getData()
{
byte[] data = super.getBinaryData();
if (data != null)
{
return data;
}
// From URL
final String str = getImageURL();
if (str == null || str.length() == 0)
{
log.info("No Image URL");
return null;
}
// Get from URL
final URL url = getURL();
if (url == null)
... | }
catch (final Exception e)
{
log.info(e.toString());
}
return data;
} // getData
@Override
public String toString()
{
return "MImage[ID=" + get_ID() + ",Name=" + getName() + "]";
} // toString
@Override
protected boolean beforeSave(final boolean newRecord)
{
if (getAD_Org_ID() != OrgId.AN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MImage.java | 1 |
请完成以下Java代码 | protected void initHandlerMethods() {
if (this.healthEndpoint == null) {
return;
}
for (WebOperation operation : this.healthEndpoint.getOperations()) {
WebOperationRequestPredicate predicate = operation.getRequestPredicate();
String matchAllRemainingPathSegmentsVariable = predicate.getMatchAllRemainingPa... | }
private RequestMappingInfo getRequestMappingInfo(WebOperation operation, String additionalPath) {
WebOperationRequestPredicate predicate = operation.getRequestPredicate();
String path = this.endpointMapping.createSubPath(additionalPath);
RequestMethod method = RequestMethod.valueOf(predicate.getHttpMethod().n... | repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\endpoint\web\AdditionalHealthEndpointPathsWebFluxHandlerMapping.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ManagementServerProperties {
/**
* Management endpoint HTTP port (uses the same port as the application by default).
* Configure a different port to use management-specific SSL.
*/
private @Nullable Integer port;
/**
* Network address to which the management endpoints should bind. Requires a c... | public @Nullable InetAddress getAddress() {
return this.address;
}
public void setAddress(@Nullable InetAddress address) {
this.address = address;
}
public String getBasePath() {
return this.basePath;
}
public void setBasePath(String basePath) {
this.basePath = cleanBasePath(basePath);
}
public @Nul... | repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\web\server\ManagementServerProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | AnnotationGlobalServerInterceptorConfigurer annotationGlobalServerInterceptorConfigurer(
final ApplicationContext applicationContext) {
return new AnnotationGlobalServerInterceptorConfigurer(applicationContext);
}
@ConditionalOnMissingBean
@Bean
public GrpcServiceDiscoverer defaultG... | public List<GrpcServerConfigurer> defaultServerConfigurers() {
return Collections.emptyList();
}
@ConditionalOnMissingBean
@ConditionalOnBean(GrpcServerFactory.class)
@Bean
public GrpcServerLifecycle grpcServerLifecycle(
final GrpcServerFactory factory,
final GrpcSer... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class SpringSecurity extends WebSecurityConfigurerAdapter {
private UserPrincipalDetialService userPrincipalDetialService;
public SpringSecurity(UserPrincipalDetialService userPrincipalDetialService){
this.userPrincipalDetialService = userPrincipalDetialService;
}
@Override
protec... | @Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
// .anyRequest().permitAll() if you fix all permission values, then remove all conditions.
.antMatchers("/index").permitAll()
.antMatchers("/pr... | repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\8. SpringAuthenticateDB\src\main\java\spring\authenticate\security\SpringSecurity.java | 2 |
请完成以下Java代码 | public CStatement newCStatement(final int resultSetType, final int resultSetConcurrency, final String trxName)
{
final CStatementProxy stmt = new CStatementProxy(resultSetType, resultSetConcurrency, trxName);
if (sqlQueriesTracingEnabled)
{
return new TracingStatement<>(stmt);
}
return stmt;
}
@Overrid... | }
return stmt;
}
@Override
public CPreparedStatement newCPreparedStatement(final CStatementVO info)
{
final CPreparedStatementProxy pstmt = new CPreparedStatementProxy(info);
if (sqlQueriesTracingEnabled)
{
return new TracingPreparedStatement<>(pstmt);
}
return pstmt;
}
@Override
public CCallabl... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\StatementsFactory.java | 1 |
请完成以下Java代码 | public class FinancialIdentificationSchemeName1Choice {
@XmlElement(name = "Cd")
protected String cd;
@XmlElement(name = "Prtry")
protected String prtry;
/**
* Gets the value of the cd property.
*
* @return
* possible object is
* {@link String }
*
*... | */
public String getPrtry() {
return prtry;
}
/**
* Sets the value of the prtry property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrtry(String value) {
this.prtry = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\FinancialIdentificationSchemeName1Choice.java | 1 |
请完成以下Java代码 | public List<Exception> doExport()
{
final I_EDI_Document document = getDocument();
final I_M_InOut_Desadv_V desadvInOut = InterfaceWrapperHelper.create(document, I_M_InOut_Desadv_V.class);
final I_M_InOut shipment = InterfaceWrapperHelper.create(shipmentBL.getById(InOutId.ofRepoId(desadvInOut.getM_InOut_ID()))... | .attachmentName(EDI_DESADV_InOut_Export.CST_DESADV_EXP_FORMAT + "_" + shipment.getDocumentNo() + ".xml")
.build());
}
catch (final Exception e)
{
desadv.setEDI_ExportStatus(I_EDI_Document_Extension.EDI_EXPORTSTATUS_Error);
InterfaceWrapperHelper.save(desadv);
shipment.setEDI_ExportStatus(I_EDI_... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\impl\EDI_DESADV_InOut_Export.java | 1 |
请完成以下Java代码 | private int getProcessingBatchSize()
{
final int batchSize = sysConfigBL.getIntValue(SYSCONFIG_ProcessingBatchSize, -1);
return batchSize > 0 ? batchSize : DEFAULT_ProcessingBatchSize;
}
public void fireGLJournalCompleted(final SAPGLJournal glJournal)
{
for (SAPGLJournalLine line : glJournal.getLines())
{
... | }
}
public void fireGLJournalReactivated(final SAPGLJournal glJournal)
{
for (SAPGLJournalLine line : glJournal.getLines())
{
final FAOpenItemTrxInfo openItemTrxInfo = line.getOpenItemTrxInfo();
if (openItemTrxInfo == null)
{
continue;
}
handlersByKey.values().forEach(handler -> handler.onGL... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\open_items\FAOpenItemsService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static CommonOAuth2Provider getCommonProvider(String providerId) {
try {
String value = providerId.trim();
if (value.isEmpty()) {
return null;
}
try {
return CommonOAuth2Provider.valueOf(value);
}
catch (Exception ex) {
return findEnum(value);
}
}
catch (Exception ex) {
... | }
throw new IllegalArgumentException(
"No enum constant " + CommonOAuth2Provider.class.getCanonicalName() + "." + value);
}
private static String getCanonicalName(String name) {
StringBuilder canonicalName = new StringBuilder(name.length());
name.chars()
.filter(Character::isLetterOrDigit)
.map(Chara... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\oauth2\client\ClientRegistrationsBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public class WeeklyNewsDTO extends ReviewableDTO {
private String title;
public WeeklyNewsDTO() {
}
public WeeklyNewsDTO(String title1) {
this.title = title1;
}
@Override
public String getTitle() {
return title;
}
@Override
public void setTitle(String title) ... | public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
WeeklyNewsDTO that = (WeeklyNewsDTO) o;
return Objects.equals(title, that.title);
}
@Override
publ... | repos\tutorials-master\mapstruct-3\src\main\java\com\baeldung\setnullproperty\dto\WeeklyNewsDTO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setQuotation_OrderLine_ID (final int Quotation_OrderLine_ID)
{
if (Quotation_OrderLine_ID < 1)
set_Value (COLUMNNAME_Quotation_OrderLine_ID, null);
else
set_Value (COLUMNNAME_Quotation_OrderLine_ID, Quotation_OrderLine_ID);
}
@Override
public int getQuotation_OrderLine_ID()
{
return get... | set_Value (COLUMNNAME_Type, Type);
}
@Override
public java.lang.String getType()
{
return get_ValueAsString(COLUMNNAME_Type);
}
@Override
public void setVHU_ID (final int VHU_ID)
{
if (VHU_ID < 1)
set_ValueNoCheck (COLUMNNAME_VHU_ID, null);
else
set_ValueNoCheck (COLUMNNAME_VHU_ID, VHU_ID);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_CostCollector.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setTitle(String title) {
this.title = title;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@Override
public String toString() {
return "Menu{" +
... | }
public void setError(String error) {
this.error = error;
}
public List<Menu> getMenus() {
return menus;
}
public void setMenus(List<Menu> menus) {
this.menus = menus;
}
public Compiler getCompiler() {
return compiler;
}
public void setCompiler(C... | repos\spring-boot-master\spring-boot-externalize-config\src\main\java\com\mkyong\global\AppProperties.java | 2 |
请完成以下Java代码 | public void setNewlineToken(String newline)
{
Check.assumeNotNull(newline, "newline not null");
this.newlineToken = newline;
}
public int getIndent()
{
return indent;
}
public IndentedStringBuilder incrementIndent()
{
return setIndent(indent + 1);
}
public IndentedStringBuilder decrementIndent()
{
... | }
_linePrefix = prefix.toString();
}
return _linePrefix;
}
public StringBuilder getInnerStringBuilder()
{
return sb;
}
@Override
public String toString()
{
return sb.toString();
}
public IndentedStringBuilder appendLine(final Object obj)
{
final String linePrefix = getLinePrefix();
sb.append... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\IndentedStringBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SetupData {
@Autowired
private UserRepository userRepository;
@Autowired
private PrivilegeRepository privilegeRepository;
@Autowired
private OrganizationRepository organizationRepository;
@Autowired
private PasswordEncoder encoder;
@PostConstruct
public void ini... | userRepository.save(user1);
final User user2 = new User();
user2.setUsername("tom");
user2.setPassword(encoder.encode("111"));
user2.setPrivileges(new HashSet<>(Arrays.asList(privilege1, privilege2)));
user2.setOrganization(organizationRepository.findByName("SecondOrg"));
... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\SetupData.java | 2 |
请完成以下Java代码 | public PostingException setDetailMessage(@Nullable final ITranslatableString detailMessage)
{
_detailMessage = TranslatableStrings.nullToEmpty(detailMessage);
resetMessageBuilt();
return this;
}
public PostingException setDetailMessage(final String detailMessage)
{
return setDetailMessage(TranslatableStrin... | /**
* @return <code>true</code> if the document's "Posted" status shall not been changed.
*/
public boolean isPreserveDocumentPostedStatus()
{
return _preserveDocumentPostedStatus;
}
/**
* If set, the document's "Posted" status shall not been changed.
*/
public PostingException setPreserveDocumentPosted... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\PostingException.java | 1 |
请完成以下Java代码 | public Params build()
{
if (parameterNames.isEmpty())
{
return EMPTY;
}
else
{
return new Params(
ImmutableSet.copyOf(parameterNames),
ImmutableMap.copyOf(values));
}
}
public ParamsBuilder value(@NonNull final String parameterName, @Nullable final String valueStr)
{
re... | public ParamsBuilder valueObj(@NonNull final String parameterName, @Nullable final Object value)
{
parameterNames.add(parameterName);
if (value != null)
{
values.put(parameterName, value);
}
else
{
values.remove(parameterName);
}
return this;
}
public ParamsBuilder valueObj(@Non... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\Params.java | 1 |
请完成以下Java代码 | private void appendToPreviousLine(@NonNull final String line)
{
final StringBuilder previousLine = new StringBuilder();
final int index = loadedDataLines.size() - 1;
previousLine.append(loadedDataLines.get(index));
// append the new line, because the char exists
if (Check.isNotBlank(previousLine.toStri... | * @throws IOException
*/
public List<String> readRegularLines(@NonNull final File file, @NonNull final Charset charset) throws IOException
{
return Files.readLines(file, charset, new SingleLineProcessor());
}
public List<String> readRegularLines(@NonNull final byte[] data, @NonNull final Charset charset) throw... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\FileImportReader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PricingConditionsId implements RepoIdAware
{
public static PricingConditionsId ofRepoId(final int discountSchemaId)
{
return new PricingConditionsId(discountSchemaId);
}
@Nullable
public static PricingConditionsId ofRepoIdOrNull(final int discountSchemaId)
{
return discountSchemaId > 0 ? new Pr... | }
private final int repoId;
private PricingConditionsId(final int discountSchemaId)
{
Check.assumeGreaterThanZero(discountSchemaId, "discountSchemaId");
this.repoId = discountSchemaId;
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsId.java | 2 |
请完成以下Java代码 | public class Car {
private String name;
private String engine;
public static int numberOfCars;
public Car(String name, String engine) {
this.name = name;
this.engine = engine;
numberOfCars++;
}
//getters and setters
public static int getNumberOfCars() {
... | }
public String getEngine() {
return engine;
}
public void setEngine(String engine) {
this.engine = engine;
}
public static String getCarsInformation(Car car) {
return car.getName() + "-" + car.getEngine();
}
public static void setNumberOfCars(int numberOfCars) {
... | repos\tutorials-master\core-java-modules\core-java-lang-oop-modifiers\src\main\java\com\baeldung\staticmodifier\Car.java | 1 |
请完成以下Java代码 | public java.lang.String getColumnName ()
{
return (java.lang.String)get_Value(COLUMNNAME_ColumnName);
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Beschreibun... | /** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
@Override
public java.lang.String getEntityType ()
{
return (java.lang.String)get_Value(COLUMNNAME_EntityType);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ColumnCallout.java | 1 |
请完成以下Java代码 | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
if (!this.matcher.matches(request)) {
filterChain.doFilter(request, response);
return;
}
Supplier<SecurityContext> context = this.securityContextHolde... | */
public void setCreationOptionsRepository(PublicKeyCredentialCreationOptionsRepository creationOptionsRepository) {
Assert.notNull(creationOptionsRepository, "creationOptionsRepository cannot be null");
this.repository = creationOptionsRepository;
}
/**
* Set the {@link HttpMessageConverter} to read the
*... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\registration\PublicKeyCredentialCreationOptionsFilter.java | 1 |
请完成以下Java代码 | public int getServiceFee_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_ServiceFee_Product_ID);
}
@Override
public void setServiceInvoice_DocType_ID (int ServiceInvoice_DocType_ID)
{
if (ServiceInvoice_DocType_ID < 1)
set_Value (COLUMNNAME_ServiceInvoice_DocType_ID, null);
else
set_Value (COLUMNNA... | return get_ValueAsInt(COLUMNNAME_ServiceInvoice_DocType_ID);
}
@Override
public void setValidFrom (java.sql.Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
@Override
public java.sql.Timestamp getValidFrom()
{
return get_ValueAsTimestamp(COLUMNNAME_ValidFrom);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_InvoiceProcessingServiceCompany.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public org.compiere.model.I_M_HazardSymbol getM_HazardSymbol()
{
return get_ValueAsPO(COLUMNNAME_M_HazardSymbol_ID, org.compiere.model.I_M_HazardSymbol.class);
}
@Override
... | @Override
public void setM_Product_HazardSymbol_ID (final int M_Product_HazardSymbol_ID)
{
if (M_Product_HazardSymbol_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_HazardSymbol_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_HazardSymbol_ID, M_Product_HazardSymbol_ID);
}
@Override
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_HazardSymbol.java | 1 |
请完成以下Java代码 | protected BaseCallableElement createCallableElement() {
return new BaseCallableElement();
}
protected CmmnActivityBehavior getActivityBehavior() {
return new DmnDecisionTaskActivityBehavior();
}
protected DmnDecisionTaskActivityBehavior getActivityBehavior(CmmnActivity activity) {
return (DmnDecis... | protected String getVersion(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
DecisionTask definition = getDefinition(element);
return definition.getCamundaDecisionVersion();
}
protected String getTenantId(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\handler\DecisionTaskItemHandler.java | 1 |
请完成以下Java代码 | public float getWaitIncreaseFactor() {
return waitIncreaseFactor;
}
public void setWaitIncreaseFactor(float waitIncreaseFactor) {
this.waitIncreaseFactor = waitIncreaseFactor;
}
public long getMaxWait() {
return maxWait;
}
public void setMaxWait(long maxWait) {
this.maxWait = maxWait;
}... | public boolean isActive() {
return isActive;
}
public RejectedJobsHandler getRejectedJobsHandler() {
return rejectedJobsHandler;
}
public void setRejectedJobsHandler(RejectedJobsHandler rejectedJobsHandler) {
this.rejectedJobsHandler = rejectedJobsHandler;
}
protected void startJobAcquisition... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutor.java | 1 |
请完成以下Java代码 | public void updateProduct(final I_PP_Product_BOM bom)
{
final ProductId productId = ProductId.ofRepoId(bom.getM_Product_ID());
bomService.updateIsBOMFlag(productId);
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE },
ifColumnsChanged = { I_PP_Product_BOM.COLUMNNAM... | }
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE },
ifColumnsChanged = { I_PP_Product_BOM.COLUMNNAME_M_AttributeSetInstance_ID })
public void validateBOMAttributes(final I_PP_Product_BOM productBom)
{
final ProductBOMVersionsId productBOMVersionsId = ProductBOMVersio... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Product_BOM.java | 1 |
请完成以下Java代码 | public static String join(Iterable<? extends CharSequence> s, String delimiter)
{
Iterator<? extends CharSequence> iter = s.iterator();
if (!iter.hasNext()) return "";
StringBuilder buffer = new StringBuilder(iter.next());
while (iter.hasNext()) buffer.append(delimiter).append(iter.n... | }
return sb.toString();
}
public static String combine(List<Word> wordList)
{
StringBuilder sb = new StringBuilder(wordList.size() * 3);
for (IWord word : wordList)
{
sb.append(word.getValue());
}
return sb.toString();
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\TextUtility.java | 1 |
请完成以下Java代码 | private TreeSet<Character> getTransitionLabelSet()
{
return charTreeSet;
}
/**
* Determines if a child node object is accepting.
*
* @param nodeObj an Object
* @return if {@code nodeObj} is either an MDAGNode or a SimplifiedMDAGNode,
* true if the node is accepting, false ... | // sb.append(", equivalenceClassMDAGNodeHashMap=").append(equivalenceClassMDAGNodeHashMap);
// sb.append(", mdagDataArray=").append(Arrays.toString(mdagDataArray));
// sb.append(", charTreeSet=").append(charTreeSet);
// sb.append(", transitionCount=").append(transitionCount);
// sb.ap... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\MDAG\MDAG.java | 1 |
请完成以下Java代码 | public void setDBAddress (String DBAddress)
{
set_ValueNoCheck (COLUMNNAME_DBAddress, DBAddress);
}
/** Get DB Address.
@return JDBC URL of the database server
*/
public String getDBAddress ()
{
return (String)get_Value(COLUMNNAME_DBAddress);
}
/** Get Record ID/ColumnName
@return ID/Colum... | */
public int getR_IssueSystem_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_IssueSystem_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Statistics.
@param StatisticsInfo
Information to help profiling the system for solving support issues
*/
public void setStatisticsInfo (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueSystem.java | 1 |
请完成以下Java代码 | public static boolean isTaskRelatedEntityCountEnabledGlobally() {
return CommandContextUtil.getProcessEngineConfiguration().getPerformanceSettings().isEnableTaskRelationshipCounts();
}
public static boolean isExecutionRelatedEntityCountEnabled(ExecutionEntity executionEntity) {
if (executionEnt... | *
* From this table it is clear that only when both are true, the result should be true, which is the regular AND rule for booleans.
*/
public static boolean isExecutionRelatedEntityCountEnabled(CountingExecutionEntity executionEntity) {
return !executionEntity.isProcessInstanceType() && isExecut... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\CountingEntityUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WFProcessId implements RepoIdAware
{
@JsonCreator
public static WFProcessId ofRepoId(final int repoId)
{
return new WFProcessId(repoId);
}
public static WFProcessId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new WFProcessId(repoId) : null;
}
int repoId;
private WFProcessId(final... | }
@JsonValue
@Override
public int getRepoId()
{
return repoId;
}
public static int toRepoId(@Nullable final WFProcessId id)
{
return id != null ? id.getRepoId() : -1;
}
public static boolean equals(@Nullable final WFProcessId id1, @Nullable final WFProcessId id2)
{
return Objects.equals(id1, id2);
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WFProcessId.java | 2 |
请完成以下Java代码 | private static void updateResultIfCampaignPriceIsLower(@NonNull final IPricingResult result, @NonNull final CampaignPrice campaignPrice)
{
final BigDecimal campaignPriceBD = campaignPrice.getPriceStd().toBigDecimal();
final boolean campainPriceIsLower;
if (!result.isCalculated())
{
campainPriceIsLower = tr... | loggable.addLog("CampaingnPrice={} is lower than the stdPrice={} and discount={} from the previous pricing rules; -> update result to campaign price",
campaignPriceBD, result.getPriceStd(), result.getDiscount());
result.setPriceStd(campaignPriceBD);
result.setCalculated(true);
result.setDisallowDiscount(fals... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\campaign_price\CampaignPricingRule.java | 1 |
请完成以下Java代码 | public ResourceRole newInstance(ModelTypeInstanceContext instanceContext) {
return new ResourceRoleImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
resourceRefChi... | }
public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public Resource getResource() {
return resourceRefChild.getReferenceTargetElement(this);
}
public void setResource(Resource resource) {
resourceRe... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ResourceRoleImpl.java | 1 |
请完成以下Java代码 | public class ProcessDefinitionStatisticsQueryDto extends AbstractRestQueryParametersDto<ProcessDefinitionStatisticsDto> {
private static final Map<String, String> VALID_SORT_VALUES;
static {
VALID_SORT_VALUES = new HashMap<>();
VALID_SORT_VALUES.put("incidents", "INCIDENT_COUNT_");
VALID_SORT_VALUES.pu... | @CamundaQueryParam("nameLike")
public void setNameLike(String nameLike) {
this.nameLike = nameLike;
}
@Override
protected boolean isValidSortByValue(String value) {
return VALID_SORT_VALUES.containsKey(value);
}
@Override
protected String getOrderByValue(String sortBy) {
return VALID_SORT_VA... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\query\ProcessDefinitionStatisticsQueryDto.java | 1 |
请完成以下Java代码 | private int getBPartnerLocationId()
{
return bpartnerLocationId;
}
public ReturnsInOutHeaderFiller setMovementDate(final Timestamp movementDate)
{
this.movementDate = movementDate;
return this;
}
private Timestamp getMovementDate()
{
return movementDate;
}
public ReturnsInOutHeaderFiller setWarehous... | }
private String getExternalId()
{
return this.externalId;
}
private String getExternalResourceURL()
{
return this.externalResourceURL;
}
public ReturnsInOutHeaderFiller setExternalResourceURL(@Nullable final String externalResourceURL)
{
this.externalResourceURL = externalResourceURL;
return this;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\ReturnsInOutHeaderFiller.java | 1 |
请完成以下Java代码 | protected JobDefinitionQuery createNewQuery(ProcessEngine engine) {
return engine.getManagementService().createJobDefinitionQuery();
}
@Override
protected void applyFilters(JobDefinitionQuery query) {
if (jobDefinitionId != null) {
query.jobDefinitionId(jobDefinitionId);
}
if (activityIdIn... | }
if (TRUE.equals(includeJobDefinitionsWithoutTenantId)) {
query.includeJobDefinitionsWithoutTenantId();
}
}
@Override
protected void applySortBy(JobDefinitionQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
if (sortBy.equals(SORT_BY_JOB_DEFINITION_ID)) {
... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\management\JobDefinitionQueryDto.java | 1 |
请完成以下Java代码 | public class HistoricActivityInstanceEntityManager extends AbstractManager {
public void deleteHistoricActivityInstancesByProcessInstanceId(String historicProcessInstanceId) {
if (getHistoryManager().isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
getDbSqlSession().delete("deleteHistoricActivit... | public long findHistoricActivityInstanceCountByQueryCriteria(HistoricActivityInstanceQueryImpl historicActivityInstanceQuery) {
return (Long) getDbSqlSession().selectOne("selectHistoricActivityInstanceCountByQueryCriteria", historicActivityInstanceQuery);
}
@SuppressWarnings("unchecked")
public Lis... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricActivityInstanceEntityManager.java | 1 |
请完成以下Java代码 | public de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_VerfuegbarkeitAnteil getMSV3_VerfuegbarkeitAnteil() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_MSV3_VerfuegbarkeitAnteil_ID, de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_VerfuegbarkeitAnteil.class);
}
@Override
public vo... | set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitAnteil_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitAnteil_ID, Integer.valueOf(MSV3_VerfuegbarkeitAnteil_ID));
}
/** Get MSV3_VerfuegbarkeitAnteil.
@return MSV3_VerfuegbarkeitAnteil */
@Override
public int getMSV3_VerfuegbarkeitAnteil_ID ... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_Tour.java | 1 |
请完成以下Java代码 | public Integer getCapacity() {
return capacityAttribute.getValue(this);
}
@Override
public void setCapacity(Integer capacity) {
capacityAttribute.setValue(this, capacity);
}
@Override
public Boolean isUnlimited() {
return isUnlimitedAttribute.getValue(this);
}
@Override
public void setU... | }
@Override
public void setItemSubject(ItemDefinition itemSubject) {
itemSubjectRefAttribute.setReferenceTargetElement(this, itemSubject);
}
@Override
public DataState getDataState() {
return dataStateChild.getChild(this);
}
@Override
public void setDataState(DataState dataState) {
dataSt... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DataStoreImpl.java | 1 |
请完成以下Java代码 | public void setPostingError_Issue_ID (final int PostingError_Issue_ID)
{
if (PostingError_Issue_ID < 1)
set_Value (COLUMNNAME_PostingError_Issue_ID, null);
else
set_Value (COLUMNNAME_PostingError_Issue_ID, PostingError_Issue_ID);
}
@Override
public int getPostingError_Issue_ID()
{
return get_ValueA... | }
@Override
public BigDecimal getQtyInUOM()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyInUOM);
return bd != null ? bd : BigDecimal.ZERO;
}
/**
* Type AD_Reference_ID=541716
* Reference name: M_MatchInv_Type
*/
public static final int TYPE_AD_Reference_ID=541716;
/** Material = M */
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MatchInv.java | 1 |
请完成以下Java代码 | protected void prepare()
{
final ProcessInfoParameter[] para = getParametersAsArray();
for (int i = 0; i < para.length; i++)
{
final String name = para[i].getParameterName();
if (para[i].getParameter() == null)
{
;
}
else if (name.equals("PeriodAction"))
{
p_PeriodAction = (String)para[... | //
// Update the period controls
for (final I_C_PeriodControl pc : periodControls)
{
// Don't update permanently closed period controls
if (X_C_PeriodControl.PERIODSTATUS_PermanentlyClosed.equals(pc.getPeriodStatus()))
{
continue;
}
pc.setPeriodStatus(newPeriodStatus);
pc.setPeriodAction(X_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\PeriodStatus.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setForceRequest(boolean forceRequest) {
this.forceRequest = forceRequest;
}
public boolean isForceResponse() {
return Boolean.TRUE.equals(this.forceResponse);
}
public void setForceResponse(boolean forceResponse) {
this.forceResponse = forceResponse;
}
public boolean shouldForce(HttpMessageTy... | */
public enum HttpMessageType {
/**
* HTTP request message.
*/
REQUEST,
/**
* HTTP response message.
*/
RESPONSE
}
} | repos\spring-boot-4.0.1\module\spring-boot-servlet\src\main\java\org\springframework\boot\servlet\autoconfigure\ServletEncodingProperties.java | 2 |
请完成以下Java代码 | public String getRRGGBB()
{
Color color = getColor();
StringBuffer sb = new StringBuffer();
sb.append(StringUtils.toHex((byte)color.getRed()))
.append(StringUtils.toHex((byte)color.getGreen()))
.append(StringUtils.toHex((byte)color.getBlue()));
return sb.toString();
} // getRRGGBB
/**
* String Repr... | + " -> " + new Color(colors[i].getRGB(), true));
/**
// Create Colors
for (int i = 0; i < colors.length; i++)
create(colors[i], names[i]);
create(whiteGray, "Gray white");
create(darkGreen, "Green dark");
create(blackGreen, "Green black");
create(blackBlue, "Blue black");
create(brown, "Brown");
crea... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\MPrintColor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@ApiModelProperty(example = "Examples")
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
... | return version;
}
public void setVersion(int version) {
this.version = version;
}
@ApiModelProperty(example = "SimpleSourceName")
public String getResourceName() {
return resourceName;
}
public void setResourceName(String resourceName) {
this.resourceName = resourc... | repos\flowable-engine-main\modules\flowable-app-engine-rest\src\main\java\org\flowable\app\rest\service\api\repository\AppDefinitionResponse.java | 2 |
请完成以下Java代码 | public void setServletContext(ServletContext servletContext) {
this.servletContext = servletContext;
}
/**
* Set a {@link HttpServletRequestTransformer} to be used prior to passing to the
* {@link AuthorizationManager}.
* @param requestTransformer the {@link HttpServletRequestTransformer} to use.
*/
publi... | HttpServletRequestTransformer IDENTITY = (request) -> request;
/**
* Return the {@link HttpServletRequest} that is passed into the
* {@link AuthorizationManager}
* @param request the {@link HttpServletRequest} created by the
* {@link WebInvocationPrivilegeEvaluator}
* @return the {@link HttpServletReq... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\access\AuthorizationManagerWebInvocationPrivilegeEvaluator.java | 1 |
请完成以下Java代码 | public String toString() {
return getName();
}
public enum Role {
CLUSTER_OPERATOR,
DEVELOPER;
public static Role of(String name) {
return Arrays.stream(values())
.filter(role -> role.name().equalsIgnoreCase(String.valueOf(name).trim()))
.findFirst()
.orElse(null); | }
public boolean isClusterOperator() {
return CLUSTER_OPERATOR.equals(this);
}
public boolean isDeveloper() {
return DEVELOPER.equals(this);
}
@Override
public String toString() {
return name().toLowerCase();
}
}
} | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\User.java | 1 |
请完成以下Java代码 | private ProductId resolveProductIdOrNull(final @Nullable ExternalIdentifier productIdentifier, @NonNull final OrgId orgId)
{
if (productIdentifier == null)
{
return null;
}
final ProductMasterDataProvider.ProductInfo productInfo = productMasterDataProvider.getProductInfo(productIdentifier, orgId);
if (pro... | {
return null;
}
return bPartnerMasterdataProvider.resolveUserExternalIdentifier(orgId, userIdentifier)
.orElseThrow(() -> new AdempiereException("@NotFound@ @" + fieldName + "@"));
}
@Nullable
private BPartnerId resolveBPartnerIdOrNull(final @Nullable ExternalIdentifier bpartnerIdentifier, @NonNull fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\request\RequestRestService.java | 1 |
请完成以下Java代码 | public void setDescription(final String description)
{
this.description = description;
}
private void setDescription(final String adLanguage, final String descriptionTrl)
{
Check.assumeNotEmpty(adLanguage, "adLanguage is not empty");
if (descriptionTrl == null)
{
return;
}
if (descriptionTrls == n... | } // getColumnSQL
public ColumnSql getColumnSql(@NonNull final String ctxTableName)
{
return ColumnSql.ofSql(getColumnSQL(false), ctxTableName);
}
/**
* Is Virtual Column
*
* @return column is virtual
*/
public boolean isVirtualColumn()
{
return (ColumnSQL != null && !ColumnSQL.isEmpty())
|| ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridFieldVO.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.