repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/incubator-kie-drools
1,104
kie-api/src/main/java/org/kie/api/runtime/conf/KieSessionOptionsConfiguration.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.api.runtime.conf; import org.kie.api.conf.OptionsConfiguration; /** * A base interface for type safe configurations */ public interface KieSessionOptionsConfiguration extends OptionsConfiguration<KieSessionOption, SingleValueKieSessionOption, MultiValueKieSessionOption> { }
apache/incubator-kie-kogito-examples
1,050
kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.dmn.pmml.quarkus.example; import io.quarkus.test.junit.QuarkusIntegrationTest; @QuarkusIntegrationTest public class NativeDecisionTreeIT extends DecisionTreeTest { // Execute the same tests but in native mode. }
apache/incubator-kie-kogito-runtimes
1,096
kogito-test-utils/src/main/java/org/kie/kogito/testcontainers/Constants.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.testcontainers; import java.time.Duration; public class Constants { public static final Duration CONTAINER_START_TIMEOUT = Duration.ofMinutes(15); public static final String CONTAINER_NAME_PREFIX = "container.image."; private Constants() { } }
apache/incubator-kie-kogito-runtimes
1,106
api/kogito-api/src/main/java/org/kie/kogito/event/EventDispatcher.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.kie.kogito.event; import java.util.concurrent.CompletionStage; import org.kie.kogito.Model; import org.kie.kogito.process.ProcessInstance; public interface EventDispatcher<M extends Model, D> { CompletionStage<ProcessInstance<M>> dispatch(String trigger, DataEvent<D> event); }
apache/incubator-tez
1,103
tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopRequest.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with this * work for additional information regarding copyright ownership. The ASF * licenses this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.apache.tez.dag.app.rm.container; import org.apache.hadoop.yarn.api.records.ContainerId; public class AMContainerEventStopRequest extends AMContainerEvent { public AMContainerEventStopRequest(ContainerId containerId) { super(containerId, AMContainerEventType.C_STOP_REQUEST); } }
apache/inlong
1,109
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/plugin/Stage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.inlong.agent.plugin; import org.apache.inlong.agent.conf.JobProfile; /** * Stage definition. */ public interface Stage { /** * Init job. * * @param jobConf job config */ void init(JobProfile jobConf); /** * Destroy job. */ void destroy(); }
apache/iotdb
1,054
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/exception/IllegalCompactionPerformerException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.db.storageengine.dataregion.compaction.execute.exception; public class IllegalCompactionPerformerException extends RuntimeException { public IllegalCompactionPerformerException(String msg) { super(msg); } }
apache/iotdb
1,085
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/pipe/sink/payload/airgap/AirGapOneByteResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.iotdb.commons.pipe.sink.payload.airgap; public class AirGapOneByteResponse { public static final byte[] OK = new byte[] {0}; public static final byte[] FAIL = new byte[] {(byte) 0xFF}; private AirGapOneByteResponse() { // Utility class } }
apache/jackrabbit-oak
1,099
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/IndexSelectionPolicy.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.jackrabbit.oak.plugins.index; /** * This class defines the index selection policy constants */ public final class IndexSelectionPolicy { /** * Only queries using tags matching the index can use the index */ public static final String TAG = "tag"; }
apache/jena
1,115
jena-permissions/src/main/java/org/apache/jena/permissions/model/SecuredResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.permissions.model; import org.apache.jena.rdf.model.*; /** * The interface for secured Resource instances. * * Use a secured Model to create instances. * @deprecated To be removed. */ @Deprecated(forRemoval = true) public interface SecuredResource extends Resource, SecuredRDFNode { }
apache/jena
1,118
jena-shacl/src/main/java/org/apache/jena/shacl/validation/event/ValidationEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.shacl.validation.event; import org.apache.jena.shacl.engine.ValidationContext; /** * All events during SHACL validation implement this interface, providing access to the {@link ValidationContext}. */ public interface ValidationEvent { ValidationContext getValidationContext(); }
apache/jena
1,128
jena-arq/src/main/java/org/apache/jena/sparql/function/library/now.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.sparql.function.library; //import org.apache.commons.logging.*; import org.apache.jena.sparql.ARQConstants; /** Function that accesses the current time (the time the query started). */ public class now extends SystemVar { public now() { super(ARQConstants.sysCurrentTime); } }
apache/jena
1,129
jena-arq/src/main/java/org/apache/jena/riot/lang/StreamRDFCounting.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.riot.lang; import org.apache.jena.riot.system.StreamRDF ; /** Provide counts of triples/quads/tuples */ public interface StreamRDFCounting extends StreamRDF { /** Count of triples, quads or tuples */ public long count() ; public long countTriples() ; public long countQuads() ; }
apache/jena
1,132
jena-arq/src/main/java/org/apache/jena/rdfs/sys/InitRDFS.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jena.rdfs.sys; import org.apache.jena.sys.JenaSubsystemLifecycle; public class InitRDFS implements JenaSubsystemLifecycle { @Override public void start() { SysRDFS.init(); } @Override public void stop() {} @Override public int level() { return 60 ; } }
apache/kylin
1,086
src/core-common/src/main/java/org/apache/kylin/common/persistence/transaction/AuditLogBroadcastEventNotifier.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.common.persistence.transaction; import lombok.EqualsAndHashCode; @EqualsAndHashCode public class AuditLogBroadcastEventNotifier extends BroadcastEventReadyNotifier { @Override public boolean needBroadcastSelf() { return false; } }
apache/kylin
1,110
src/modeling-service/src/main/java/org/apache/kylin/rest/service/ModelChangeSupporter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.service; public interface ModelChangeSupporter { void onUpdate(String project, String modelId); void onUpdateSingle(String project, String modelId); int getGaugeSize(String project, String modelId); int getRecItemSize(String project, String modelId); }
apache/kylin
1,120
src/tool/src/main/java/org/apache/kylin/rest/response/ServerInfoResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.rest.response; import java.io.Serializable; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class ServerInfoResponse implements Serializable { private String host; private String mode; }
apache/linkis
1,084
linkis-public-enhancements/linkis-ps-common-lock/src/test/java/org/apache/linkis/publicservice/common/lock/Scan.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.linkis.publicservice.common.lock; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.mybatis.spring.annotation.MapperScan; @EnableAutoConfiguration @MapperScan(" org.apache.linkis.publicservice.common.lock") public class Scan {}
apache/logging-log4j2
1,107
log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/NotANumber.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.logging.log4j.core.pattern; /** * */ public final class NotANumber { public static final NotANumber NAN = new NotANumber(); public static final String VALUE = "\u0000"; private NotANumber() {} @Override public String toString() { return VALUE; } }
apache/maven-compiler-plugin
1,089
src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.issue; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.SOURCE) public @interface SimpleAnnotation {}
apache/maven-mvnd
1,129
daemon/src/main/java/org/mvndaemon/mvnd/cache/CacheFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.mvndaemon.mvnd.cache; /** * A factory for cache objects */ public interface CacheFactory { /** * @param <K> the type of {@link Cache} keys * @param <V> the type of {@link Cache} values * @return a new {@link Cache} */ <K, V extends CacheRecord> Cache<K, V> newCache(); }
apache/maven-plugins
1,088
maven-jlink-plugin/src/it/projects/setup-jar-module-info/src/main/java/myproject/HelloWorld.java
package myproject; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * The classic Hello World App. */ public class HelloWorld { /** * Main method. * * @param args Not used */ public static void main( String[] args ) { System.out.println( "Hello World from base jar file." ); } }
apache/maven-resolver
1,097
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultPathProcessor.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.eclipse.aether.internal.impl; import javax.inject.Named; import javax.inject.Singleton; import org.eclipse.aether.spi.io.PathProcessorSupport; /** * Exposing path processor (from SPI). */ @Singleton @Named public class DefaultPathProcessor extends PathProcessorSupport {}
apache/metron
1,063
metron-platform/metron-indexing/metron-indexing-common/src/main/java/org/apache/metron/indexing/dao/update/OriginalNotFoundException.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.metron.indexing.dao.update; public class OriginalNotFoundException extends Exception { public OriginalNotFoundException(String s) { super(s); } public OriginalNotFoundException(String s, Exception e) { super(s, e); } }
apache/myfaces
1,131
api/src/main/java/jakarta/faces/component/html/_RoleProperty.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.component.html; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty; interface _RoleProperty { /** * HTML: An advisory title for this element. Often used by the user agent as a tooltip. * */ @JSFProperty public abstract String getRole(); }
apache/nifi
1,047
nifi-framework-bundle/nifi-framework-extensions/nifi-questdb-bundle/nifi-questdb/src/main/java/org/apache/nifi/questdb/embedded/ConditionFailedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.questdb.embedded; import org.apache.nifi.questdb.DatabaseException; final class ConditionFailedException extends DatabaseException { ConditionFailedException(final String message) { super(message); } }
apache/nifi
1,077
nifi-extension-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/exception/SNMPException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.snmp.exception; public class SNMPException extends RuntimeException { public SNMPException(final String errorMessage) { super(errorMessage); } public SNMPException(final Exception exception) { super(exception); } }
apache/olingo-odata4
1,085
lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AsyncRequestException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.core.communication.request; public class AsyncRequestException extends RuntimeException { private static final long serialVersionUID = -6080844898544654406L; public AsyncRequestException(final String message) { super(message); } }
apache/olingo-odata4
1,095
lib/server-api/src/main/java/org/apache/olingo/server/api/uri/queryoption/QueryOption.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.server.api.uri.queryoption; /** * Super interface used for any query option */ public interface QueryOption { /** * @return Name of query option */ public String getName(); /** * @return Value of query option */ public String getText(); }
apache/openjpa
1,116
openjpa-lib/src/test/java/org/apache/openjpa/lib/rop/TestSimpleResultList.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.lib.rop; /** * Tests the {@link SimpleResultList}. * * @author Abe White */ public class TestSimpleResultList extends ResultListTest { @Override protected ResultList getResultList(ResultObjectProvider provider) { return new SimpleResultList(provider); } }
apache/openmeetings
1,103
openmeetings-web/src/main/java/org/apache/openmeetings/web/user/OmWysiwygToolbar.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License") + you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openmeetings.web.user; import org.wicketstuff.jquery.ui.plugins.wysiwyg.toolbar.DefaultWysiwygToolbar; public class OmWysiwygToolbar extends DefaultWysiwygToolbar { private static final long serialVersionUID = 1L; public OmWysiwygToolbar(String id) { super(id); } }
apache/opennlp
1,097
opennlp-core/opennlp-runtime/src/test/java/opennlp/tools/util/featuregen/IdentityFeatureGenerator.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.tools.util.featuregen; import java.util.List; public class IdentityFeatureGenerator implements AdaptiveFeatureGenerator { public void createFeatures(List<String> features, String[] tokens, int index, String[] previousOutcomes) { features.add(tokens[index]); } }
apache/paimon-webui
1,096
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/dto/RoleWithUserDTO.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.web.server.data.dto; import lombok.Data; import java.util.List; /** DTO of role user relation. */ @Data public class RoleWithUserDTO { private Integer roleId; private String username; private String mobile; private List<Integer> userIds; }
apache/paimon
1,113
paimon-common/src/test/resources/codesplit/add-boolean/code/TestNotRewrite.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public class TestNotRewrite { public void fun1(int[] a, int[] b) { a[0] += b[1]; b[1] += a[1]; a[1] += b[2]; b[2] += a[3]; a[3] += b[4]; } public void fun2() { return; } public void fun3(int a) { a += 5; return; } }
apache/phoenix
1,119
phoenix-core-client/src/main/java/org/apache/phoenix/parse/UnaryParseNode.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.phoenix.parse; import java.util.Collections; /** * Abstract node representing an expression that has a single child in SQL * @since 0.1 */ public abstract class UnaryParseNode extends CompoundParseNode { UnaryParseNode(ParseNode expr) { super(Collections.singletonList(expr)); } }
apache/polygene-java
1,075
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/grammar/common/datatypes/BigInt.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.library.sql.generator.grammar.common.datatypes; /** * This class represents the {@code BIGINT} type (typically 64-bit integer). * * @author Stanislav Muhametsin */ public interface BigInt extends SQLDataType { }
apache/polygene-java
1,094
tutorials/services/src/test/java/org/apache/polygene/tutorials/services/step1/LibraryTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.tutorials.services.step1; import org.junit.Test; public class LibraryTest { @Test public void testLibrary() throws Exception { Consumer consumer = new Consumer( new Library() ); consumer.run(); } }
apache/qpid-broker-j
1,098
broker-core/src/main/java/org/apache/qpid/server/store/preferences/UserPreferencesCreator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.store.preferences; import org.apache.qpid.server.model.ConfiguredObject; import org.apache.qpid.server.model.preferences.UserPreferences; public interface UserPreferencesCreator { UserPreferences createUserPreferences(ConfiguredObject<?> object); }
apache/qpid-broker-j
1,103
broker-core/src/main/java/org/apache/qpid/server/message/MessageDeletedException.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.message; public class MessageDeletedException extends RuntimeException { MessageDeletedException(final long messageNumber) { super("The message with id " + messageNumber + " has already been deleted, no new reference can be taken"); } }
apache/reef
1,091
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/bgd/parameters/AllCommunicationGroup.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.examples.group.bgd.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Communication group name. */ @NamedParameter() public final class AllCommunicationGroup implements Name<String> { }
apache/reef
1,112
lang/java/reef-common/src/main/java/org/apache/reef/util/logging/LogLevelName.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.util.logging; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Name of a log Level as a string such as "INFO", "FINE". */ @NamedParameter(default_value = "FINE") public class LogLevelName implements Name<String> { }
apache/rocketmq-eventbridge
1,077
adapter/rpc/src/main/java/org/apache/rocketmq/eventbridge/adapter/rpc/impl/connect/dto/TransformRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.eventbridge.adapter.rpc.impl.connect.dto; import java.util.Map; import lombok.AllArgsConstructor; import lombok.Data; @AllArgsConstructor public @Data class TransformRequest { private String name; private Map<String, Object> config; }
apache/servicecomb-fence
1,098
resource-server/src/main/java/org/apache/servicecomb/fence/resource/FileStoreService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.fence.resource; import org.springframework.web.multipart.MultipartFile; /** * file storage service, can implement using file system, OBS, etc. */ public interface FileStoreService { String uploadFile(MultipartFile file); boolean deleteFile(String id); }
apache/servicecomb-toolkit
1,057
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/InfoDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.InfoDiffValidator; public interface InfoDiffValidatorFactory extends OasObjectDiffValidatorFactory<InfoDiffValidator> { }
apache/servicecomb-toolkit
1,057
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/LinkDiffValidatorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.toolkit.oasv.diffvalidation.factory; import org.apache.servicecomb.toolkit.oasv.diffvalidation.api.LinkDiffValidator; public interface LinkDiffValidatorFactory extends OasObjectDiffValidatorFactory<LinkDiffValidator> { }
apache/shenyu
1,119
shenyu-admin/src/test/java/org/apache/shenyu/admin/model/vo/AppAuthVOTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.admin.model.vo; import org.apache.shenyu.admin.AbstractReflectGetterSetterTest; /** * Test case for AppAuthVO. */ public final class AppAuthVOTest extends AbstractReflectGetterSetterTest { @Override protected Class<?> getTargetClass() { return AppAuthVO.class; } }
apache/shindig
1,125
java/common/src/main/java/org/apache/shindig/common/uri/UriParser.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.shindig.common.uri; /** * An injectable interface for parsing Uris out of String text. */ public interface UriParser { /** * Produces a new Uri from a text representation. * * @param text The text uri. * @return A new Uri, parsed into components. */ Uri parse(String text); }
apache/sis
1,103
endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/Resources_en.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.referencing.internal; /** * Resource in English language. */ public class Resources_en extends Resources { /** * Constructs a new resource bundle loading data from * the resource file of the same name as this class. */ public Resources_en() { } }
apache/sis
1,114
endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/csv/Foliation.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.sis.storage.csv; /** * Appearing order of trajectories. * * @author Martin Desruisseaux (Geomatys) */ enum Foliation { /** * Trajectories are ordered by time. */ TIME, /** * Elements which are parts of one track are ordered by time. */ SEQUENTIAL }
apache/skywalking
1,079
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/metrics/MultiIntValuesHolder.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.core.analysis.metrics; /** * MultiIntValuesHolder always holds a set of int(s). * Deprecated @since 10.0.0, use {@link LabeledValueHolder} instead. */ @Deprecated public interface MultiIntValuesHolder { int[] getValues(); }
apache/solr
1,116
solr/modules/scripting/src/java/org/apache/solr/scripting/xslt/XSLTConstants.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.scripting.xslt; class XSLTConstants { /** Transformer param */ static final String TR = "tr"; static final String CONTEXT_TRANSFORMER_KEY = "xsltwriter.transformer"; static final int XSLT_CACHE_DEFAULT = 60; static final String XSLT_CACHE_PARAM = "xsltCacheLifetimeSeconds"; }
apache/solr
1,127
solr/api/src/java/org/apache/solr/client/api/model/PublicKeyResponse.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.client.api.model; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; public class PublicKeyResponse extends SolrJerseyResponse { @JsonProperty("key") @Schema(description = "The public key of the receiving Solr node.") public String key; }
apache/solr
1,128
solr/core/src/java/org/apache/solr/search/facet/ReadOnlyCountSlotAcc.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.solr.search.facet; import java.io.IOException; /** To be implemented by CountSlotAccs that wish to expose a read-only interface */ interface ReadOnlyCountSlotAcc { public long getCount(int slot); public int compare(int slotA, int slotB); public Object getValue(int slotNum) throws IOException; }
apache/storm
1,115
storm-server/src/main/java/org/apache/storm/scheduler/blacklist/reporters/IReporter.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version * 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package org.apache.storm.scheduler.blacklist.reporters; import java.util.List; import java.util.Map; import java.util.Set; /** * report blacklist to alert system. */ public interface IReporter { void report(String message); void reportBlacklist(String supervisor, List<Map<String, Set<Integer>>> toleranceBuffer); }
apache/stratos
1,058
components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/applications/payload/ApplicationCartridgePayloadData.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.autoscaler.applications.payload; public class ApplicationCartridgePayloadData extends PayloadData { public ApplicationCartridgePayloadData(BasicPayloadData basicPayloadData) { super(basicPayloadData); } }
apache/streampark
1,076
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/mapper/YarnQueueMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.streampark.console.core.mapper; import org.apache.streampark.console.core.entity.YarnQueue; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** Yarn queue mapper definition. */ public interface YarnQueueMapper extends BaseMapper<YarnQueue> { }
apache/streampipes
1,081
streampipes-wrapper-siddhi/src/main/java/org/apache/streampipes/wrapper/siddhi/query/expression/EqualsExpression.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.wrapper.siddhi.query.expression; public class EqualsExpression extends RelationalOperatorExpression { public EqualsExpression(PropertyExpressionBase exp1, PropertyExpressionBase exp2) { super(RelationalOperator.EQUALS, exp1, exp2); } }
apache/struts
1,084
plugins/convention/src/test/java/org/apache/struts2/convention/actions/action/ClassLevelAnnotationsAction.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.convention.actions.action; import org.apache.struts2.convention.annotation.Actions; import org.apache.struts2.convention.annotation.Action; @Actions({ @Action("class1"), @Action("class2") }) public class ClassLevelAnnotationsAction { }
apache/struts
1,098
plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/ActionErrorHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.views.java.simple; public class ActionErrorHandler extends AbstractMessageListHandler { protected String getListExpression() { return "actionErrors"; } @Override protected String getDefaultClass() { return "errorMessage"; } }
apache/syncope
1,103
client/idrepo/enduser/src/main/java/org/apache/syncope/client/enduser/widgets/BaseWidget.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.client.enduser.widgets; import org.apache.wicket.markup.html.panel.Panel; public abstract class BaseWidget extends Panel { private static final long serialVersionUID = -4186604985011430091L; public BaseWidget(final String id) { super(id); } }
apache/tapestry-5
1,080
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/TextFieldWrapperTypeDemo.java
// Copyright 2008 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.pages; import org.apache.tapestry5.annotations.Persist; public class TextFieldWrapperTypeDemo { @Persist private Integer count; public Integer getCount() { return count; } public void setCount(Integer count) { this.count = count; } public boolean isCountNull() { return count == null; } void onActionFromClear() { count = null; } }
apache/tapestry-5
1,087
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/test/internal/TooManyContributionParametersModule.java
// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.ioc.test.internal; import org.apache.tapestry5.commons.Configuration; import org.apache.tapestry5.commons.OrderedConfiguration; import org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl; /** * Used by {@link org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl}. */ public class TooManyContributionParametersModule { public void contributeTooMany(Configuration configuration1, OrderedConfiguration configuration2) { } }
apache/tapestry-5
1,128
plastic/src/main/java/org/apache/tapestry5/plastic/Opcodes.java
// Copyright 2011 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.plastic; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** Used to document the {@link InstructionBuilder} and {@link TryCatchBlock} */ @Documented @Target( { METHOD }) @Retention(RetentionPolicy.SOURCE) public @interface Opcodes { /** Describes the Opcodes that may be emitted by this method. */ String value(); }
apache/tika
1,098
tika-pipes/tika-pipes-core/src/main/java/org/apache/tika/pipes/core/fetcher/FetcherStringException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tika.pipes.core.fetcher; import org.apache.tika.exception.TikaException; /** * If something goes wrong in parsing the fetcher string */ public class FetcherStringException extends TikaException { public FetcherStringException(String msg) { super(msg); } }
apache/tinkerpop
1,097
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/TranslatorException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tinkerpop.gremlin.language.translator; /** * Exception produced by the {@link Translator} when it encounters an error. */ public class TranslatorException extends RuntimeException { public TranslatorException(final String message) { super(message); } }
apache/tomcat
1,105
modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementCacheMBean.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.jdbc.pool.interceptor; import java.util.concurrent.atomic.AtomicInteger; public interface StatementCacheMBean { boolean isCachePrepared(); boolean isCacheCallable(); int getMaxCacheSize(); AtomicInteger getCacheSize(); int getCacheSizePerConnection(); }
apache/tomee
1,109
examples/connector-war/src/main/java/org/superbiz/connector/api/SampleConnectionFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.superbiz.connector.api; import jakarta.resource.Referenceable; import jakarta.resource.ResourceException; import java.io.Serializable; public interface SampleConnectionFactory extends Serializable, Referenceable { public SampleConnection getConnection() throws ResourceException; }
apache/tomee
1,112
examples/injection-of-ejbs/src/main/java/org/superbiz/injection/DataStoreRemote.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.injection; import jakarta.ejb.Remote; /** * This is an EJB 3 remote business interface * A remote business interface must be annotated with the @Remote * annotation */ //START SNIPPET: code @Remote public interface DataStoreRemote { public String getData(); } //END SNIPPET: code
apache/tomee
1,120
container/openejb-core/src/main/java/org/apache/openejb/testing/WebResource.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.testing; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface WebResource { String[] value(); }
apache/trafodion
1,121
core/conn/trafci/src/main/java/org/trafodion/ci/QueryUtils.java
// @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // @@@ END COPYRIGHT @@@ package org.trafodion.ci; public class QueryUtils { QueryUtils() { } public boolean isGetStatsCmd(Query qryObj) { if (qryObj.getQueryText().matches("(?i)(?s)get\\s+statistics.*") ) return true; return false; } }
apache/tsfile
1,113
java/tsfile/src/main/java/org/apache/tsfile/common/regexp/pattern/Literal.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tsfile.common.regexp.pattern; public class Literal implements Pattern { private final String value; public Literal(String value) { this.value = value; } public String getValue() { return value; } @Override public String toString() { return value; } }
apache/uima-uimaj
1,115
uimaj-core/src/main/java/org/apache/uima/internal/util/ComparableIntIterator.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.internal.util; /** * Interface for a comparable IntListIterator. Two IntIterators are compared according to the * element that would be returned by the next call to next(). */ public interface ComparableIntIterator extends IntListIterator, Comparable { // Empty interface }
apache/uima-uimaj
1,118
uimaj-core/src/main/java/org/apache/uima/cas/impl/DoubleArrayFSImpl.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.uima.cas.impl; import org.apache.uima.cas.DoubleArrayFS; /** * V2 compatibility only The non-JCas cover class for Double Array * * @deprecated use DoubleArray instead * @forRemoval 4.0.0 */ @Deprecated(since = "3.0.0") public interface DoubleArrayFSImpl extends DoubleArrayFS { }
apache/uniffle
1,102
coordinator/src/main/java/org/apache/uniffle/coordinator/web/request/DecommissionRequest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.coordinator.web.request; import java.util.Set; public class DecommissionRequest { private Set<String> serverIds; public Set<String> getServerIds() { return serverIds; } public void setServerIds(Set<String> serverIds) { this.serverIds = serverIds; } }
apache/xmlgraphics-batik
1,113
batik-test/src/main/java/org/apache/batik/test/xml/DummyValidTest.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.test.xml; import org.apache.batik.test.AbstractTest; /** * Dummy Test which always passes. Needed for the test infrastructure * validation. * * @author <a href="mailto:vhardy@apache.lorg">Vincent Hardy</a> * @version $Id$ */ public class DummyValidTest extends AbstractTest { }
google-developer-training/android-advanced-starter-apps
1,054
SimpleAccessibility_start/app/src/main/java/com/example/android/simpleaccessibility/MainActivity.java
/* * Copyright (C) 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.simpleaccessibility; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; /** * Main activity. All the functionality of this sample is in * res/layout/activity_main.xml. */ public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
google/binnavi
1,102
src/main/java/com/google/security/zynamics/zylib/general/comparators/LongComparator.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.zylib.general.comparators; import java.io.Serializable; import java.util.Comparator; public class LongComparator implements Comparator<Long>, Serializable { /** * Used for serialization. */ private static final long serialVersionUID = 2814764330420080628L; @Override public int compare(final Long o1, final Long o2) { final long value = o1 - o2; if (value > 0) { return 1; } else if (value < 0) { return -1; } return 0; } }
google/error-prone
1,109
core/src/main/java/com/google/errorprone/refaster/ExpressionTemplateMatch.java
/* * Copyright 2013 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.refaster; import com.sun.tools.javac.tree.JCTree.JCExpression; /** * A complete representation of a match against an {@code ExpressionTemplate}. * * @author lowasser@google.com (Louis Wasserman) */ class ExpressionTemplateMatch extends TemplateMatch { public ExpressionTemplateMatch(JCExpression location, Unifier unifier) { super(location, unifier); } @Override public JCExpression getLocation() { return (JCExpression) super.getLocation(); } }
google/ExoPlayer
1,093
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/DefaultSampleValues.java
/* * Copyright (C) 2016 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.exoplayer2.extractor.mp4; @Deprecated /* package */ final class DefaultSampleValues { public final int sampleDescriptionIndex; public final int duration; public final int size; public final int flags; public DefaultSampleValues(int sampleDescriptionIndex, int duration, int size, int flags) { this.sampleDescriptionIndex = sampleDescriptionIndex; this.duration = duration; this.size = size; this.flags = flags; } }
google/googletv-android-samples
1,099
LeftNavBarDemo/src/com/example/google/tv/leftnavbar/demo/BaseActivity.java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.google.tv.leftnavbar.demo; import android.app.Activity; import android.widget.Toast; /** * Collection of utilities for activities of this app. */ public class BaseActivity extends Activity { protected boolean mMessagesEnabled; /** * Shows a message to the user. */ protected void postMessage(String message) { if (mMessagesEnabled) { Toast.makeText(this, message, Toast.LENGTH_SHORT).show(); } } }
google/j2cl
1,095
junit/generator/javatests/com/google/j2cl/junit/integration/async/data/TestWithExpectedException.java
/* * Copyright 2015 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.google.j2cl.junit.integration.async.data; import com.google.j2cl.junit.async.AsyncTestRunner; import com.google.j2cl.junit.integration.testing.async.Thenable; import org.junit.Test; import org.junit.runner.RunWith; /** Test processing for test with expected exception */ @RunWith(AsyncTestRunner.class) public class TestWithExpectedException { @SuppressWarnings("TestExceptionChecker") @Test(timeout = 200, expected = Exception.class) public Thenable test() { return null; } }
google/nomulus
1,115
core/src/main/java/google/registry/persistence/converter/CurrencyUnitConverter.java
// Copyright 2019 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.persistence.converter; import jakarta.persistence.Converter; import javax.annotation.Nullable; import org.joda.money.CurrencyUnit; /** JPA converter for {@link CurrencyUnit}s. */ @Converter(autoApply = true) public class CurrencyUnitConverter extends ToStringConverterBase<CurrencyUnit> { @Override @Nullable public CurrencyUnit convertToEntityAttribute(@Nullable String columnValue) { return (columnValue == null) ? null : CurrencyUnit.of(columnValue); } }
google/nomulus
1,120
core/src/main/java/google/registry/model/domain/rgp/RgpUpdateExtension.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.model.domain.rgp; import google.registry.model.ImmutableObject; import google.registry.model.eppinput.EppInput.CommandExtension; import jakarta.xml.bind.annotation.XmlRootElement; /** The EPP RGP extension that may be present on domain update commands. */ @XmlRootElement(name = "update") public class RgpUpdateExtension extends ImmutableObject implements CommandExtension { RestoreCommand restore; public RestoreCommand getRestoreCommand() { return restore; } }
google/nomulus
1,136
core/src/test/java/google/registry/tmch/TmchTestSuite.java
// Copyright 2017 The Nomulus Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package google.registry.tmch; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; /** Convenience class to run all TMCH tests inside IDE with one keystroke. */ @RunWith(Suite.class) @SuiteClasses({ NordnUploadAction.class, NordnVerifyAction.class, SmdrlCsvParserTest.class, TmchCertificateAuthorityTest.class, TmchCrlActionTest.class, TmchDnlActionTest.class, TmchSmdrlActionTest.class, TmchXmlSignatureTest.class, }) class TmchTestSuite {}
googleads/google-ads-java
1,085
google-ads-stubs-v19/src/main/java/com/google/ads/googleads/v19/common/AppDeepLinkAssetOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v19/common/asset_types.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v19.common; public interface AppDeepLinkAssetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v19.common.AppDeepLinkAsset) com.google.protobuf.MessageOrBuilder { /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The appDeepLinkUri. */ java.lang.String getAppDeepLinkUri(); /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The bytes for appDeepLinkUri. */ com.google.protobuf.ByteString getAppDeepLinkUriBytes(); }
googleads/google-ads-java
1,085
google-ads-stubs-v20/src/main/java/com/google/ads/googleads/v20/common/AppDeepLinkAssetOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v20/common/asset_types.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v20.common; public interface AppDeepLinkAssetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v20.common.AppDeepLinkAsset) com.google.protobuf.MessageOrBuilder { /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The appDeepLinkUri. */ java.lang.String getAppDeepLinkUri(); /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The bytes for appDeepLinkUri. */ com.google.protobuf.ByteString getAppDeepLinkUriBytes(); }
googleads/google-ads-java
1,085
google-ads-stubs-v21/src/main/java/com/google/ads/googleads/v21/common/AppDeepLinkAssetOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v21/common/asset_types.proto // Protobuf Java Version: 3.25.7 package com.google.ads.googleads.v21.common; public interface AppDeepLinkAssetOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v21.common.AppDeepLinkAsset) com.google.protobuf.MessageOrBuilder { /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The appDeepLinkUri. */ java.lang.String getAppDeepLinkUri(); /** * <pre> * The uri for the app deep link, The uri can be either a * custom scheme uri (e.g. mystore://shoes) or universal uri (e.g. * http://www.mystore.com/shoes). * </pre> * * <code>string app_deep_link_uri = 1;</code> * @return The bytes for appDeepLinkUri. */ com.google.protobuf.ByteString getAppDeepLinkUriBytes(); }
googleads/googleads-java-lib
1,088
modules/dfp_axis/src/test/java/com/google/api/ads/admanager/axis/testing/ReportProvider.java
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.admanager.axis.testing; import java.net.URL; /** * Provides a sample report for the Ad Manager API. */ public final class ReportProvider { public static final URL TEST_REPORT_RESOURCE = getTestReportResource("test_report.xml"); /** * Get the resource URL for a test report given the resource name. */ private static URL getTestReportResource(String resourceName) { return ReportProvider.class.getResource(resourceName); } }
googleapis/google-cloud-java
1,028
java-financialservices/proto-google-cloud-financialservices-v1/src/main/java/com/google/cloud/financialservices/v1/ExportRegisteredPartiesResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/financialservices/v1/instance.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.financialservices.v1; public interface ExportRegisteredPartiesResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.financialservices.v1.ExportRegisteredPartiesResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/google-cloud-java
1,038
java-document-ai/proto-google-cloud-document-ai-v1beta3/src/main/java/com/google/cloud/documentai/v1beta3/DeployProcessorVersionResponseOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/documentai/v1beta3/document_processor_service.proto // Protobuf Java Version: 3.25.8 package com.google.cloud.documentai.v1beta3; public interface DeployProcessorVersionResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.documentai.v1beta3.DeployProcessorVersionResponse) com.google.protobuf.MessageOrBuilder {}
googleapis/sdk-platform-java
1,074
gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/ServiceStubClassComposer.java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.generator.gapic.composer.grpc; import com.google.api.generator.gapic.composer.common.AbstractServiceStubClassComposer; public class ServiceStubClassComposer extends AbstractServiceStubClassComposer { private static final ServiceStubClassComposer INSTANCE = new ServiceStubClassComposer(); protected ServiceStubClassComposer() { super(GrpcContext.instance()); } public static ServiceStubClassComposer instance() { return INSTANCE; } }
googleapis/sdk-platform-java
1,074
gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/rest/ServiceStubClassComposer.java
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.api.generator.gapic.composer.rest; import com.google.api.generator.gapic.composer.common.AbstractServiceStubClassComposer; public class ServiceStubClassComposer extends AbstractServiceStubClassComposer { private static final ServiceStubClassComposer INSTANCE = new ServiceStubClassComposer(); protected ServiceStubClassComposer() { super(RestContext.instance()); } public static ServiceStubClassComposer instance() { return INSTANCE; } }
googlesamples/io2014-codelabs
1,047
android-actions/simulator/actions-simulator/app/src/main/java/com/google/developers/actions/debugger/util/CayleyResult.java
/* * Copyright (c) 2014 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.developers.actions.debugger.util; public class CayleyResult { private Result[] result; public boolean isEmpty() { if (result != null) { return (result.length == 0); } return true; } public Result getResult(int index) { return result[0]; } public class Result { private String id; public String getId() { return id; } } }
googleworkspace/java-samples
1,122
drive/snippets/drive_v2/src/test/java/TestFetchChanges.java
/* * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import java.io.IOException; import org.junit.Test; public class TestFetchChanges extends BaseTest { @Test public void fetchChanges() throws IOException { String startPageToken = FetchStartPageToken.fetchStartPageToken(); this.createTestBlob(); String newStartPageToken = FetchChanges.fetchChanges(startPageToken); assertNotNull(newStartPageToken); assertNotEquals(startPageToken, newStartPageToken); } }
hibernate/hibernate-orm
1,050
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/entity/LocalContactDetails.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.entity; import jakarta.persistence.Convert; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; /** * @author Sharath Reddy * */ @Entity public class LocalContactDetails { @Id @GeneratedValue private int id; private PhoneNumber localPhoneNumber; @Convert( converter = PhoneNumberConverter.class ) private OverseasPhoneNumber overseasPhoneNumber; public int getId() { return id; } public void setId(int id) { this.id = id; } public PhoneNumber getLocalPhoneNumber() { return localPhoneNumber; } public void setLocalPhoneNumber(PhoneNumber localPhoneNumber) { this.localPhoneNumber = localPhoneNumber; } public OverseasPhoneNumber getOverseasPhoneNumber() { return overseasPhoneNumber; } public void setOverseasPhoneNumber(OverseasPhoneNumber overseasPhoneNumber) { this.overseasPhoneNumber = overseasPhoneNumber; } }
hibernate/hibernate-orm
1,058
hibernate-core/src/test/java/org/hibernate/orm/test/annotations/id/entities/Dog.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.annotations.id.entities; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.Table; import jakarta.persistence.TableGenerator; /** * Share the generator table decribed by the GEN_TABLE GeneratedIdTable * using the Dog key as discriminator * * @author Emmanuel Bernard */ @Entity @Table(name = "tbl_dog") @TableGenerator(name = "DogGen", table = "GENERATOR_TABLE", pkColumnName = "pkey", valueColumnName = "hi", pkColumnValue = "Dog", allocationSize = 10) public class Dog { private Integer id; private String name; @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "DogGen") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
hibernate/hibernate-orm
1,071
hibernate-core/src/test/java/org/hibernate/bytecode/internal/bytebuddy/GenerateProxiesTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.bytecode.internal.bytebuddy; import static org.junit.Assert.assertNotNull; import java.lang.reflect.InvocationTargetException; import org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper; import org.junit.Test; public class GenerateProxiesTest { @Test public void generateBasicProxy() { BasicProxyFactoryImpl basicProxyFactory = new BasicProxyFactoryImpl( SimpleEntity.class, null, new ByteBuddyState() ); assertNotNull( basicProxyFactory.getProxy() ); } @Test public void generateProxy() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { ByteBuddyProxyHelper byteBuddyProxyHelper = new ByteBuddyProxyHelper( new ByteBuddyState() ); Class<?> proxyClass = byteBuddyProxyHelper.buildProxy( SimpleEntity.class, new Class<?>[0] ); assertNotNull( proxyClass ); assertNotNull( proxyClass.getConstructor().newInstance() ); } }
hibernate/hibernate-orm
1,099
hibernate-core/src/main/java/org/hibernate/jdbc/WorkExecutorVisitable.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.jdbc; import java.sql.Connection; import java.sql.SQLException; /** * This interface provides a way to execute unrelated "work" objects using * polymorphism. * * Instances of this interface can accept a {@link WorkExecutor} visitor * for executing a discrete piece of work, and return an implementation-defined * result. * * @author Gail Badner */ public interface WorkExecutorVisitable<T> { /** * Accepts a {@link WorkExecutor} visitor for executing a discrete * piece of work, and returns an implementation-defined result.. * * @param executor The visitor that executes the work. * @param connection The connection on which to perform the work. * * @return an implementation-defined result * * @throws SQLException Thrown during execution of the underlying JDBC interaction. * @throws org.hibernate.HibernateException Generally indicates a wrapped SQLException. */ T accept(WorkExecutor<T> executor, Connection connection) throws SQLException; }
hibernate/hibernate-orm
1,103
hibernate-core/src/main/java/org/hibernate/annotations/GeneratedColumn.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.annotations; import org.hibernate.generator.internal.GeneratedAlwaysGeneration; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Specifies that a column is defined using a DDL {@code generated always as} * clause or equivalent, and that Hibernate should fetch the generated value * from the database after each SQL {@code INSERT} or {@code UPDATE}. * * @see ColumnDefault * * @since 6.0 * @author Gavin King * * @see DialectOverride.GeneratedColumn */ @ValueGenerationType( generatedBy = GeneratedAlwaysGeneration.class ) @Target( {FIELD, METHOD} ) @Retention( RUNTIME ) public @interface GeneratedColumn { /** * The expression to include in the generated DDL. * * @return the SQL expression that is evaluated to generate the column value. */ String value(); }
hibernate/hibernate-orm
1,113
hibernate-core/src/main/java/org/hibernate/mapping/GeneratorSettings.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.mapping; import org.hibernate.Incubating; import org.hibernate.boot.model.relational.SqlStringGenerationContext; import org.hibernate.dialect.Dialect; /** * Exposes the default catalog and schema to the * {@linkplain KeyValue#createGenerator(Dialect, RootClass, Property, GeneratorSettings) * generator creation process}. The defaults specified here are ultimately * passed to the {@linkplain org.hibernate.generator.Generator generator} * itself via the {@link org.hibernate.generator.GeneratorCreationContext}. * * @see org.hibernate.cfg.MappingSettings#DEFAULT_CATALOG * @see org.hibernate.cfg.MappingSettings#DEFAULT_SCHEMA * @see org.hibernate.boot.spi.SessionFactoryOptions#getDefaultCatalog() * @see org.hibernate.boot.spi.SessionFactoryOptions#getDefaultSchema() * * @since 7 * * @author Gavin King */ @Incubating public interface GeneratorSettings { String getDefaultCatalog(); String getDefaultSchema(); SqlStringGenerationContext getSqlStringGenerationContext(); }