repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/incubator-heron
1,149
heron/api/src/java/org/apache/heron/api/state/HashMapState.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.heron.api.state; import java.io.Serializable; import java.util.HashMap; /** * A State backed up by HashMap */ public class HashMapState<K extends Serializable, V extends Serializable> extends HashMap<K, V> implements State<K, V> { private static final long serialVersionUID = -6152858128057246318L; }
apache/incubator-hivemall
1,149
core/src/test/java/hivemall/tools/math/NanUDFTest.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 hivemall.tools.math; import org.junit.Assert; import org.junit.Before; import org.junit.Test; public class NanUDFTest { private NanUDF udf; @Before public void setUp() { this.udf = new NanUDF(); } @Test public void test() { Assert.assertEquals(true, Double.isNaN(udf.evaluate())); } }
apache/incubator-hugegraph-computer
1,099
computer/computer-core/src/main/java/org/apache/hugegraph/computer/core/store/entry/KvEntryWriter.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.hugegraph.computer.core.store.entry; import java.io.IOException; import org.apache.hugegraph.computer.core.io.Writable; public interface KvEntryWriter { void writeSubKv(Writable subKey, Writable subValue) throws IOException; void writeFinish() throws IOException; }
apache/incubator-hugegraph
1,099
hugegraph-store/hg-store-node/src/main/java/org/apache/hugegraph/store/node/grpc/QueryCondition.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.hugegraph.store.node.grpc; /** * 2023/2/8 */ public interface QueryCondition { byte[] getStart(); byte[] getEnd(); byte[] getPrefix(); int getKeyCode(); int getScanType(); byte[] getQuery(); byte[] getPosition(); int getSerialNo(); }
apache/incubator-kie-drools
1,091
drools-reliability/drools-reliability-core/src/main/java/org/drools/reliability/core/ReliabilityRuntimeException.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.drools.reliability.core; public class ReliabilityRuntimeException extends RuntimeException { public ReliabilityRuntimeException(String message) { super(message); } public ReliabilityRuntimeException(Throwable cause) { super(cause); } }
apache/incubator-kie-drools
1,135
kie-api/src/main/java/org/kie/api/event/rule/ObjectUpdatedEvent.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.event.rule; import org.kie.api.definition.rule.Rule; import org.kie.api.runtime.rule.FactHandle; public interface ObjectUpdatedEvent extends RuleRuntimeEvent { public FactHandle getFactHandle(); public Object getOldObject(); public Object getObject(); public Rule getRule(); }
apache/incubator-kie-drools
1,140
kie-api/src/main/java/org/kie/api/definition/KieDefinition.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.definition; /** * Marker interface for all KnowlegeDefinition's */ public interface KieDefinition { public KnowledgeType getKnowledgeType(); public String getNamespace(); public String getId(); public enum KnowledgeType { RULE, TYPE, WINDOW, ENUM, PROCESS, FUNCTION, QUERY } }
apache/incubator-kie-drools
1,148
kie-api/src/main/java/org/kie/api/conf/OptionKey.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.conf; public class OptionKey<T extends Option> { private String type; private String name; public OptionKey(String type, String name) { this.type = type; this.name = name; } public String type() { return type; } public String name() { return name; } }
apache/incubator-kie-kogito-runtimes
1,090
quarkus/addons/rest-exception-handler/src/main/java/org/kie/kogito/resource/exceptions/BaseExceptionMapper.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.resource.exceptions; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; public abstract class BaseExceptionMapper<E extends Throwable> implements ExceptionMapper<E> { @Override public abstract Response toResponse(E e); }
apache/incubator-retired-wave
1,124
wave/src/main/java/org/waveprotocol/wave/communication/proto/ProtoWrapper.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.waveprotocol.wave.communication.proto; import com.google.protobuf.MessageLite; /** * Something that wraps a protocol buffer. * * @author hearnden@google.com (David Hearnden) * @param <P> proto type */ public interface ProtoWrapper<P extends MessageLite> { void setPB(P proto); P getPB(); }
apache/incubator-retired-wave
1,125
wave/src/main/java/org/waveprotocol/box/server/shutdown/ShutdownPriority.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.waveprotocol.box.server.shutdown; /** * Priority determines shutdown order. * * @author akaplanov@gmail.com (A. Kaplanov) */ public enum ShutdownPriority { Server(1), Waves(3), Task(2), Storage(3); final int value; ShutdownPriority(int priority) { this.value = priority; } }
apache/incubator-tuweni
1,155
rlp/src/main/java/org/apache/tuweni/rlp/RLPException.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.tuweni.rlp; /** * Base type for all RLP encoding and decoding exceptions. */ public class RLPException extends RuntimeException { public RLPException(String message) { super(message); } public RLPException(Throwable cause) { super(cause); } public RLPException(String message, Throwable cause) { super(message, cause); } }
apache/incubator-tuweni
1,155
ssz/src/main/java/org/apache/tuweni/ssz/SSZException.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.tuweni.ssz; /** * Base type for all SSZ encoding and decoding exceptions. */ public class SSZException extends RuntimeException { public SSZException(String message) { super(message); } public SSZException(Throwable cause) { super(cause); } public SSZException(String message, Throwable cause) { super(message, cause); } }
apache/inlong
1,119
inlong-sdk/transform-sdk/src/main/java/org/apache/inlong/sdk/transform/process/ValueParserNode.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.sdk.transform.process; import org.apache.inlong.sdk.transform.process.parser.ValueParser; import lombok.AllArgsConstructor; import lombok.Data; /** * ValueParserNode */ @AllArgsConstructor @Data public class ValueParserNode { private String fieldName; private ValueParser parser; }
apache/iotdb
1,129
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/ExternalRPCServiceMBean.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.service; import org.apache.iotdb.commons.exception.StartupException; public interface ExternalRPCServiceMBean { String getRPCServiceStatus(); int getRPCPort(); void startService() throws StartupException; void restartService() throws StartupException; void stopService(); }
apache/jena
1,133
jena-extras/jena-commonsrdf/src/test/java/org/apache/jena/commonsrdf/TestDatasetJena.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.commonsrdf; import org.apache.commons.rdf.api.AbstractDatasetTest; import org.apache.commons.rdf.api.RDF; /** org.apache.commons.rdf.api Dataset tests */ public class TestDatasetJena extends AbstractDatasetTest { @Override public RDF createFactory() { return new JenaRDF(); } }
apache/jmeter
1,117
src/protocol/jdbc/src/main/java/org/apache/jmeter/protocol/jdbc/processor/JDBCPostProcessorBeanInfo.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.jmeter.protocol.jdbc.processor; import org.apache.jmeter.protocol.jdbc.JDBCTestElementBeanInfoSupport; public class JDBCPostProcessorBeanInfo extends JDBCTestElementBeanInfoSupport { /** * */ public JDBCPostProcessorBeanInfo() { super(JDBCPostProcessor.class); } }
apache/jmeter
1,144
src/core/src/main/java/org/apache/jmeter/report/processor/ChannelContext.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.jmeter.report.processor; import java.util.TreeMap; /** * Define a context associated to a sample consumer/producer channel * * @since 3.0 */ public class ChannelContext extends TreeMap<String, Object> { /** The Constant serialVersionUID. */ private static final long serialVersionUID = -3090936623529607644L; }
apache/jmeter
1,157
src/core/src/main/java/org/apache/jmeter/gui/action/Command.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.jmeter.gui.action; import java.awt.event.ActionEvent; import java.util.Set; import org.apache.jmeter.exceptions.IllegalUserActionException; import org.apache.jorphan.reflect.JMeterService; @JMeterService public interface Command { void doAction(ActionEvent e) throws IllegalUserActionException; Set<String> getActionNames(); }
apache/kylin
1,110
src/core-common/src/main/java/org/apache/kylin/common/persistence/transaction/LogicalViewBroadcastNotifier.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.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode public class LogicalViewBroadcastNotifier extends BroadcastEventReadyNotifier { @Override public boolean needBroadcastSelf() { return false; } }
apache/kylin
1,122
src/data-loading-service/src/main/java/org/apache/kylin/rest/request/SegmentMgmtRequest.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.request; import java.util.List; import lombok.Getter; import lombok.Setter; @Getter @Setter public class SegmentMgmtRequest { private String mpValues; private List<String> segments; private String buildType; private boolean force; private String project; }
apache/kylin
1,136
src/common-service/src/main/java/org/apache/kylin/rest/request/S3TableExtInfo.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.request; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class S3TableExtInfo { // format:db.table->uppercase private String name; private String location; @JsonProperty("role_arn") private String roleArn; private String endpoint; }
apache/kylin
1,148
src/core-storage/src/main/java/org/apache/kylin/storage/IStorageQuery.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.storage; import org.apache.kylin.metadata.realization.SQLDigest; import org.apache.kylin.metadata.tuple.ITupleIterator; import org.apache.kylin.metadata.tuple.TupleInfo; /** */ public interface IStorageQuery { ITupleIterator search(StorageContext context, SQLDigest sqlDigest, TupleInfo returnTupleInfo); }
apache/lens
1,140
lens-server/src/main/java/org/apache/lens/server/query/save/SavedQueryApp.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 * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * 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.lens.server.query.save; import javax.ws.rs.ApplicationPath; import org.apache.lens.server.BaseApp; /** * The Class SavedQueryApp. */ @ApplicationPath("/savedquery") public class SavedQueryApp extends BaseApp { @Override protected Class getResource() { return SavedQueryResource.class; } }
apache/linkis
1,112
linkis-public-enhancements/linkis-cs-server/src/main/java/org/apache/linkis/cs/persistence/annotation/Tuning.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.cs.persistence.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface Tuning {}
apache/lucene
1,128
lucene/codecs/src/test/org/apache/lucene/codecs/simpletext/TestSimpleTextStoredFieldsFormat.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.lucene.codecs.simpletext; import org.apache.lucene.codecs.Codec; import org.apache.lucene.tests.index.BaseStoredFieldsFormatTestCase; public class TestSimpleTextStoredFieldsFormat extends BaseStoredFieldsFormatTestCase { @Override protected Codec getCodec() { return new SimpleTextCodec(); } }
apache/manifoldcf
1,095
connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/ResponseException.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.manifoldcf.authorities.authorities.amazons3; /** * @author Kuhajeyan * */ public class ResponseException extends Exception { public ResponseException(String msg) { super(msg); } public ResponseException(String msg, Throwable cause) { super(msg, cause); } }
apache/maven
1,130
its/core-it-suite/src/test/resources/mng-3259/module3/src/test/java/mng/Module3TestUtil.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 mng; import java.util.Calendar; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; public class Module3TestUtil { public static String getCalendarAsXML(Calendar cal) { XStream xstream = new XStream(new DomDriver()); return xstream.toXML(cal); } }
apache/mina-sshd
1,129
sshd-core/src/main/java/org/apache/sshd/common/channel/AbstractChannelRequestHandler.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.sshd.common.channel; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public abstract class AbstractChannelRequestHandler extends AbstractRequestHandler<Channel> implements ChannelRequestHandler { protected AbstractChannelRequestHandler() { super(); } }
apache/mina-sshd
1,136
sshd-common/src/main/java/org/apache/sshd/common/util/buffer/BufferException.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.sshd.common.util.buffer; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public class BufferException extends RuntimeException { private static final long serialVersionUID = 658645233475011039L; public BufferException(String message) { super(message); } }
apache/mina-sshd
1,137
sshd-sftp/src/main/java/org/apache/sshd/sftp/server/DefaultGroupPrincipal.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.sshd.sftp.server; import java.nio.file.attribute.GroupPrincipal; /** * @author <a href="mailto:dev@mina.apache.org">Apache MINA SSHD Project</a> */ public class DefaultGroupPrincipal extends PrincipalBase implements GroupPrincipal { public DefaultGroupPrincipal(String name) { super(name); } }
apache/myfaces
1,129
impl/src/main/java/org/apache/myfaces/resource/FacesFlowClassLoaderResourceLoader.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.myfaces.resource; /** * * @author lu4242 */ public class FacesFlowClassLoaderResourceLoader extends ClassLoaderResourceLoader { private static final String META_INF_FLOWS = "META-INF/flows"; public FacesFlowClassLoaderResourceLoader() { super(META_INF_FLOWS); } }
apache/nifi
1,119
nifi-commons/nifi-utils/src/main/java/org/apache/nifi/stream/io/exception/BytePatternNotFoundException.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.stream.io.exception; import java.io.IOException; public class BytePatternNotFoundException extends IOException { private static final long serialVersionUID = -4128911284318513973L; public BytePatternNotFoundException(final String explanation) { super(explanation); } }
apache/oodt
1,120
curator/services/src/main/java/org/apache/oodt/cas/curation/structs/IngestionTaskStatus.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.oodt.cas.curation.structs; /** * * Met keys for the {@link IngestionTask#getStatus()} field. * * @author mattmann * @version $Revision$ * */ public interface IngestionTaskStatus { String FINISHED = "Finished"; String STARTED = "Started"; String NOT_STARTED = "Not Started"; }
apache/openjpa
1,115
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/XMLCallback.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.persistence.inheritance.entity; /* * XML defined class with no persistent attributes, only a callback. */ public class XMLCallback extends XMLSuperCallback { public transient static int prePersistCount = 0; public void prePersist() { prePersistCount++; } }
apache/openjpa
1,118
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestJDBCGrouping.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.persistence.jdbc.query; import jakarta.persistence.Query; import org.apache.openjpa.persistence.query.GroupingTestCase; public class TestJDBCGrouping extends GroupingTestCase { @Override protected void prepareQuery(Query q) { // nothing to do for JDBC case } }
apache/openjpa
1,134
openjpa-lib/src/test/java/org/apache/openjpa/lib/rop/TestRandomAccessResultList.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 RandomAccessResultList}. * * @author Abe White */ public class TestRandomAccessResultList extends ResultListTest { @Override protected ResultList getResultList(ResultObjectProvider provider) { return new RandomAccessResultList(provider); } }
apache/openjpa
1,144
openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AutoClear.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.kernel; /** * State clearing constants. * * @author Abe White * @since 0.4.0 */ public interface AutoClear { /** * Clear state when entering a datastore transaction. */ int CLEAR_DATASTORE = 0; /** * Clear state when entering any transaction. */ int CLEAR_ALL = 1; }
apache/opennlp
1,118
opennlp-core/opennlp-ml/opennlp-ml-maxent/src/main/java/opennlp/tools/ml/maxent/ContextGenerator.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.ml.maxent; /** * Represents a generator of contexts for maxent decisions. */ public interface ContextGenerator<T> { /** * Builds up the list of contextual predicates given an {@link T object}. * * @param o The {@link T object} used as input. */ String[] getContext(T o); }
apache/openwebbeans
1,124
webbeans-impl/src/test/java/org/apache/webbeans/test/decorators/dependent/MyDestory.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.webbeans.test.decorators.dependent; import org.apache.webbeans.test.component.event.normal.Transactional; public class MyDestory implements IDestroy { public static boolean destroyed = false; @Override @Transactional public void destroy() { destroyed = true; } }
apache/ozhera
1,111
ozhera-webhook/ozhera-webhook-server/src/main/java/org/apache/ozhera/webhook/domain/tpc/TpcEnvRequest.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.ozhera.webhook.domain.tpc; import lombok.Data; import lombok.ToString; /** * @author zhangxiaowei6 * @Date 2024/3/4 17:25 */ @Data @ToString public class TpcEnvRequest { private Long parentId; private Integer type; private Integer status; private String token; }
apache/paimon
1,145
paimon-common/src/main/java/org/apache/paimon/lookup/LookupStoreWriter.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.lookup; import org.apache.paimon.lookup.LookupStoreFactory.Context; import java.io.IOException; /** Writer to prepare binary file. */ public interface LookupStoreWriter { /** Put key value to store. */ void put(byte[] key, byte[] value) throws IOException; Context close() throws IOException; }
apache/parquet-java
1,133
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/mapred/Container.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.parquet.hadoop.mapred; /** * A simple container of objects that you can get and set. * * @param <T> the Java type of the object held by this container */ public class Container<T> { T object; public void set(T object) { this.object = object; } public T get() { return object; } }
apache/parquet-java
1,140
parquet-column/src/main/java/org/apache/parquet/column/ColumnReadStore.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.parquet.column; /** * Container which can produce a ColumnReader for any given column in a schema. */ public interface ColumnReadStore { /** * @param path the column to read * @return the column reader for that descriptor */ public abstract ColumnReader getColumnReader(ColumnDescriptor path); }
apache/pekko
1,122
persistence-query/src/test/java/org/apache/pekko/persistence/query/DummyJavaReadJournalForScala.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * license agreements; and to You under the Apache License, version 2.0: * * https://www.apache.org/licenses/LICENSE-2.0 * * This file is part of the Apache Pekko project, which was derived from Akka. */ /* * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com> */ package org.apache.pekko.persistence.query; import org.apache.pekko.NotUsed; /** Use for tests only! Emits infinite stream of strings (representing queried for events). */ public class DummyJavaReadJournalForScala implements org.apache.pekko.persistence.query.scaladsl.ReadJournal, org.apache.pekko.persistence.query.scaladsl.PersistenceIdsQuery { public static final String Identifier = DummyJavaReadJournal.Identifier; private final DummyJavaReadJournal readJournal; public DummyJavaReadJournalForScala(DummyJavaReadJournal readJournal) { this.readJournal = readJournal; } @Override public org.apache.pekko.stream.scaladsl.Source<String, NotUsed> persistenceIds() { return readJournal.persistenceIds().asScala(); } }
apache/pinot
1,125
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/utils/nativefst/MinMax.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.pinot.segment.local.utils.nativefst; /** * Minimum/maximum and range. */ final class MinMax { public final int _min; public final int _max; MinMax(int min, int max) { _min = Math.min(min, max); _max = Math.max(min, max); } public int range() { return _max - _min; } }
apache/pinot
1,132
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/utils/JavaVersion.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.pinot.segment.spi.utils; import net.openhft.chronicle.core.Jvm; public class JavaVersion { /** * Returns the major Java version (ie 6, 8, 11, 15, 21, etc) */ public static final int VERSION; static { Jvm.init(); VERSION = Jvm.majorVersion(); } private JavaVersion() { } }
apache/plc4x
1,071
code-generation/protocol-base-mspec/src/main/java/org/apache/plc4x/plugins/codegenerator/language/mspec/model/references/DefaultUndefinedTypeReference.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 * * 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 org.apache.plc4x.plugins.codegenerator.language.mspec.model.references; public class DefaultUndefinedTypeReference extends AbstractSimpleTypeReference { public DefaultUndefinedTypeReference() { super(SimpleBaseType.UNDEFINED, -1); } }
apache/polaris
1,119
runtime/service/src/main/java/org/apache/polaris/service/events/listeners/NoOpPolarisEventListener.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.polaris.service.events.listeners; import io.smallrye.common.annotation.Identifier; import jakarta.enterprise.context.ApplicationScoped; /** Event listener that does nothing. */ @ApplicationScoped @Identifier("no-op") public class NoOpPolarisEventListener implements PolarisEventListener {}
apache/polygene-java
1,118
manual/src/main/java/org/apache/polygene/manual/recipes/createEntity/ManufacturerRepository.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.manual.recipes.createEntity; import org.apache.polygene.api.identity.Identity; // START SNIPPET: repo public interface ManufacturerRepository { Manufacturer findByIdentity(Identity identity); Manufacturer findByName(String name); } // END SNIPPET: repo
apache/polygene-java
1,120
extensions/indexing-solr/src/main/java/org/apache/polygene/index/solr/SolrExpressions.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.index.solr; import org.apache.polygene.api.query.grammar.QuerySpecification; /** * TODO */ public class SolrExpressions { public static QuerySpecification search(String queryString) { return new QuerySpecification( "solr", queryString ); } }
apache/polygene-java
1,132
core/api/src/main/java/org/apache/polygene/api/entity/LifecycleException.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.api.entity; /** * Thrown if Lifecycle invocation fails */ public class LifecycleException extends RuntimeException { public LifecycleException() { } public LifecycleException( String message, Throwable cause ) { super( message, cause ); } }
apache/qpid-broker-j
1,137
broker-core/src/main/java/org/apache/qpid/server/model/ContextProvider.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.model; import java.lang.reflect.Type; import java.util.Set; public interface ContextProvider { <T> T getContextValue(Class<T> clazz, String propertyName); <T> T getContextValue(Class<T> clazz, Type t, String propertyName); Set<String> getContextKeys(boolean excludeSystem); }
apache/qpid-broker-j
1,148
bdbstore/src/main/java/org/apache/qpid/server/JECheck.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; public class JECheck { public static boolean isAvailable() { try { Class.forName("com.sleepycat.je.Environment"); return true; } catch (ClassNotFoundException | NoClassDefFoundError e) { return false; } } }
apache/ratis
1,118
ratis-test/src/test/java/org/apache/ratis/server/simulation/TestRaftStateMachineExceptionWithSimulatedRpc.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.ratis.server.simulation; import org.apache.ratis.server.impl.RaftStateMachineExceptionTests; public class TestRaftStateMachineExceptionWithSimulatedRpc extends RaftStateMachineExceptionTests<MiniRaftClusterWithSimulatedRpc> implements MiniRaftClusterWithSimulatedRpc.FactoryGet { }
apache/ratis
1,147
ratis-common/src/main/java/org/apache/ratis/util/function/CheckedSupplier.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.ratis.util.function; /** Supplier with a throws-clause. */ @FunctionalInterface public interface CheckedSupplier<OUTPUT, THROWABLE extends Throwable> { /** * The same as {@link java.util.function.Supplier#get()} * except that this method is declared with a throws-clause. */ OUTPUT get() throws THROWABLE; }
apache/reef
1,105
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/broadcast/parameters/ControlMessageBroadcaster.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.broadcast.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * Control messages broadcaster. */ @NamedParameter() public final class ControlMessageBroadcaster implements Name<String> { }
apache/reef
1,107
lang/java/reef-examples/src/main/java/org/apache/reef/examples/group/broadcast/parameters/FailureProbability.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.broadcast.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * */ @NamedParameter(doc = "Prob(failure)", default_value = "0.1") public class FailureProbability implements Name<Double> { }
apache/reef
1,114
lang/java/reef-runtime-azbatch/src/main/java/org/apache/reef/runtime/azbatch/parameters/AzureBatchPoolId.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.runtime.azbatch.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * The Azure Batch pool ID. */ @NamedParameter(doc = "The Azure Batch pool ID.") public final class AzureBatchPoolId implements Name<String> { }
apache/rocketmq-flink
1,137
src/main/java/org/apache/flink/connector/rocketmq/legacy/RunningChecker.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.flink.connector.rocketmq.legacy; import java.io.Serializable; public class RunningChecker implements Serializable { private volatile boolean isRunning = false; public boolean isRunning() { return isRunning; } public void setRunning(boolean running) { isRunning = running; } }
apache/rocketmq-spring
1,116
rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/annotation/MessageModel.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.spring.annotation; public enum MessageModel { BROADCASTING("BROADCASTING"), CLUSTERING("CLUSTERING"); private final String modeCN; MessageModel(String modeCN) { this.modeCN = modeCN; } public String getModeCN() { return this.modeCN; } }
apache/seatunnel-web
1,113
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/dal/dao/IRoleUserRelationDao.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.seatunnel.app.dal.dao; import org.apache.seatunnel.app.dal.entity.RoleUserRelation; public interface IRoleUserRelationDao { void add(RoleUserRelation roleUserRelation); RoleUserRelation getByUserAndRole(Integer userId, Integer roleId); void deleteByUserId(Integer userId); }
apache/seatunnel
1,081
seatunnel-connectors-v2/connector-iotdb/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdb/serialize/SeaTunnelRowDeserializer.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.seatunnel.connectors.seatunnel.iotdb.serialize; import org.apache.seatunnel.api.table.type.SeaTunnelRow; import org.apache.iotdb.tsfile.read.common.RowRecord; public interface SeaTunnelRowDeserializer { SeaTunnelRow deserialize(RowRecord rowRecord); }
apache/seatunnel
1,124
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableState.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.seatunnel.api.sink.multitablesink; import lombok.AllArgsConstructor; import lombok.Getter; import java.io.Serializable; import java.util.List; import java.util.Map; @Getter @AllArgsConstructor public class MultiTableState implements Serializable { private Map<SinkIdentifier, List<?>> states; }
apache/sentry
1,130
sentry-core/sentry-core-model-solr/src/main/java/org/apache/sentry/core/model/solr/Field.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.sentry.core.model.solr; /** * Represents the field authorizable in the solr model */ public class Field extends SolrModelAuthorizable { /** * Represents all fields */ public static final Field ALL = new Field(SolrConstants.ALL); public Field(String name) { super (AuthorizableType.Field, name); } }
apache/servicecomb-java-chassis
1,060
swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/response/producer/ProducerResponseMapperFactory.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.swagger.invocation.response.producer; import org.apache.servicecomb.swagger.invocation.response.ResponseMapperFactory; public interface ProducerResponseMapperFactory extends ResponseMapperFactory<ProducerResponseMapper> { }
apache/servicecomb-java-chassis
1,063
swagger/swagger-generator/generator-springmvc/src/test/java/org/apache/servicecomb/swagger/generator/springmvc/ClassMethodNoHttpMethod.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.swagger.generator.springmvc; import org.springframework.web.bind.annotation.RequestMapping; @RequestMapping(path = "c") public class ClassMethodNoHttpMethod { @RequestMapping(path = "m") public void noHttpMethod() { } }
apache/servicecomb-toolkit
1,075
oas-validator/oas-validator-core/src/main/java/org/apache/servicecomb/toolkit/oasv/diffvalidation/factory/ComponentsDiffValidatorFactory.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.ComponentsDiffValidator; public interface ComponentsDiffValidatorFactory extends OasObjectDiffValidatorFactory<ComponentsDiffValidator> { }
apache/shenyu
1,137
shenyu-admin/src/test/java/org/apache/shenyu/admin/model/vo/DashboardUserVOTest.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 DashboardUserVO. */ public final class DashboardUserVOTest extends AbstractReflectGetterSetterTest { @Override protected Class<?> getTargetClass() { return DashboardUserVO.class; } }
apache/sis
1,127
incubator/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/isobmff/gimi/package-info.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. */ /** * Boxes defined by <abbr>OGC</abbr> for the use of <abbr>ISO</abbr> <abbr>BMFF</abbr> for storing geospatial data. * At the time of writing this code, this is not yet an approved standard. * * @author Johann Sorel (Geomatys) * @author Martin Desruisseaux (Geomatys) */ package org.apache.sis.storage.isobmff.gimi;
apache/sis
1,133
endorsed/src/org.apache.sis.feature/main/org/apache/sis/geometry/wrapper/jts/package-info.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. */ /** * Methods specific to the Java Topology Suite (JTS). * * <STRONG>Do not use!</STRONG> * * This package is for internal use by SIS only. Classes in this package * may change in incompatible ways in any future version without notice. * * @author Johann Sorel (Geomatys) */ package org.apache.sis.geometry.wrapper.jts;
apache/skywalking
1,080
oap-server/analyzer/event-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/event/listener/IEventAnalyzerListenerManager.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.analyzer.event.listener; import java.util.List; public interface IEventAnalyzerListenerManager { void add(EventAnalyzerListener.Factory factory); List<EventAnalyzerListener.Factory> getEventAnalyzerListenerFactories(); }
apache/solr
1,158
solr/core/src/java/org/apache/solr/logging/ListenerConfig.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.logging; public class ListenerConfig { public final int size; public final String threshold; public ListenerConfig(int size, String threshold) { this.size = size; this.threshold = threshold; } public ListenerConfig() { this(50, null); } // Down the line, settings for solr URL/core to store logging }
apache/streampipes
1,079
streampipes-extensions/streampipes-pipeline-elements-experimental-flink/src/main/java/com/kohlschutter/boilerpipe/BoilerpipeInput.java
/* * boilerpipe * <p> * Copyright (c) 2009, 2014 Christian Kohlschütter * <p> * The author 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.kohlschutter.boilerpipe; import com.kohlschutter.boilerpipe.document.TextDocument; /** * A source that returns {@link TextDocument}s. */ public interface BoilerpipeInput { /** * Returns (somehow) a {@link TextDocument}. * * @return A {@link TextDocument}. * @throws BoilerpipeProcessingException */ TextDocument getTextDocument() throws BoilerpipeProcessingException; }
apache/struts
1,116
plugins/convention/src/test/java/org/apache/struts2/convention/actions/action/ClassNameAction.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.Action; /** * <p> * This is a test action. * </p> */ public class ClassNameAction { @Action(value = "action3", className = "someClassName") public String run1() { return null; } }
apache/syncope
1,114
core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/RemediationDataBinder.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.core.provisioning.api.data; import org.apache.syncope.common.lib.to.RemediationTO; import org.apache.syncope.core.persistence.api.entity.Remediation; @FunctionalInterface public interface RemediationDataBinder { RemediationTO getRemediationTO(Remediation remediation); }
apache/syncope
1,116
core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/keymaster/ConfParam.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.core.persistence.api.entity.keymaster; import com.fasterxml.jackson.databind.JsonNode; import org.apache.syncope.core.persistence.api.entity.ProvidedKeyEntity; public interface ConfParam extends ProvidedKeyEntity { JsonNode getValue(); void setValue(JsonNode value); }
apache/tomee
1,082
arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/bmp/local/BigFinderHome.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.arquillian.tests.bmp.local; import jakarta.ejb.EJBLocalHome; import java.rmi.RemoteException; import java.util.Collection; public interface BigFinderHome extends EJBLocalHome { Collection<BigFinder> findN(int count) throws RemoteException; }
apache/tomee
1,110
itests/openejb-itests-beans/src/main/java/org/apache/openejb/test/stateless/BasicStatelessInterceptedLocal.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.test.stateless; import java.util.Map; /** * @version $Rev$ $Date$ */ public interface BasicStatelessInterceptedLocal { public String reverse(String str); public String concat(String str1, String str2); public Map<String, Object> getContextData(); }
apache/tomee
1,122
examples/applicationexception/src/main/java/org/superbiz/appexception/ThrowBusinessExceptionImpl.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.appexception; import jakarta.ejb.Stateless; //START SNIPPET: code @Stateless public class ThrowBusinessExceptionImpl implements ThrowBusinessException { public void throwValueRequiredException() throws BusinessException { throw new ValueRequiredException(); } } //END SNIPPET: code
apache/tomee
1,128
container/openejb-core/src/main/java/org/apache/openejb/core/ivm/naming/ObjectReference.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.core.ivm.naming; import javax.naming.NamingException; public class ObjectReference extends Reference { private final Object obj; public ObjectReference(final Object obj) { this.obj = obj; } public Object getObject() throws NamingException { return obj; } }
apache/tomee
1,129
container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/InjectableInfo.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.assembler.classic; import java.util.ArrayList; import java.util.List; /** * @version $Rev$ $Date$ */ public class InjectableInfo extends InfoObject { public final List<InjectionInfo> targets = new ArrayList<>(); public String referenceName; public ReferenceLocationInfo location; }
apache/tomee
1,137
examples/cdi-session-scope/src/main/java/org/superbiz/cdi/session/SessionBean.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.cdi.session; import jakarta.enterprise.context.SessionScoped; import java.io.Serializable; @SessionScoped public class SessionBean implements Serializable { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } }
apache/uniffle
1,146
common/src/main/java/org/apache/uniffle/common/security/SecurityContext.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.common.security; import java.io.Closeable; import java.util.concurrent.Callable; /** A security context with may be required to run a Callable. */ public interface SecurityContext extends Closeable { <T> T runSecured(String user, Callable<T> securedCallable) throws Exception; String getContextLoginUser(); }
apache/unomi
1,131
graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/providers/GraphQLMutationProvider.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.unomi.graphql.providers; import graphql.annotations.processor.GraphQLAnnotations; import graphql.schema.GraphQLFieldDefinition; import java.util.Set; public interface GraphQLMutationProvider extends GraphQLProvider { Set<GraphQLFieldDefinition> getMutations(GraphQLAnnotations graphQLAnnotations); }
apache/usergrid
1,103
stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/consistency/SubscriberFactory.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.usergrid.persistence.core.consistency; import rx.Subscriber; /** * Interface to create subscriptions. Useful for creating custom listeners or composite functionality * @param <T> */ public interface SubscriberFactory<T> { public Subscriber<T> getSubcriber(); }
apache/usergrid
1,103
stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/exceptions/JsonReadException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. 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. For additional information regarding * copyright in this work, please see the NOTICE file in the top level * directory of this distribution. */ package org.apache.usergrid.persistence.index.exceptions; public class JsonReadException extends RuntimeException { private static final long serialVersionUID = 1L; public JsonReadException( String msg, Throwable t ) { super( msg, t ); } }
apache/wicket
1,104
wicket-core-tests/src/test/java/org/apache/wicket/markup/resolver/WicketMessageResolverEscapePageWrongEscapeValue.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.wicket.markup.resolver; import org.apache.wicket.markup.html.WebPage; /** * Mock page for testing Wicket Message escaping with wrong value for escape attribute. * * @author Kees van Dieren */ public class WicketMessageResolverEscapePageWrongEscapeValue extends WebPage { }
google-ai-edge/mediapipe
1,128
mediapipe/tasks/java/com/google/mediapipe/tasks/core/ModelResourcesCacheService.java
// Copyright 2022 The MediaPipe 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.mediapipe.tasks.core; import com.google.mediapipe.framework.GraphService; /** Java wrapper for graph service of ModelResourcesCacheService. */ class ModelResourcesCacheService implements GraphService<ModelResourcesCache> { public ModelResourcesCacheService() {} @Override public void installServiceObject(long context, ModelResourcesCache object) { nativeInstallServiceObject(context, object.getNativeHandle()); } public native void nativeInstallServiceObject(long context, long object); }
google/fhir-data-pipes
1,125
pipelines/batch/src/main/java/com/google/fhir/analytics/SearchSegmentDescriptor.java
/* * Copyright 2020-2023 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.fhir.analytics; import com.google.auto.value.AutoValue; import java.io.Serializable; import org.apache.beam.sdk.coders.DefaultCoder; import org.apache.beam.sdk.coders.SerializableCoder; @DefaultCoder(SerializableCoder.class) @AutoValue abstract class SearchSegmentDescriptor implements Serializable { static SearchSegmentDescriptor create(String searchUrl, int count) { return new AutoValue_SearchSegmentDescriptor(searchUrl, count); } abstract String searchUrl(); abstract int count(); }
google/guava
1,156
android/guava/src/com/google/common/cache/IgnoreJRERequirement.java
/* * Copyright 2019 The Guava 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.common.cache; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Target; /** * Disables Animal Sniffer's checking of compatibility with older versions of Java/Android. * * <p>Each package's copy of this annotation needs to be listed in our {@code pom.xml}. */ @Target({METHOD, CONSTRUCTOR, TYPE, FIELD}) @interface IgnoreJRERequirement {}
google/j2objc
1,135
examples/HelloSwift/HelloSwiftJava/org/j2objc/Example.java
/* * 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.j2objc; /** Class to test interoperability of transpiled code with Swift. */ public class Example { public static final String HELLO_J2OBJC = "Hello J2ObjC"; /** enum example. */ public enum Day { SUNDAY("Sun"), MONDAY("Mon"), TUESDAY("Tue"), WEDNESDAY("Wed"), THURSDAY("Thu"), FRIDAY("Fri"), SATURDAY("Sat"); private final String shortName; private Day(String shortName) { this.shortName = shortName; } public @NonNull String getShortName() { return shortName; } } } @interface NonNull {}
google/jsinterop-base
1,157
javatests/jsinterop/base/super/GWTTestCase.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.gwt.junit.client; import junit.framework.TestCase; /** This is a slimmed down version of GWTTestCase, so that we can compile and run GWT tests. */ public abstract class GWTTestCase extends TestCase { public GWTTestCase() {} public abstract String getModuleName(); protected void gwtSetUp() throws Exception {} protected void gwtTearDown() throws Exception {} @Override protected final void setUp() throws Exception { gwtSetUp(); } @Override protected final void tearDown() throws Exception { gwtTearDown(); } }
google/nomulus
1,131
core/src/main/java/google/registry/persistence/converter/TldStateTransitionUserType.java
// Copyright 2024 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 google.registry.model.common.TimedTransitionProperty; import google.registry.model.tld.Tld.TldState; /** Hibernate custom type for {@link TimedTransitionProperty} of {@link TldState}. */ public class TldStateTransitionUserType extends TimedTransitionBaseUserType<TldState> { @Override String valueToString(TldState value) { return value.name(); } @Override TldState stringToValue(String string) { return TldState.valueOf(string); } }
google/sagetv
1,183
java/sage/vfs/DataObjectFilter.java
/* * Copyright 2015 The SageTV 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 sage.vfs; /** * * @author Narflex */ public interface DataObjectFilter { // version used for programatic calling public String getTechnique(); // Pretty version which is presented to the user public String getName(); public boolean isMatchingFilter(); // passesFilter should take into account the matching setting public boolean passesFilter(String dataType, Object data); // We want to override these so that we can avoid refreshing when there's redundant filter changes public boolean equals(Object o); public int hashCode(); }
googleapis/discovery-artifact-manager
1,118
toolkit/src/main/java/com/google/api/codegen/viewmodel/SimpleViewModel.java
/* Copyright 2016 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.api.codegen.viewmodel; import com.google.auto.value.AutoValue; @AutoValue public abstract class SimpleViewModel implements ViewModel { @Override public abstract String resourceRoot(); @Override public abstract String templateFileName(); @Override public abstract String outputPath(); public static SimpleViewModel create( String resourceRoot, String templateFileName, String outputPath) { return new AutoValue_SimpleViewModel(resourceRoot, templateFileName, outputPath); } }
googleapis/google-cloud-java
1,047
java-maps-addressvalidation/proto-google-maps-addressvalidation-v1/src/main/java/com/google/maps/addressvalidation/v1/ProvideValidationFeedbackResponseOrBuilder.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/maps/addressvalidation/v1/address_validation_service.proto // Protobuf Java Version: 3.25.8 package com.google.maps.addressvalidation.v1; public interface ProvideValidationFeedbackResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.maps.addressvalidation.v1.ProvideValidationFeedbackResponse) com.google.protobuf.MessageOrBuilder {}
googlearchive/leanback-showcase
1,091
app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/settings/SettingsExampleActivity.java
/* * Copyright (C) 2015 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 android.support.v17.leanback.supportleanbackshowcase.app.settings; import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.support.v17.leanback.supportleanbackshowcase.R; /* * TODO: Javadoc */ public class SettingsExampleActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings_example); } }
hibernate/hibernate-orm
1,060
tooling/metamodel-generator/src/test/java/org/hibernate/processor/test/elementcollection/Hotel.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.processor.test.elementcollection; import java.util.Map; import jakarta.persistence.ElementCollection; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.MapKeyClass; import jakarta.persistence.OneToMany; /** * @author Hardy Ferentschik */ @Entity public class Hotel { private int id; private Map roomsByName; private Map cleaners; @Id @GeneratedValue public int getId() { return id; } public void setId(int id) { this.id = id; } @ElementCollection(targetClass = Room.class) @MapKeyClass(String.class) public Map getRoomsByName() { return roomsByName; } public void setRoomsByName(Map roomsByName) { this.roomsByName = roomsByName; } @OneToMany(targetEntity = Cleaner.class) @MapKeyClass(Room.class) public Map getCleaners() { return cleaners; } public void setCleaners(Map cleaners) { this.cleaners = cleaners; } }
hibernate/hibernate-orm
1,077
hibernate-core/src/test/java/org/hibernate/orm/test/procedure/internal/ProcedureCallImplTest.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.orm.test.procedure.internal; import java.util.stream.Stream; import jakarta.persistence.Query; import org.hibernate.dialect.H2Dialect; import org.hibernate.testing.orm.junit.JiraKey; import org.hibernate.testing.orm.junit.EntityManagerFactoryScope; import org.hibernate.testing.orm.junit.Jpa; import org.hibernate.testing.orm.junit.RequiresDialect; import org.junit.Assert; import org.junit.jupiter.api.Test; /** * @author Nathan Xu */ @Jpa public class ProcedureCallImplTest { @Test @JiraKey( value = "HHH-13644" ) @RequiresDialect( H2Dialect.class ) public void testNoNullPointerExceptionThrown(EntityManagerFactoryScope scope) { scope.inTransaction( em -> { em.createNativeQuery("CREATE ALIAS GET_RANDOM_VALUE FOR \"java.lang.Math.random\";").executeUpdate(); Query query = em.createStoredProcedureQuery("GET_RANDOM_VALUE"); try (Stream stream = query.getResultStream()) { Assert.assertEquals( 1, stream.count() ); } } ); } }