index
int64
0
0
repo_id
stringlengths
9
205
file_path
stringlengths
31
246
content
stringlengths
1
12.2M
__index_level_0__
int64
0
10k
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PreUpdate.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({METHOD}) @Retention(RUNTIME) public @interface PreUpdate {}
1,500
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/JoinColumn.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.lang.annotation.Repeatable; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static javax.persistence.ConstraintMode.PROVIDER_DEFAULT; @Target({METHOD, FIELD}) @Retention(RUNTIME) @Repeatable(JoinColumns.class) public @interface JoinColumn { String name() default ""; String referencedColumnName() default ""; boolean unique() default false; boolean nullable() default true; boolean insertable() default true; boolean updatable() default true; String columnDefinition() default ""; String table() default ""; ForeignKey foreignKey() default @ForeignKey(PROVIDER_DEFAULT); }
1,501
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence;
1,502
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/EntityManager.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.util.Map; import java.util.List; import javax.persistence.metamodel.Metamodel; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.CriteriaUpdate; import javax.persistence.criteria.CriteriaDelete; public interface EntityManager { public void persist(Object entity); public <T> T merge(T entity); public void remove(Object entity); public <T> T find(Class<T> entityClass, Object primaryKey); public <T> T find(Class<T> entityClass, Object primaryKey, Map<String, Object> properties); public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode); public <T> T find(Class<T> entityClass, Object primaryKey, LockModeType lockMode, Map<String, Object> properties); public <T> T getReference(Class<T> entityClass, Object primaryKey); public void flush(); public void setFlushMode(FlushModeType flushMode); public FlushModeType getFlushMode(); public void lock(Object entity, LockModeType lockMode); public void lock(Object entity, LockModeType lockMode, Map<String, Object> properties); public void refresh(Object entity); public void refresh(Object entity, Map<String, Object> properties); public void refresh(Object entity, LockModeType lockMode); public void refresh(Object entity, LockModeType lockMode, Map<String, Object> properties); public void clear(); public void detach(Object entity); public boolean contains(Object entity); public LockModeType getLockMode(Object entity); public void setProperty(String propertyName, Object value); public Map<String, Object> getProperties(); public Query createQuery(String qlString); public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery); public Query createQuery(CriteriaUpdate updateQuery); public Query createQuery(CriteriaDelete deleteQuery); public <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass); public Query createNamedQuery(String name); public <T> TypedQuery<T> createNamedQuery(String name, Class<T> resultClass); public Query createNativeQuery(String sqlString); public Query createNativeQuery(String sqlString, Class resultClass); public Query createNativeQuery(String sqlString, String resultSetMapping); public StoredProcedureQuery createNamedStoredProcedureQuery(String name); public StoredProcedureQuery createStoredProcedureQuery(String procedureName); public StoredProcedureQuery createStoredProcedureQuery( String procedureName, Class... resultClasses); public StoredProcedureQuery createStoredProcedureQuery( String procedureName, String... resultSetMappings); public void joinTransaction(); public boolean isJoinedToTransaction(); public <T> T unwrap(Class<T> cls); public Object getDelegate(); public void close(); public boolean isOpen(); public EntityTransaction getTransaction(); public EntityManagerFactory getEntityManagerFactory(); public CriteriaBuilder getCriteriaBuilder(); public Metamodel getMetamodel(); public <T> EntityGraph<T> createEntityGraph(Class<T> rootType); public EntityGraph<?> createEntityGraph(String graphName); public EntityGraph<?> getEntityGraph(String graphName); public <T> List<EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass); }
1,503
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/EntityListeners.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({TYPE}) @Retention(RUNTIME) public @interface EntityListeners { Class[] value(); }
1,504
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/ForeignKey.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static javax.persistence.ConstraintMode.CONSTRAINT; @Target({}) @Retention(RUNTIME) public @interface ForeignKey { String name() default ""; ConstraintMode value() default CONSTRAINT; String foreignKeyDefinition() default ""; }
1,505
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PersistenceUtil.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; public interface PersistenceUtil { public boolean isLoaded(Object entity, String attributeName); public boolean isLoaded(Object entity); }
1,506
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/NamedAttributeNode.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({}) @Retention(RUNTIME) public @interface NamedAttributeNode { String value(); String subgraph() default ""; String keySubgraph() default ""; }
1,507
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/PostPersist.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence; import java.lang.annotation.Target; import java.lang.annotation.Retention; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({METHOD}) @Retention(RUNTIME) public @interface PostPersist {}
1,508
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolver.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; import java.util.List; public interface PersistenceProviderResolver { List<PersistenceProvider> getPersistenceProviders(); void clearCachedProviders(); }
1,509
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/ClassTransformer.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; import java.security.ProtectionDomain; import java.lang.instrument.IllegalClassFormatException; public interface ClassTransformer { byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException; }
1,510
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/PersistenceUnitInfo.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; import javax.sql.DataSource; import java.util.List; import java.util.Properties; import java.net.URL; import javax.persistence.SharedCacheMode; import javax.persistence.ValidationMode; public interface PersistenceUnitInfo { public String getPersistenceUnitName(); public String getPersistenceProviderClassName(); public PersistenceUnitTransactionType getTransactionType(); public DataSource getJtaDataSource(); public DataSource getNonJtaDataSource(); public List<String> getMappingFileNames(); public List<URL> getJarFileUrls(); public URL getPersistenceUnitRootUrl(); public List<String> getManagedClassNames(); public boolean excludeUnlistedClasses(); public SharedCacheMode getSharedCacheMode(); public ValidationMode getValidationMode(); public Properties getProperties(); public String getPersistenceXMLSchemaVersion(); public ClassLoader getClassLoader(); public void addTransformer(ClassTransformer transformer); public ClassLoader getNewTempClassLoader(); }
1,511
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/PersistenceProvider.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; import javax.persistence.EntityManagerFactory; import java.util.Map; public interface PersistenceProvider { public EntityManagerFactory createEntityManagerFactory(String emName, Map map); public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map); public void generateSchema(PersistenceUnitInfo info, Map map); public boolean generateSchema(String persistenceUnitName, Map map); public ProviderUtil getProviderUtil(); }
1,512
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/ProviderUtil.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; public interface ProviderUtil { public LoadState isLoadedWithoutReference(Object entity, String attributeName); public LoadState isLoadedWithReference(Object entity, String attributeName); public LoadState isLoaded(Object entity); }
1,513
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/LoadState.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; public enum LoadState { LOADED, NOT_LOADED, UNKNOWN }
1,514
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/PersistenceUnitTransactionType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; public enum PersistenceUnitTransactionType { JTA, RESOURCE_LOCAL }
1,515
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/PersistenceProviderResolverHolder.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; import java.util.WeakHashMap; import javax.persistence.PersistenceException; /** * Contains Geronimo implemented code as required by the JPA spec. * * Finds/Creates the global {@link javax.persistence.spi.PersistenceProviderResolver} * * Implementations must be thread-safe. * * @since Java Persistence 2.0 */ public class PersistenceProviderResolverHolder { private static PersistenceProviderResolver persistenceResolver = new DefaultPersistenceProviderResolver(); public static PersistenceProviderResolver getPersistenceProviderResolver() { return persistenceResolver; } public static void setPersistenceProviderResolver(PersistenceProviderResolver resolver) { if (persistenceResolver != null) { persistenceResolver.clearCachedProviders(); persistenceResolver = null; } if (resolver != null) { persistenceResolver = resolver; } else { // handle removing a resolver for OSGi environments persistenceResolver = new DefaultPersistenceProviderResolver(); } } /* * (non-Javadoc) Default implementation of a PersistenceProviderResolver * to use when none are provided. * * Geronimo implementation specific code. */ private static class DefaultPersistenceProviderResolver implements PersistenceProviderResolver { // cache of providers per class loader private volatile WeakHashMap<ClassLoader, List<PersistenceProvider>> providerCache = new WeakHashMap<ClassLoader, List<PersistenceProvider>>(); /* * (non-Javadoc) * * @see javax.persistence.spi.PersistenceProviderResolver#getPersistenceProviders() */ public List<PersistenceProvider> getPersistenceProviders() { // get our class loader ClassLoader cl = PrivClassLoader.get(null); if (cl == null) cl = PrivClassLoader.get(DefaultPersistenceProviderResolver.class); // use any previously cached providers List<PersistenceProvider> providers = providerCache.get(cl); if (providers == null) { // need to discover and load them for this class loader providers = new ArrayList<PersistenceProvider>(); try { // add each one to our list for (PersistenceProvider provider : ServiceLoader.load(PersistenceProvider.class, cl)) { providers.add(provider); } // cache the discovered providers providerCache.put(cl, providers); } catch (Exception e) { throw new PersistenceException("Failed to load provider from META-INF/services", e); } } // caller must handle the case of no providers found return providers; } /* * (non-Javadoc) * * @see javax.persistence.spi.PersistenceProviderResolver#clearCachedProviders() */ public void clearCachedProviders() { providerCache.clear(); } private static class PrivClassLoader implements PrivilegedAction<ClassLoader> { private final Class<?> c; public static ClassLoader get(Class<?> c) { final PrivClassLoader action = new PrivClassLoader(c); if (System.getSecurityManager() != null) return AccessController.doPrivileged(action); else return action.run(); } private PrivClassLoader(Class<?> c) { this.c = c; } public ClassLoader run() { if (c != null) return c.getClassLoader(); else return Thread.currentThread().getContextClassLoader(); } } } }
1,516
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/spi/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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.spi;
1,517
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/SingularAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface SingularAttribute<X, T> extends Attribute<X, T>, Bindable<T> { boolean isId(); boolean isVersion(); boolean isOptional(); Type<T> getType(); }
1,518
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/Type.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface Type<X> { public static enum PersistenceType { ENTITY, EMBEDDABLE, MAPPED_SUPERCLASS, BASIC } PersistenceType getPersistenceType(); Class<X> getJavaType(); }
1,519
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/ListAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface ListAttribute<X, E> extends PluralAttribute<X, java.util.List<E>, E> {}
1,520
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/PluralAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface PluralAttribute<X, C, E> extends Attribute<X, C>, Bindable<E> { public static enum CollectionType { COLLECTION, SET, LIST, MAP } CollectionType getCollectionType(); Type<E> getElementType(); }
1,521
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/MapAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface MapAttribute<X, K, V> extends PluralAttribute<X, java.util.Map<K, V>, V> { Class<K> getKeyJavaType(); Type<K> getKeyType(); }
1,522
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/EntityType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface EntityType<X> extends IdentifiableType<X>, Bindable<X>{ String getName(); }
1,523
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/MappedSuperclassType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface MappedSuperclassType<X> extends IdentifiableType<X> {}
1,524
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/Bindable.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface Bindable<T> { public static enum BindableType { SINGULAR_ATTRIBUTE, PLURAL_ATTRIBUTE, ENTITY_TYPE } BindableType getBindableType(); Class<T> getBindableJavaType(); }
1,525
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/SetAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface SetAttribute<X, E> extends PluralAttribute<X, java.util.Set<E>, E> {}
1,526
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/BasicType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface BasicType<X> extends Type<X> {}
1,527
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/Metamodel.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; import java.util.Set; public interface Metamodel { <X> EntityType<X> entity(Class<X> cls); <X> ManagedType<X> managedType(Class<X> cls); <X> EmbeddableType<X> embeddable(Class<X> cls); Set<ManagedType<?>> getManagedTypes(); Set<EntityType<?>> getEntities(); Set<EmbeddableType<?>> getEmbeddables(); }
1,528
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/Attribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface Attribute<X, Y> { public static enum PersistentAttributeType { MANY_TO_ONE, ONE_TO_ONE, BASIC, EMBEDDED, MANY_TO_MANY, ONE_TO_MANY, ELEMENT_COLLECTION } String getName(); PersistentAttributeType getPersistentAttributeType(); ManagedType<X> getDeclaringType(); Class<Y> getJavaType(); java.lang.reflect.Member getJavaMember(); boolean isAssociation(); boolean isCollection(); }
1,529
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/StaticMetamodel.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface StaticMetamodel { Class<?> value(); }
1,530
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/EmbeddableType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface EmbeddableType<X> extends ManagedType<X> {}
1,531
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/CollectionAttribute.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; public interface CollectionAttribute<X, E> extends PluralAttribute<X, java.util.Collection<E>, E> {}
1,532
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/IdentifiableType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; import java.util.Set; public interface IdentifiableType<X> extends ManagedType<X> { <Y> SingularAttribute<? super X, Y> getId(Class<Y> type); <Y> SingularAttribute<X, Y> getDeclaredId(Class<Y> type); <Y> SingularAttribute<? super X, Y> getVersion(Class<Y> type); <Y> SingularAttribute<X, Y> getDeclaredVersion(Class<Y> type); IdentifiableType<? super X> getSupertype(); boolean hasSingleIdAttribute(); boolean hasVersionAttribute(); Set<SingularAttribute<? super X, ?>> getIdClassAttributes(); Type<?> getIdType(); }
1,533
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/ManagedType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel; import java.util.Set; public interface ManagedType<X> extends Type<X> { Set<Attribute<? super X, ?>> getAttributes(); Set<Attribute<X, ?>> getDeclaredAttributes(); <Y> SingularAttribute<? super X, Y> getSingularAttribute(String name, Class<Y> type); <Y> SingularAttribute<X, Y> getDeclaredSingularAttribute(String name, Class<Y> type); Set<SingularAttribute<? super X, ?>> getSingularAttributes(); Set<SingularAttribute<X, ?>> getDeclaredSingularAttributes(); <E> CollectionAttribute<? super X, E> getCollection(String name, Class<E> elementType); <E> CollectionAttribute<X, E> getDeclaredCollection(String name, Class<E> elementType); <E> SetAttribute<? super X, E> getSet(String name, Class<E> elementType); <E> SetAttribute<X, E> getDeclaredSet(String name, Class<E> elementType); <E> ListAttribute<? super X, E> getList(String name, Class<E> elementType); <E> ListAttribute<X, E> getDeclaredList(String name, Class<E> elementType); <K, V> MapAttribute<? super X, K, V> getMap(String name, Class<K> keyType, Class<V> valueType); <K, V> MapAttribute<X, K, V> getDeclaredMap(String name, Class<K> keyType, Class<V> valueType); Set<PluralAttribute<? super X, ?, ?>> getPluralAttributes(); Set<PluralAttribute<X, ?, ?>> getDeclaredPluralAttributes(); Attribute<? super X, ?> getAttribute(String name); Attribute<X, ?> getDeclaredAttribute(String name); SingularAttribute<? super X, ?> getSingularAttribute(String name); SingularAttribute<X, ?> getDeclaredSingularAttribute(String name); CollectionAttribute<? super X, ?> getCollection(String name); CollectionAttribute<X, ?> getDeclaredCollection(String name); SetAttribute<? super X, ?> getSet(String name); SetAttribute<X, ?> getDeclaredSet(String name); ListAttribute<? super X, ?> getList(String name); ListAttribute<X, ?> getDeclaredList(String name); MapAttribute<? super X, ?, ?> getMap(String name); MapAttribute<X, ?, ?> getDeclaredMap(String name); }
1,534
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/metamodel/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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.metamodel;
1,535
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Join.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.Attribute; public interface Join<Z, X> extends From<Z, X> { Join<Z, X> on(Expression<Boolean> restriction); Join<Z, X> on(Predicate... restrictions); Predicate getOn(); Attribute<? super Z, ?> getAttribute(); From<?, Z> getParent(); JoinType getJoinType(); }
1,536
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Root.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.EntityType; public interface Root<X> extends From<X, X> { EntityType<X> getModel(); }
1,537
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Order.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; public interface Order { Order reverse(); boolean isAscending(); Expression<?> getExpression(); }
1,538
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CriteriaUpdate.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.EntityType; public interface CriteriaUpdate<T> extends CommonAbstractCriteria { Root<T> from(Class<T> entityClass); Root<T> from(EntityType<T> entity); Root<T> getRoot(); <Y, X extends Y> CriteriaUpdate<T> set(SingularAttribute<? super T, Y> attribute, X value); <Y> CriteriaUpdate<T> set(SingularAttribute<? super T, Y> attribute, Expression<? extends Y> value); <Y, X extends Y> CriteriaUpdate<T> set(Path<Y> attribute, X value); <Y> CriteriaUpdate<T> set(Path<Y> attribute, Expression<? extends Y> value); CriteriaUpdate<T> set(String attributeName, Object value); CriteriaUpdate<T> where(Expression<Boolean> restriction); CriteriaUpdate<T> where(Predicate... restrictions); }
1,539
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/PluralJoin.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.PluralAttribute; public interface PluralJoin<Z, C, E> extends Join<Z, E> { PluralAttribute<? super Z, C, E> getModel(); }
1,540
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/FetchParent.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.PluralAttribute; import javax.persistence.metamodel.SingularAttribute; public interface FetchParent<Z, X> { java.util.Set<Fetch<X, ?>> getFetches(); <Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute); <Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute, JoinType jt); <Y> Fetch<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute); <Y> Fetch<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute, JoinType jt); @SuppressWarnings("hiding") <X, Y> Fetch<X, Y> fetch(String attributeName); @SuppressWarnings("hiding") <X, Y> Fetch<X, Y> fetch(String attributeName, JoinType jt); }
1,541
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/SetJoin.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.Set; import javax.persistence.metamodel.SetAttribute; public interface SetJoin<Z, E> extends PluralJoin<Z, Set<E>, E> { SetJoin<Z, E> on(Expression<Boolean> restriction); SetJoin<Z, E> on(Predicate... restrictions); SetAttribute<? super Z, E> getModel(); }
1,542
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CriteriaQuery.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.List; import java.util.Set; public interface CriteriaQuery<T> extends AbstractQuery<T> { CriteriaQuery<T> select(Selection<? extends T> selection); CriteriaQuery<T> multiselect(Selection<?>... selections); CriteriaQuery<T> multiselect(List<Selection<?>> selectionList); CriteriaQuery<T> where(Expression<Boolean> restriction); CriteriaQuery<T> where(Predicate... restrictions); CriteriaQuery<T> groupBy(Expression<?>... grouping); CriteriaQuery<T> groupBy(List<Expression<?>> grouping); CriteriaQuery<T> having(Expression<Boolean> restriction); CriteriaQuery<T> having(Predicate... restrictions); CriteriaQuery<T> orderBy(Order... o); CriteriaQuery<T> orderBy(List<Order> o); CriteriaQuery<T> distinct(boolean distinct); List<Order> getOrderList(); Set<ParameterExpression<?>> getParameters(); }
1,543
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Subquery.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.List; import java.util.Set; public interface Subquery<T> extends AbstractQuery<T>, Expression<T> { Subquery<T> select(Expression<T> expression); Subquery<T> where(Expression<Boolean> restriction); Subquery<T> where(Predicate... restrictions); Subquery<T> groupBy(Expression<?>... grouping); Subquery<T> groupBy(List<Expression<?>> grouping); Subquery<T> having(Expression<Boolean> restriction); Subquery<T> having(Predicate... restrictions); Subquery<T> distinct(boolean distinct); <Y> Root<Y> correlate(Root<Y> parentRoot); <X, Y> Join<X, Y> correlate(Join<X, Y> parentJoin); <X, Y> CollectionJoin<X, Y> correlate(CollectionJoin<X, Y> parentCollection); <X, Y> SetJoin<X, Y> correlate(SetJoin<X, Y> parentSet); <X, Y> ListJoin<X, Y> correlate(ListJoin<X, Y> parentList); <X, K, V> MapJoin<X, K, V> correlate(MapJoin<X, K, V> parentMap); AbstractQuery<?> getParent(); CommonAbstractCriteria getContainingQuery(); Expression<T> getSelection(); Set<Join<?, ?>> getCorrelatedJoins(); }
1,544
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Selection.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.TupleElement; import java.util.List; public interface Selection<X> extends TupleElement<X> { Selection<X> alias(String name); boolean isCompoundSelection(); List<Selection<?>> getCompoundSelectionItems(); }
1,545
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/AbstractQuery.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.List; import java.util.Set; import javax.persistence.metamodel.EntityType; public interface AbstractQuery<T> extends CommonAbstractCriteria { <X> Root<X> from(Class<X> entityClass); <X> Root<X> from(EntityType<X> entity); AbstractQuery<T> where(Expression<Boolean> restriction); AbstractQuery<T> where(Predicate... restrictions); AbstractQuery<T> groupBy(Expression<?>... grouping); AbstractQuery<T> groupBy(List<Expression<?>> grouping); AbstractQuery<T> having(Expression<Boolean> restriction); AbstractQuery<T> having(Predicate... restrictions); AbstractQuery<T> distinct(boolean distinct); Set<Root<?>> getRoots(); Selection<T> getSelection(); List<Expression<?>> getGroupList(); Predicate getGroupRestriction(); boolean isDistinct(); Class<T> getResultType(); }
1,546
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/MapJoin.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.Map; import javax.persistence.metamodel.MapAttribute; public interface MapJoin<Z, K, V> extends PluralJoin<Z, Map<K, V>, V> { MapJoin<Z, K, V> on(Expression<Boolean> restriction); MapJoin<Z, K, V> on(Predicate... restrictions); MapAttribute<? super Z, K, V> getModel(); Path<K> key(); Path<V> value(); Expression<Map.Entry<K, V>> entry(); }
1,547
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/ParameterExpression.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.Parameter; public interface ParameterExpression<T> extends Parameter<T>, Expression<T> {}
1,548
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/JoinType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; public enum JoinType { INNER, LEFT, RIGHT }
1,549
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CriteriaBuilder.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Collection; import java.util.Map; import java.util.Set; import javax.persistence.Tuple; public interface CriteriaBuilder { CriteriaQuery<Object> createQuery(); <T> CriteriaQuery<T> createQuery(Class<T> resultClass); CriteriaQuery<Tuple> createTupleQuery(); // methods to construct queries for bulk updates and deletes: <T> CriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity); <T> CriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity); // selection construction methods: <Y> CompoundSelection<Y> construct(Class<Y> resultClass, Selection<?>... selections); CompoundSelection<Tuple> tuple(Selection<?>... selections); CompoundSelection<Object[]> array(Selection<?>... selections); //ordering: Order asc(Expression<?> x); Order desc(Expression<?> x); //aggregate functions: <N extends Number> Expression<Double> avg(Expression<N> x); <N extends Number> Expression<N> sum(Expression<N> x); Expression<Long> sumAsLong(Expression<Integer> x); Expression<Double> sumAsDouble(Expression<Float> x); <N extends Number> Expression<N> max(Expression<N> x); <N extends Number> Expression<N> min(Expression<N> x); <X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x); <X extends Comparable<? super X>> Expression<X> least(Expression<X> x); Expression<Long> count(Expression<?> x); Expression<Long> countDistinct(Expression<?> x); //subqueries: Predicate exists(Subquery<?> subquery); <Y> Expression<Y> all(Subquery<Y> subquery); <Y> Expression<Y> some(Subquery<Y> subquery); <Y> Expression<Y> any(Subquery<Y> subquery); //boolean functions: Predicate and(Expression<Boolean> x, Expression<Boolean> y); Predicate and(Predicate... restrictions); Predicate or(Expression<Boolean> x, Expression<Boolean> y); Predicate or(Predicate... restrictions); Predicate not(Expression<Boolean> restriction); Predicate conjunction(); Predicate disjunction(); //turn Expression<Boolean> into a Predicate //useful for use with varargs methods Predicate isTrue(Expression<Boolean> x); Predicate isFalse(Expression<Boolean> x); //null tests: Predicate isNull(Expression<?> x); Predicate isNotNull(Expression<?> x); //equality: Predicate equal(Expression<?> x, Expression<?> y); Predicate equal(Expression<?> x, Object y); Predicate notEqual(Expression<?> x, Expression<?> y); Predicate notEqual(Expression<?> x, Object y); //comparisons for generic (non-numeric) operands: <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Expression<? extends Y> y); <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Y y); <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y); <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Y y); <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Expression<? extends Y> y); <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Y y); <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y); <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Y y); <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y); <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Y x, Y y); //comparisons for numeric operands: Predicate gt(Expression<? extends Number> x, Expression<? extends Number> y); Predicate gt(Expression<? extends Number> x, Number y); Predicate ge(Expression<? extends Number> x, Expression<? extends Number> y); Predicate ge(Expression<? extends Number> x, Number y); Predicate lt(Expression<? extends Number> x, Expression<? extends Number> y); Predicate lt(Expression<? extends Number> x, Number y); Predicate le(Expression<? extends Number> x, Expression<? extends Number> y); Predicate le(Expression<? extends Number> x, Number y); //numerical operations: <N extends Number> Expression<N> neg(Expression<N> x); <N extends Number> Expression<N> abs(Expression<N> x); <N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y); <N extends Number> Expression<N> sum(Expression<? extends N> x, N y); <N extends Number> Expression<N> sum(N x, Expression<? extends N> y); <N extends Number> Expression<N> prod(Expression<? extends N> x, Expression<? extends N> y); <N extends Number> Expression<N> prod(Expression<? extends N> x, N y); <N extends Number> Expression<N> prod(N x, Expression<? extends N> y); <N extends Number> Expression<N> diff(Expression<? extends N> x, Expression<? extends N> y); <N extends Number> Expression<N> diff(Expression<? extends N> x, N y); <N extends Number> Expression<N> diff(N x, Expression<? extends N> y); Expression<Number> quot(Expression<? extends Number> x, Expression<? extends Number> y); Expression<Number> quot(Expression<? extends Number> x, Number y); Expression<Number> quot(Number x, Expression<? extends Number> y); Expression<Integer> mod(Expression<Integer> x, Expression<Integer> y); Expression<Integer> mod(Expression<Integer> x, Integer y); Expression<Integer> mod(Integer x, Expression<Integer> y); Expression<Double> sqrt(Expression<? extends Number> x); //typecasts: Expression<Long> toLong(Expression<? extends Number> number); Expression<Integer> toInteger(Expression<? extends Number> number); Expression<Float> toFloat(Expression<? extends Number> number); Expression<Double> toDouble(Expression<? extends Number> number); Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number); Expression<BigInteger> toBigInteger(Expression<? extends Number> number); Expression<String> toString(Expression<Character> character); //literals: <T> Expression<T> literal(T value); <T> Expression<T> nullLiteral(Class<T> resultClass); //parameters: <T> ParameterExpression<T> parameter(Class<T> paramClass); <T> ParameterExpression<T> parameter(Class<T> paramClass, String name); //collection operations: <C extends Collection<?>> Predicate isEmpty(Expression<C> collection); <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection); <C extends java.util.Collection<?>> Expression<Integer> size(Expression<C> collection); <C extends Collection<?>> Expression<Integer> size(C collection); <E, C extends Collection<E>> Predicate isMember(Expression<E> elem, Expression<C> collection); <E, C extends Collection<E>> Predicate isMember(E elem, Expression<C> collection); <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem, Expression<C> collection); <E, C extends Collection<E>> Predicate isNotMember(E elem, Expression<C> collection); //get the values and keys collections of the Map, which may then //be passed to size(), isMember(), isEmpty(), etc <V, M extends Map<?, V>> Expression<Collection<V>> values(M map); <K, M extends Map<K, ?>> Expression<Set<K>> keys(M map); //string functions: Predicate like(Expression<String> x, Expression<String> pattern); Predicate like(Expression<String> x, String pattern); Predicate like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar); Predicate like(Expression<String> x, Expression<String> pattern, char escapeChar); Predicate like(Expression<String> x, String pattern, Expression<Character> escapeChar); Predicate like(Expression<String> x, String pattern, char escapeChar); Predicate notLike(Expression<String> x, Expression<String> pattern); Predicate notLike(Expression<String> x, String pattern); Predicate notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar); Predicate notLike(Expression<String> x, Expression<String> pattern, char escapeChar); Predicate notLike(Expression<String> x, String pattern, Expression<Character> escapeChar); Predicate notLike(Expression<String> x, String pattern, char escapeChar); Expression<String> concat(Expression<String> x, Expression<String> y); Expression<String> concat(Expression<String> x, String y); Expression<String> concat(String x, Expression<String> y); Expression<String> substring(Expression<String> x, Expression<Integer> from); Expression<String> substring(Expression<String> x, int from); Expression<String> substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len); Expression<String> substring(Expression<String> x, int from, int len); public static enum Trimspec { LEADING, TRAILING, BOTH } Expression<String> trim(Expression<String> x); Expression<String> trim(Trimspec ts, Expression<String> x); Expression<String> trim(Expression<Character> t, Expression<String> x); Expression<String> trim(Trimspec ts, Expression<Character> t, Expression<String> x); Expression<String> trim(char t, Expression<String> x); Expression<String> trim(Trimspec ts, char t, Expression<String> x); Expression<String> lower(Expression<String> x); Expression<String> upper(Expression<String> x); Expression<Integer> length(Expression<String> x); Expression<Integer> locate(Expression<String> x, Expression<String> pattern); Expression<Integer> locate(Expression<String> x, String pattern); Expression<Integer> locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from); Expression<Integer> locate(Expression<String> x, String pattern, int from); // Date/time/timestamp functions: Expression<java.sql.Date> currentDate(); Expression<java.sql.Timestamp> currentTimestamp(); Expression<java.sql.Time> currentTime(); //in builders: public static interface In<T> extends Predicate { Expression<T> getExpression(); In<T> value(T value); In<T> value(Expression<? extends T> value); } <T> In<T> in(Expression<? extends T> expression); // coalesce, nullif: <Y> Expression<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y); <Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y); <Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y); <Y> Expression<Y> nullif(Expression<Y> x, Y y); // coalesce builder: public static interface Coalesce<T> extends Expression<T> { Coalesce<T> value(T value); Coalesce<T> value(Expression<? extends T> value); } <T> Coalesce<T> coalesce(); //case builders: public static interface SimpleCase<C,R> extends Expression<R> { Expression<C> getExpression(); SimpleCase<C, R> when(C condition, R result); SimpleCase<C, R> when(C condition, Expression<? extends R> result); Expression<R> otherwise(R result); Expression<R> otherwise(Expression<? extends R> result); } <C, R> SimpleCase<C,R> selectCase(Expression<? extends C> expression); public static interface Case<R> extends Expression<R> { Case<R> when(Expression<Boolean> condition, R result); Case<R> when(Expression<Boolean> condition, Expression<? extends R> result); Expression<R> otherwise(R result); Expression<R> otherwise(Expression<? extends R> result); } <R> Case<R> selectCase(); <T> Expression<T> function(String name, Class<T> type, Expression<?>... args); // methods for downcasting: <X, T, V extends T> Join<X, V> treat(Join<X, T> join, Class<V> type); <X, T, E extends T> CollectionJoin<X, E> treat(CollectionJoin<X, T> join, Class<E> type); <X, T, E extends T> SetJoin<X, E> treat(SetJoin<X, T> join, Class<E> type); <X, T, E extends T> ListJoin<X, E> treat(ListJoin<X, T> join, Class<E> type); <X, K, T, V extends T> MapJoin<X, K, V> treat(MapJoin<X, K, T> join, Class<V> type); <X, T extends X> Path<T> treat(Path<X> path, Class<T> type); <X, T extends X> Root<T> treat(Root<X> root, Class<T> type); }
1,550
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Fetch.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.Attribute; public interface Fetch<Z, X> extends FetchParent<Z, X> { Attribute<? super Z, ?> getAttribute(); FetchParent<?, Z> getParent(); JoinType getJoinType(); }
1,551
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Expression.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.Collection; public interface Expression<T> extends Selection<T> { Predicate isNull(); Predicate isNotNull(); Predicate in(Object... values); Predicate in(Expression<?>... values); Predicate in(Collection<?> values); Predicate in(Expression<Collection<?>> values); <X> Expression<X> as(Class<X> type); }
1,552
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Predicate.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.List; public interface Predicate extends Expression<Boolean> { public static enum BooleanOperator { AND, OR } BooleanOperator getOperator(); boolean isNegated(); List<Expression<Boolean>> getExpressions(); Predicate not(); }
1,553
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CommonAbstractCriteria.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; public interface CommonAbstractCriteria { Predicate getRestriction(); <U> Subquery<U> subquery(Class<U> type); }
1,554
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/ListJoin.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.List; import javax.persistence.metamodel.ListAttribute; public interface ListJoin<Z, E> extends PluralJoin<Z, List<E>, E> { ListJoin<Z, E> on(Expression<Boolean> restriction); ListJoin<Z, E> on(Predicate... restrictions); ListAttribute<? super Z, E> getModel(); Expression<Integer> index(); }
1,555
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CollectionJoin.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import java.util.Collection; import javax.persistence.metamodel.CollectionAttribute; public interface CollectionJoin<Z, E> extends PluralJoin<Z, Collection<E>, E> { CollectionJoin<Z, E> on(Expression<Boolean> restriction); CollectionJoin<Z, E> on(Predicate... restrictions); CollectionAttribute<? super Z, E> getModel(); }
1,556
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/From.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.CollectionAttribute; import javax.persistence.metamodel.ListAttribute; import javax.persistence.metamodel.MapAttribute; import javax.persistence.metamodel.SetAttribute; import java.util.Set; @SuppressWarnings("hiding") public interface From<Z, X> extends Path<X>, FetchParent<Z, X> { Set<Join<X, ?>> getJoins(); boolean isCorrelated(); From<Z, X> getCorrelationParent(); <Y> Join<X, Y> join(SingularAttribute<? super X, Y> attribute); <Y> Join<X, Y> join(SingularAttribute<? super X, Y> attribute, JoinType jt); <Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection); <Y> SetJoin<X, Y> join(SetAttribute<? super X, Y> set); <Y> ListJoin<X, Y> join(ListAttribute<? super X, Y> list); <K, V> MapJoin<X, K, V> join(MapAttribute<? super X, K, V> map); <Y> CollectionJoin<X, Y> join(CollectionAttribute<? super X, Y> collection, JoinType jt); <Y> SetJoin<X, Y> join(SetAttribute<? super X, Y> set, JoinType jt); <Y> ListJoin<X, Y> join(ListAttribute<? super X, Y> list, JoinType jt); <K, V> MapJoin<X, K, V> join(MapAttribute<? super X, K, V> map, JoinType jt); <X, Y> Join<X, Y> join(String attributeName); <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName); <X, Y> SetJoin<X, Y> joinSet(String attributeName); <X, Y> ListJoin<X, Y> joinList(String attributeName); <X, K, V> MapJoin<X, K, V> joinMap(String attributeName); <X, Y> Join<X, Y> join(String attributeName, JoinType jt); <X, Y> CollectionJoin<X, Y> joinCollection(String attributeName, JoinType jt); <X, Y> SetJoin<X, Y> joinSet(String attributeName, JoinType jt); <X, Y> ListJoin<X, Y> joinList(String attributeName, JoinType jt); <X, K, V> MapJoin<X, K, V> joinMap(String attributeName, JoinType jt); }
1,557
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CriteriaDelete.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.EntityType; public interface CriteriaDelete<T> extends CommonAbstractCriteria { Root<T> from(Class<T> entityClass); Root<T> from(EntityType<T> entity); Root<T> getRoot(); CriteriaDelete<T> where(Expression<Boolean> restriction); CriteriaDelete<T> where(Predicate... restrictions); }
1,558
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria;
1,559
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/CompoundSelection.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; public interface CompoundSelection<X> extends Selection<X> {}
1,560
0
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence
Create_ds/geronimo-specs/geronimo-jpa_2.2_spec/src/main/java/javax/persistence/criteria/Path.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.persistence.criteria; import javax.persistence.metamodel.PluralAttribute; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.Bindable; import javax.persistence.metamodel.MapAttribute; public interface Path<X> extends Expression<X> { Bindable<X> getModel(); Path<?> getParentPath(); <Y> Path<Y> get(SingularAttribute<? super X, Y> attribute); <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> collection); <K, V, M extends java.util.Map<K, V>> Expression<M> get(MapAttribute<X, K, V> map); Expression<Class<? extends X>> type(); <Y> Path<Y> get(String attributeName); }
1,561
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/StateTypeTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class StateTypeTest extends TestCase { public void testValues() { assertEquals(0, StateType.RUNNING.getValue()); assertEquals(1, StateType.COMPLETED.getValue()); assertEquals(2, StateType.FAILED.getValue()); assertEquals(3, StateType.RELEASED.getValue()); } public void testToString() { assertEquals("running", StateType.RUNNING.toString()); assertEquals("completed", StateType.COMPLETED.toString()); assertEquals("failed", StateType.FAILED.toString()); assertEquals("released", StateType.RELEASED.toString()); // only possible due to package local access assertEquals("5", new ActionType(5).toString()); } public void testValueToSmall() { try { StateType.getStateType(-1); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } public void testValueToLarge() { try { StateType.getStateType(5); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } }
1,562
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/CommandTypeTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class CommandTypeTest extends TestCase { public void testValues() { assertEquals(0, CommandType.DISTRIBUTE.getValue()); assertEquals(1, CommandType.START.getValue()); assertEquals(2, CommandType.STOP.getValue()); assertEquals(3, CommandType.UNDEPLOY.getValue()); assertEquals(4, CommandType.REDEPLOY.getValue()); } public void testToString() { assertEquals("distribute", CommandType.DISTRIBUTE.toString()); assertEquals("start", CommandType.START.toString()); assertEquals("stop", CommandType.STOP.toString()); assertEquals("undeploy", CommandType.UNDEPLOY.toString()); assertEquals("redeploy", CommandType.REDEPLOY.toString()); // only possible due to package local access assertEquals("10", new ActionType(10).toString()); assertEquals("-1", new ActionType(-1).toString()); } public void testValueToSmall() { try { CommandType.getCommandType(-1); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } public void testValueToLarge() { try { CommandType.getCommandType(10); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } }
1,563
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/ModuleTypeTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class ModuleTypeTest extends TestCase { public void testValues() { assertEquals(0, ModuleType.EAR.getValue()); assertEquals(1, ModuleType.EJB.getValue()); assertEquals(2, ModuleType.CAR.getValue()); assertEquals(3, ModuleType.RAR.getValue()); assertEquals(4, ModuleType.WAR.getValue()); } public void testToString() { assertEquals("ear", ModuleType.EAR.toString()); assertEquals("ejb", ModuleType.EJB.toString()); assertEquals("car", ModuleType.CAR.toString()); assertEquals("rar", ModuleType.RAR.toString()); assertEquals("war", ModuleType.WAR.toString()); // only possible due to package local access assertEquals("5", new ModuleType(5).toString()); } public void testModuleExtension() { assertEquals(".ear", ModuleType.EAR.getModuleExtension()); assertEquals(".jar", ModuleType.EJB.getModuleExtension()); assertEquals(".jar", ModuleType.CAR.getModuleExtension()); assertEquals(".rar", ModuleType.RAR.getModuleExtension()); assertEquals(".war", ModuleType.WAR.getModuleExtension()); } public void testValueToSmall() { try { ModuleType.getModuleType(-1); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } public void testValueToLarge() { try { ModuleType.getModuleType(5); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } }
1,564
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/ActionTypeTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class ActionTypeTest extends TestCase { public void testValues() { assertEquals(0, ActionType.EXECUTE.getValue()); assertEquals(1, ActionType.CANCEL.getValue()); assertEquals(2, ActionType.STOP.getValue()); } public void testToString() { assertEquals("execute", ActionType.EXECUTE.toString()); assertEquals("cancel", ActionType.CANCEL.toString()); assertEquals("stop", ActionType.STOP.toString()); // only possible due to package local access assertEquals("5", new ActionType(5).toString()); } public void testValueToSmall() { try { ActionType.getActionType(-1); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } public void testValueToLarge() { try { ActionType.getActionType(5); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } }
1,565
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/DConfigBeanVersionTypeTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class DConfigBeanVersionTypeTest extends TestCase { public void testValues() { assertEquals(0, DConfigBeanVersionType.V1_3.getValue()); assertEquals(1, DConfigBeanVersionType.V1_3_1.getValue()); assertEquals(2, DConfigBeanVersionType.V1_4.getValue()); } public void testToString() { assertEquals("V1_3", DConfigBeanVersionType.V1_3.toString()); assertEquals("V1_3_1", DConfigBeanVersionType.V1_3_1.toString()); assertEquals("V1_4", DConfigBeanVersionType.V1_4.toString()); // only possible due to package local access assertEquals("5", new ActionType(5).toString()); } public void testValueToSmall() { try { DConfigBeanVersionType.getDConfigBeanVersionType(-1); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } public void testValueToLarge() { try { DConfigBeanVersionType.getDConfigBeanVersionType(3); fail("Expected AIOOBE"); } catch (ArrayIndexOutOfBoundsException aioobe) { } } }
1,566
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManagerTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared.factories; import junit.framework.TestCase; import javax.enterprise.deploy.spi.factories.DeploymentFactory; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.factories.MockDeploymentFactory; /** * Low level tests on the DeploymentFactoryManager. * * @version $Rev$ $Date$ */ public class DeploymentFactoryManagerTest extends TestCase { private DeploymentFactoryManager factoryManager; private MockDeploymentFactory mockFactory = new MockDeploymentFactory("deployer"); protected void setUp() throws Exception { super.setUp(); factoryManager = DeploymentFactoryManager.getInstance(); } protected void tearDown() throws Exception { factoryManager = null; super.tearDown(); } public void testGetDeploymentManagerWithoutAnyRegisteredFactories() { try { factoryManager.getDeploymentManager("invalid-uri", null, null); fail("Expected a DeploymentManagerCreationException"); } catch (DeploymentManagerCreationException e) { assertTrue(e.getMessage().startsWith("Could not get DeploymentManager")); } } public void testDisconnectedGetDeploymentManagerWithoutAnyRegisteredFactories() { try { factoryManager.getDisconnectedDeploymentManager("invalid-uri"); fail("Expected a DeploymentManagerCreationException"); } catch (DeploymentManagerCreationException e) { assertTrue(e.getMessage().startsWith("Could not get DeploymentManager")); } } public void testGetDeploymentManagerWithNullURI() { try { factoryManager.getDeploymentManager(null, null, null); fail("Expected an IllegalArgumentException"); } catch (IllegalArgumentException e) { } catch(DeploymentManagerCreationException e) { fail("Unexpected Exception: "+e.getMessage()); } } public void testDisconnectedGetDeploymentManagerWithNullURI() { try { factoryManager.getDisconnectedDeploymentManager(null); fail("Expected an IllegalArgumentException"); } catch (IllegalArgumentException e) { } catch(DeploymentManagerCreationException e) { fail("Unexpected Exception: "+e.getMessage()); } } public void testRegisterNull() { try { factoryManager.registerDeploymentFactory(null); fail("Should have gotten an IllegalArgumentException"); } catch(IllegalArgumentException e) { } } public void testRegisterDeploymentFactory() { int initialNumberOfFactories = factoryManager.getDeploymentFactories().length; DeploymentFactory factory = new MockDeploymentFactory("foo"); factoryManager.registerDeploymentFactory(factory); int expectedNumberOfFactories = initialNumberOfFactories + 1; int currentNumberOfFactories = factoryManager.getDeploymentFactories().length; assertEquals(expectedNumberOfFactories, currentNumberOfFactories); } public void testGetDeploymentManager() { ensureFactoryRegistered(); DeploymentManager deploymentManager = null; try { deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo://server:port/application", "username", "password"); } catch (DeploymentManagerCreationException e) { fail("Didn't expect a DeploymentManagerException here."); } assertNotNull("Expected an instance of the DeploymentManager", deploymentManager); } public void testGetDisconnectedDeploymentManager() { ensureFactoryRegistered(); DeploymentManager deploymentManager = null; try { deploymentManager = factoryManager.getDeploymentManager("deployer:geronimo:", null, null); } catch (DeploymentManagerCreationException e) { fail("Didn't expect a DeploymentManagerException here."); } assertNotNull("Expected an instance of the DeploymentManager", deploymentManager); } public void testDeploymentManagerCreationException() { ensureFactoryRegistered(); try { factoryManager.getDisconnectedDeploymentManager("throw-exception"); fail("Expected a DeploymentManagerCreationException"); } catch (DeploymentManagerCreationException e) { // // jason: probably not a hot idea to validate the message here // // assertTrue(e.getMessage().startsWith("Could not get DeploymentManager")); } } private void ensureFactoryRegistered() { DeploymentFactory[] factories = factoryManager.getDeploymentFactories(); for (int i = 0; i < factories.length; i++) { if (factories[i] == mockFactory) { return; } } factoryManager.registerDeploymentFactory(new MockDeploymentFactory("deployer")); } }
1,567
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/spi/MockDeploymentManager.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; import javax.enterprise.deploy.model.DeployableObject; import javax.enterprise.deploy.shared.DConfigBeanVersionType; import javax.enterprise.deploy.shared.ModuleType; import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException; import javax.enterprise.deploy.spi.exceptions.InvalidModuleException; import javax.enterprise.deploy.spi.exceptions.TargetException; import javax.enterprise.deploy.spi.status.ProgressObject; import java.io.File; import java.io.InputStream; import java.util.Locale; /** * @version $Rev$ $Date$ */ public class MockDeploymentManager implements DeploymentManager { public Target[] getTargets() throws IllegalStateException { return new Target[0]; } public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException { return new TargetModuleID[0]; } public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException { return new TargetModuleID[0]; } public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException { return new TargetModuleID[0]; } public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException { return null; } public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException { return null; } public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException { return null; } public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException { return null; } public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException { return null; } public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException { return null; } public boolean isRedeploySupported() { return false; } public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException { return null; } public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException { return null; } public void release() { } public Locale getDefaultLocale() { return null; } public Locale getCurrentLocale() { return null; } public void setLocale(Locale locale) throws UnsupportedOperationException { } public Locale[] getSupportedLocales() { return new Locale[0]; } public boolean isLocaleSupported(Locale locale) { return false; } public DConfigBeanVersionType getDConfigBeanVersion() { return null; } public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version) { return false; } public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException { } }
1,568
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/spi/factories/MockDeploymentFactory.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.factories; import javax.enterprise.deploy.spi.MockDeploymentManager; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; /** * @version $Rev$ $Date$ */ public class MockDeploymentFactory implements DeploymentFactory { private String scheme; public MockDeploymentFactory(String scheme) { this.scheme = scheme; } public boolean handlesURI(String uri) { return uri != null && uri.startsWith(scheme); } public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException { return getDisconnectedDeploymentManager(uri); } public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { if ("return-null".equals(uri)) { return null; } else if ("throw-exception".equals(uri)) { throw new DeploymentManagerCreationException("Simulated Exception"); } else { return new MockDeploymentManager(); } } public String getDisplayName() { return null; } public String getProductVersion() { return null; } }
1,569
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/test/java/javax/enterprise/deploy/model/XPathEventTest.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.model; import junit.framework.TestCase; /** * @version $Rev$ $Date$ */ public class XPathEventTest extends TestCase { public void testIsAddEvent() { XpathEvent addEvent = new XpathEvent(null, XpathEvent.BEAN_ADDED); assertTrue(addEvent.isAddEvent()); assertFalse(addEvent.isChangeEvent()); assertFalse(addEvent.isRemoveEvent()); } public void testIsChangeEvent() { XpathEvent changeEvent = new XpathEvent(null, XpathEvent.BEAN_CHANGED); assertTrue(changeEvent.isChangeEvent()); assertFalse(changeEvent.isAddEvent()); assertFalse(changeEvent.isRemoveEvent()); } public void testIsRemoveEvent() { XpathEvent removeEvent = new XpathEvent(null, XpathEvent.BEAN_REMOVED); assertTrue(removeEvent.isRemoveEvent()); assertFalse(removeEvent.isAddEvent()); assertFalse(removeEvent.isChangeEvent()); } }
1,570
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/ActionType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; /** * Class ActionTypes defines enumeration values for the J2EE DeploymentStatus * actions. * * @version $Rev$ $Date$ */ public class ActionType { /** * The action is currently executing. */ public static final ActionType EXECUTE = new ActionType(0); /** * The action has been canceled. */ public static final ActionType CANCEL = new ActionType(1); /** * A stop operation is being performed on the DeploymentManager action command. */ public static final ActionType STOP = new ActionType(2); private static final ActionType[] enumValueTable = new ActionType[]{ EXECUTE, CANCEL, STOP, }; private static final String[] stringTable = new String[]{ "execute", "cancel", "stop", }; private int value; /** * Construct a new enumeration value with the given integer value. */ protected ActionType(int value) { this.value = value; } /** * Returns this enumeration value's integer value. * * @return the value */ public int getValue() { return value; } /** * Returns the string table for class ActionType */ protected String[] getStringTable() { return stringTable; } /** * Returns the enumeration value table for class ActionType */ protected ActionType[] getEnumValueTable() { return enumValueTable; } /** * Return an object of the specified value. * * @param value a designator for the object. */ public static ActionType getActionType(int value) { return enumValueTable[value]; } /** * Return the string name of this ActionType or the integer value if * outside the bounds of the table */ public String toString() { return (value >= 0 && value <= 2) ? stringTable[value] : String.valueOf(value); } /** * Returns the lowest integer value used by this enumeration value's * enumeration class. * * @return the offset of the lowest enumeration value. */ protected int getOffset() { return 0; } }
1,571
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/StateType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; /** * Defines enumeration values for the various states of a deployment action. * * @version $Rev$ $Date$ */ public class StateType { /** * The action operation is running normally. */ public static final StateType RUNNING = new StateType(0); /** * The action operation has completed normally. */ public static final StateType COMPLETED = new StateType(1); /** * The action operation has failed. */ public static final StateType FAILED = new StateType(2); /** * The DeploymentManager is running in disconnected mode. */ public static final StateType RELEASED = new StateType(3); private static final StateType[] enumValueTable = { RUNNING, COMPLETED, FAILED, RELEASED, }; private static final String[] stringTable = { "running", "completed", "failed", "released", }; private int value; /** * Construct a new enumeration value with the given integer value. */ protected StateType(int value) { this.value = value; } /** * Returns this enumeration value's integer value. */ public int getValue() { return value; } /** * Returns the string table for class StateType */ protected String[] getStringTable() { return stringTable; } /** * Returns the enumeration value table for class StateType */ protected StateType[] getEnumValueTable() { return enumValueTable; } /** * Return an object of the specified value. * * @param value a designator for the object. */ public static StateType getStateType(int value) { return enumValueTable[value]; } /** * Return the string name of this StateType or the integer value if * outside the bounds of the table */ public String toString() { return (value >= 0 && value <= 3) ? stringTable[value] : String.valueOf(value); } /** * Returns the lowest integer value used by this enumeration value's * enumeration class. * * @return the offset of the lowest enumeration value. */ protected int getOffset() { return 0; } }
1,572
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/ModuleType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; /** * Class ModuleTypes defines enumeration values for the J2EE module types. * * @version $Rev$ $Date$ */ public class ModuleType { /** * The module is an EAR archive. */ public static final ModuleType EAR = new ModuleType(0); /** * The module is an Enterprise Java Bean archive. */ public static final ModuleType EJB = new ModuleType(1); /** * The module is an Client Application archive. */ public static final ModuleType CAR = new ModuleType(2); /** * The module is an Connector archive. */ public static final ModuleType RAR = new ModuleType(3); /** * The module is an Web Application archive. */ public static final ModuleType WAR = new ModuleType(4); private static final ModuleType[] enumValueTable = { EAR, EJB, CAR, RAR, WAR, }; private static final String[] stringTable = { "ear", "ejb", "car", "rar", "war", }; private static final String[] moduleExtensionTable = { ".ear", ".jar", ".jar", ".rar", ".war", }; private int value; /** * Construct a new enumeration value with the given integer value. */ protected ModuleType(int value) { this.value = value; } /** * Returns this enumeration value's integer value. */ public int getValue() { return value; } /** * Returns the string table for class ModuleType */ protected String[] getStringTable() { return stringTable; } /** * Returns the enumeration value table for class ModuleType */ protected ModuleType[] getEnumValueTable() { return enumValueTable; } /** * Return the file extension string for this enumeration. */ public String getModuleExtension() { return moduleExtensionTable[value]; } /** * Return an object of the specified value. * * @param value a designator for the object. */ public static ModuleType getModuleType(int value) { return enumValueTable[value]; } /** * Return the string name of this ModuleType or the integer value if * outside the bounds of the table */ public String toString() { return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value); } /** * Returns the lowest integer value used by this enumeration value's * enumeration class. * * @return the offset of the lowest enumeration value. */ protected int getOffset() { return 0; } }
1,573
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/CommandType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; /** * Defines enumerated values for the available deployment commands. * * @version $Rev$ $Date$ */ public class CommandType { /** * The DeploymentManger action operation being processed is distribute. */ public static final CommandType DISTRIBUTE = new CommandType(0); /** * The DeploymentManger action operation being processed is start. */ public static final CommandType START = new CommandType(1); /** * The DeploymentManger action operation being processed is stop. */ public static final CommandType STOP = new CommandType(2); /** * The DeploymentManger action operation being processed is undeploy. */ public static final CommandType UNDEPLOY = new CommandType(3); /** * he DeploymentManger action operation being processed is redeploy. */ public static final CommandType REDEPLOY = new CommandType(4); private static final CommandType[] enumValueTable = new CommandType[]{ DISTRIBUTE, START, STOP, UNDEPLOY, REDEPLOY, }; private static final String[] stringTable = new String[]{ "distribute", "start", "stop", "undeploy", "redeploy", }; private int value; /** * Construct a new enumeration value with the given integer value. */ protected CommandType(int value) { this.value = value; } /** * Returns this enumeration value's integer value. */ public int getValue() { return value; } /** * Returns the string table for class CommandType */ protected String[] getStringTable() { return stringTable; } /** * Returns the enumeration value table for class CommandType */ protected CommandType[] getEnumValueTable() { return enumValueTable; } /** * Return an object of the specified value. * * @param value a designator for the object. */ public static CommandType getCommandType(int value) { return enumValueTable[value]; } /** * Return the string name of this CommandType or the integer value if * outside the bounds of the table */ public String toString() { return (value >= 0 && value <= 4) ? stringTable[value] : String.valueOf(value); } /** * Returns the lowest integer value used by this enumeration value's * enumeration class. * * @return the offset of the lowest enumeration value. */ protected int getOffset() { return 0; } }
1,574
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/DConfigBeanVersionType.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared; /** * Class DConfigBeanVersionTypes defines enumeration values for the J2EE * Platform verion number. * * @version $Rev$ $Date$ */ public class DConfigBeanVersionType { /** * J2EE Platform version 1.3 */ public static final DConfigBeanVersionType V1_3 = new DConfigBeanVersionType(0); /** * J2EE Platform version 1.3.1 */ public static final DConfigBeanVersionType V1_3_1 = new DConfigBeanVersionType(1); /** * J2EE Platform version 1.4 */ public static final DConfigBeanVersionType V1_4 = new DConfigBeanVersionType(2); private static final DConfigBeanVersionType[] enumValueTable = { V1_3, V1_3_1, V1_4, }; private static final String[] stringTable = { "V1_3", "V1_3_1", "V1_4", }; private int value; /** * Construct a new enumeration value with the given integer value. */ protected DConfigBeanVersionType(int value) { this.value = value; } /** * Returns this enumeration value's integer value. */ public int getValue() { return value; } /** * Returns the string table for class DConfigBeanVersionType */ protected String[] getStringTable() { return stringTable; } /** * Returns the enumeration value table for class DConfigBeanVersionType */ protected DConfigBeanVersionType[] getEnumValueTable() { return enumValueTable; } /** * Return an object of the specified value. * * @param value a designator for the object. */ public static DConfigBeanVersionType getDConfigBeanVersionType(int value) { return enumValueTable[value]; } /** * Return the string name of this DConfigBeanVersionType or the integer * value if outside the bounds of the table */ public String toString() { return (value >= 0 && value <= 2) ? getStringTable()[value] : String.valueOf(value); } /** * Returns the lowest integer value used by this enumeration value's * enumeration class. * * @return the offset of the lowest enumeration value. */ protected int getOffset() { return 0; } }
1,575
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/shared/factories/DeploymentFactoryManager.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.shared.factories; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.DeploymentManager; import javax.enterprise.deploy.spi.factories.DeploymentFactory; import java.util.Iterator; import java.util.ArrayList; /** * The DeploymentFactoryManager class is a central registry for J2EE * DeploymentFactory objects. The DeploymentFactoryManager retains references * to DeploymentFactory objects loaded by a tool. A DeploymentFactory object * provides a reference to a DeploymentManager. The DeploymentFactoryManager * has been implemented as a singleton. A tool gets a reference to the * DeploymentFactoryManager via the getInstance method. The * DeploymentFactoryManager can return two types of DeploymentManagers, a * connected DeploymentManager and a disconnected DeploymentManager. The * connected DeploymentManager provides access to any product resources that * may be required for configurations and deployment. The method to retrieve a * connected DeploymentManager is getDeploymentManager. This method provides * parameters for user name and password that the product may require for user * authentication. A disconnected DeploymentManager does not provide access to * a running J2EE product. The method to retrieve a disconnected * DeploymentManager is getDisconnectedDeploymentManager. A disconnected * DeploymentManager does not need user authentication information. * * @version $Rev$ $Date$ */ public final class DeploymentFactoryManager { private static DeploymentFactoryManager instance; private ArrayList deploymentFactories = new ArrayList(); private DeploymentFactoryManager() { } /** * Retrieve the Singleton DeploymentFactoryManager * * @return DeploymentFactoryManager instance */ public static DeploymentFactoryManager getInstance() { if(instance == null) { instance = new DeploymentFactoryManager(); } return instance; } /** * Retrieve the lists of currently registered DeploymentFactories. * * @return the list of DeploymentFactory objects or an empty array if there are none. */ public DeploymentFactory[] getDeploymentFactories() { return (DeploymentFactory[])deploymentFactories.toArray(new DeploymentFactory[deploymentFactories.size()]); } /** * Retrieves a DeploymentManager instance to use for deployment. The caller * provides a URI and optional username and password, and all registered * DeploymentFactories will be checked. The first one to understand the URI * provided will attempt to initiate a server connection and return a ready * DeploymentManager instance. * * @param uri The uri to check * @param username An optional username (may be <tt>null</tt> if no * authentication is required for this platform). * @param password An optional password (may be <tt>null</tt> if no * authentication is required for this platform). * * @return A ready DeploymentManager instance. * * @throws DeploymentManagerCreationException Occurs when the factory * appropriate to the specified URI was unable to initialize a * DeploymentManager instance (server down, unable to authenticate, * etc.). */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException { if(uri == null) { throw new IllegalArgumentException("URI for DeploymentManager should not be null"); } DeploymentManager manager = null; for(Iterator i = deploymentFactories.iterator(); i.hasNext();) { DeploymentFactory factory = (DeploymentFactory)i.next(); if(factory.handlesURI(uri)) { manager = factory.getDeploymentManager(uri, username, password); if(manager != null) { return manager; } } } throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI"); } /** * Return a disconnected DeploymentManager instance. * * @param uri identifier of the disconnected DeploymentManager to return. * * @return A DeploymentManager instance. * * @throws DeploymentManagerCreationException occurs if the * DeploymentManager could not be created. */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException { if(uri == null) { throw new IllegalArgumentException("URI for DeploymentManager should not be null"); } DeploymentManager manager = null; for(Iterator i = deploymentFactories.iterator(); i.hasNext();) { DeploymentFactory factory = (DeploymentFactory)i.next(); if(factory.handlesURI(uri)) { manager = factory.getDisconnectedDeploymentManager(uri); if(manager != null) { return manager; } } } throw new DeploymentManagerCreationException("Could not get DeploymentManager; No registered DeploymentFactory handles this URI"); } /** * Registers a DeploymentFactory so it will be able to handle requests. */ public void registerDeploymentFactory(DeploymentFactory factory) { if(factory == null) { throw new IllegalArgumentException("DeploymentFactory to register should not be null"); } if(!deploymentFactories.contains(factory)) { deploymentFactories.add(factory); } } }
1,576
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/DConfigBeanRoot.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; import javax.enterprise.deploy.model.DDBeanRoot; /** * The DConfigBeanRoot interface represent the root of a deployment descriptor. * A DConfigBeanRoot is associated with a DDRoot object which in turn is associated * with a specific deployment descriptor file. * * <p>Only DConfigBeanRoots are saved or restored by methods in * DeploymentConfiguration.</p> * * @see DeploymentConfiguration * * @version $Rev$ $Date$ */ public interface DConfigBeanRoot extends DConfigBean { /** * Return a DConfigBean for a deployment descriptor that is not the module's * primary deployment descriptor. Web services provides a deployment descriptor * in addition to the module's primary deployment descriptor. Only the DDBeanRoot * for this category of secondary deployment descriptors are to be passed as arguments * through this method. * * Web service has two deployment descriptor files, one that defines the web service * and one that defines a client of a web service. See the Web Service specification for * the details. * * @since 1.1 * * @param ddBeanRoot represents the root element of a deployment descriptor file. * * @return a DConfigBean to be used for processing this deployment descriptor data. Null may be returned * if no DConfigBean is required for this deployment descriptor. */ public DConfigBean getDConfigBean(DDBeanRoot ddBeanRoot); }
1,577
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentConfiguration.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; import javax.enterprise.deploy.model.DeployableObject; import javax.enterprise.deploy.model.DDBeanRoot; import javax.enterprise.deploy.spi.exceptions.ConfigurationException; import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException; import java.io.OutputStream; import java.io.InputStream; /** * An interface that defines a container for all the server-specific configuration * information for a single top-level J2EE module. The DeploymentConfiguration * object could represent a single stand alone module or an EAR file that contains * several sub-modules. * * @version $Rev$ $Date$ */ public interface DeploymentConfiguration { /** * Returns an object that provides access to the deployment descriptor data * and classes of a J2EE module. * * @return A DeployableObject */ public DeployableObject getDeployableObject(); /** * Returns the top level configuration bean, DConfigBeanRoot, associated with * the deployment descriptor represented by the designated DDBeanRoot bean. * * @param bean The top level bean that represents the associated deployment descriptor. * * @return the DConfigBeanRoot for editing the server-specific properties required by the module. * * @throws ConfigurationException reports errors in generating a configuration bean */ public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException; /** * Remove the root DConfigBean and all its children. * * @param bean the top leve DConfigBean to remove. * * @throws BeanNotFoundException the bean provided is not in this beans child list. */ public void removeDConfigBean(DConfigBeanRoot bean) throws BeanNotFoundException; /** * Restore from disk to instantated objects all the DConfigBeans associated with a * specific deployment descriptor. The beans may be fully or partially configured. * * @param inputArchive The input stream for the file from which the DConfigBeans * should be restored. * @param bean The DDBeanRoot bean associated with the deployment descriptor file. * * @return The top most parent configuration bean, DConfigBeanRoot * * @throws ConfigurationException reports errors in generating a configuration bean */ public DConfigBeanRoot restoreDConfigBean(InputStream inputArchive, DDBeanRoot bean) throws ConfigurationException; /** * Save to disk all the configuration beans associated with a particular deployment * descriptor file. The saved data may be fully or partially configured DConfigBeans. * The output file format is recommended to be XML. * * @param outputArchive The output stream to which the DConfigBeans should be saved. * @param bean The top level bean, DConfigBeanRoot, from which to be save. * * @throws ConfigurationException reports errors in storing a configuration bean */ public void saveDConfigBean(OutputStream outputArchive, DConfigBeanRoot bean) throws ConfigurationException; /** * Restore from disk to a full set of configuration beans previously stored. * * @param inputArchive The input stream from which to restore the Configuration. * * @throws ConfigurationException reports errors in generating a configuration bean */ public void restore(InputStream inputArchive) throws ConfigurationException; /** * Save to disk the current set configuration beans created for this deployable * module. It is recommended the file format be XML. * * @param outputArchive The output stream to which to save the Configuration. * * @throws ConfigurationException reports errors in storing a configuration bean */ public void save(OutputStream outputArchive) throws ConfigurationException; }
1,578
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/DConfigBean.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; import javax.enterprise.deploy.model.DDBean; import javax.enterprise.deploy.model.XpathEvent; import javax.enterprise.deploy.spi.exceptions.ConfigurationException; import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException; import java.beans.PropertyChangeListener; /** * The interface for configuring a server-specific deployment descriptor, or subset of same. * A DConfigBean corresponds to a specific location in a standard deployment descriptor, * typically where values (such as names and roles) are used. * * <p>There are three different ways that DConfigBeans are created:</p> * * <ul> * <li><code>DeploymentConfigurator.getDConfigBean(DDBeanRoot)</code> is called by the * deployment tool to create a DConfigBeanRoot for each deployment descriptor in * the J2EE application.</li> * <li><code>DConfigBean.getDConfigBean(DDBean)</code> is called by the deployment * tool for each DDBean that corresponds to a relative XPath pattern given to the * deployment tool by the method <code>DConfigBean.getXpaths()</code>.</li> * <li>Each DConfigBean can structure its configurations as a tree-structure of * DConfigBeans; a DConfigBean can have properties of type DConfigBean or * DConfigBean[].</li> * <ul> * * <p>The properties of DConfigBeans are displayed and edited by the deployment tool by * using the JavaBean Property classes.</p> * * @version $Rev$ $Date$ */ public interface DConfigBean { /** * Return the JavaBean containing the deployment descriptor XML text associated with this DConfigBean. * * @return The bean class containing the XML text for this DConfigBean. */ public DDBean getDDBean(); /** * Return a list of XPaths designating the deployment descriptor information this * DConfigBean requires. Each server vendor may need to specify different * server-specific information. Each String returned by this method is an XPath * describing a certain portion of the standard deployment descriptor for which * there is corresponding server-specific configuration. * * @return a list of XPath Strings representing XML data to be retrieved or * <code>null</code> if there are none. */ public String[] getXpaths(); /** * Return the JavaBean containing the server-specific deployment configuration * information based upon the XML data provided by the DDBean. * * @param bean The DDBean containing the XML data to be evaluated. * * @return The DConfigBean to display the server-specific properties for the standard bean. * * @throws ConfigurationException reports errors in generating a configuration bean. * This DDBean is considered undeployable to this server until this exception is * resolved. A suitably descriptive message is required so the user can diagnose * the error. */ public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException; /** * Remove a child DConfigBean from this bean. * * @param bean The child DConfigBean to be removed. * * @throws BeanNotFoundException the bean provided is not in the child list of this bean. */ public void removeDConfigBean(DConfigBean bean) throws BeanNotFoundException; /** * A notification that the DDBean provided in the event has changed and this bean * or its child beans need to reevaluate themselves. * * <p><i>It is advisable, though not declared explicitly in the specification, for a * DConfigBean to receive change events for itself, and add or remove events for * its direct children. The DConfigBean implementation should not add or remove * beans here if it will add or remove those beans again in response to a call to * getDConfigBean or removeDConfigBean.</i></p> * * @see #getDConfigBean * @see #removeDConfigBean * * @param event an event containing a reference to the DDBean which has changed. */ public void notifyDDChange(XpathEvent event); /** * Register a property listener for this bean. * * @param pcl PropertyChangeListener to add */ public void addPropertyChangeListener(PropertyChangeListener pcl); /** * Unregister a property listener for this bean. * * @param pcl Listener to remove. */ public void removePropertyChangeListener(PropertyChangeListener pcl); }
1,579
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/Target.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; /** * A Target interface represents a single logical core server of one instance of a * J2EE platform product. It is a designator for a server and the implied location * to copy a configured application for the server to access. * * @version $Rev$ $Date$ */ public interface Target { /** * Retrieve the name of the target server. */ public String getName(); /** * Retrieve other descriptive information about the target. */ public String getDescription(); }
1,580
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/DeploymentManager.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; import javax.enterprise.deploy.spi.exceptions.DConfigBeanVersionUnsupportedException; import javax.enterprise.deploy.spi.exceptions.TargetException; import javax.enterprise.deploy.spi.exceptions.InvalidModuleException; import javax.enterprise.deploy.spi.status.ProgressObject; import javax.enterprise.deploy.shared.DConfigBeanVersionType; import javax.enterprise.deploy.shared.ModuleType; import javax.enterprise.deploy.model.DeployableObject; import java.io.File; import java.io.InputStream; import java.util.Locale; /** * The DeploymentManager object provides the core set of functions a J2EE platform * must provide for J2EE application deployment. It provides server related * information, such as, a list of deployment targets, and vendor unique runtime * configuration information. * * @version $Rev$ $Date$ */ public interface DeploymentManager { /** * Retrieve the list of deployment targets supported by this DeploymentManager. * * @return A list of deployment Target designators the user may select for * application deployment or <code>null</code> if there are none. * * @throws IllegalStateException is thrown when the method is called when * running in disconnected mode. */ public Target[] getTargets() throws IllegalStateException; /** * Retrieve the list of J2EE application modules distributed to the identified * targets and that are currently running on the associated server or servers. * * @param moduleType A predefined designator for a J2EE module type. * @param targetList A list of deployment Target designators the user wants * checked for module run status. * * @return An array of TargetModuleID objects representing the running modules * or <code>null</code> if there are none. * * @throws TargetException occurs when an invalid Target was provided. * @throws IllegalStateException is thrown when the method is called when running * in disconnected mode. */ public TargetModuleID[] getRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the list of J2EE application modules distributed to the identified * targets and that are currently not running on the associated server or servers. * * @param moduleType A predefined designator for a J2EE module type. * @param targetList A list of deployment Target designators the user wants checked * for module not running status. * * @return An array of TargetModuleID objects representing the non-running modules * or <code>null</code> if there are none. * * @throws TargetException occurs when an invalid Target was provided. * @throws IllegalStateException is thrown when the method is called when running * in disconnected mode. */ public TargetModuleID[] getNonRunningModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the list of all J2EE application modules running or not running on the * identified targets. * * @param moduleType A predefined designator for a J2EE module type. * @param targetList A list of deployment Target designators the user wants checked * for module not running status. * * @return An array of TargetModuleID objects representing all deployed modules * running or not or <code>null</code> if there are no deployed modules. * * @throws TargetException occurs when an invalid Target was provided. * @throws IllegalStateException is thrown when the method is called when running * in disconnected mode. */ public TargetModuleID[] getAvailableModules(ModuleType moduleType, Target[] targetList) throws TargetException, IllegalStateException; /** * Retrieve the object that provides server-specific deployment configuration * information for the J2EE deployable component. * * @param dObj An object representing a J2EE deployable component. * * @return An object used to configure server-specific deployment information * * @throws InvalidModuleException The DeployableObject is an unknown or unsupported * component for this configuration tool. */ public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException; /** * The distribute method performs three tasks; it validates the deployment * configuration data, generates all container specific classes and interfaces, * and moves the fully baked archive to the designated deployment targets. * * @param targetList A list of server targets the user is specifying this application * should be deployed to. * @param moduleArchive The file name of the application archive to be distributed. * @param deploymentPlan The file containing the runtime configuration information * associated with this application archive. * * @return an object that tracks and reports the status of the distribution process. * * @throws IllegalStateException is thrown when the method is called when running in disconnected mode. */ public ProgressObject distribute(Target[] targetList, File moduleArchive, File deploymentPlan) throws IllegalStateException; /** * The distribute method performs three tasks; it validates the deployment * configuration data, generates all container specific classes and interfaces, * and moves the fully baked archive to the designated deployment targets. * * @param targetList A list of server targets the user is specifying this application * should be deployed to. * @param moduleArchive The stream containing the application archive to be distributed. * @param deploymentPlan The stream containing the runtime configuration information * associated with this application archive. * * @return an object that tracks and reports the status of the distribution process. * * @throws IllegalStateException is thrown when the method is called when running in disconnected mode. */ public ProgressObject distribute(Target[] targetList, InputStream moduleArchive, InputStream deploymentPlan) throws IllegalStateException; /** * Start the application running. * * <p>Only the TargetModuleIDs which represent a root module are valid for being * started. A root TargetModuleID has no parent. A TargetModuleID with a parent * can not be individually started. A root TargetModuleID module and all its * child modules will be started.</p> * * @param moduleIDList An array of TargetModuleID objects representing the modules to be started. * * @return An object that tracks and reports the status of the start operation. * * @throws IllegalStateException is thrown when the method is called when running in disconnected mode. */ public ProgressObject start(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * Stop the application running. * * <p>Only the TargetModuleIDs which represent a root module are valid for * being stopped. A root TargetModuleID has no parent. A TargetModuleID * with a parent can not be individually stopped. A root TargetModuleID * module and all its child modules will be stopped.</p> * * @param moduleIDList An array of TargetModuleID objects representing the modules to be stopped. * * @return An object that tracks and reports the status of the stop operation. * * @throws IllegalStateException is thrown when the method is called when running in disconnected mode. */ public ProgressObject stop(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * Remove the application from the target server. * * <p>Only the TargetModuleIDs which represent a root module are valid for * undeployment. A root TargetModuleID has no parent. A TargetModuleID with * a parent can not be undeployed. A root TargetModuleID module and all its * child modules will be undeployed. The root TargetModuleID module and all * its child modules must stopped before they can be undeployed. * * @param moduleIDList An array of TargetModuleID objects representing the root * modules to be undeployed. * * @return An object that tracks and reports the status of the stop operation. * * @throws IllegalStateException is thrown when the method is called when running in disconnected mode. */ public ProgressObject undeploy(TargetModuleID[] moduleIDList) throws IllegalStateException; /** * This method designates whether this platform vendor provides application * redeployment functionality. A value of true means it is supported. False * means it is not. * * @return A value of true means redeployment is supported by this vendor's * DeploymentManager. False means it is not. */ public boolean isRedeploySupported(); /** * (optional) The redeploy method provides a means for updating currently * deployed J2EE applications. This is an optional method for vendor * implementation. Redeploy replaces a currently deployed application with an * updated version. The runtime configuration information for the updated * application must remain identical to the application it is updating. When * an application update is redeployed, all existing client connections to the * original running application must not be disrupted; new clients will connect * to the application update. This operation is valid for TargetModuleIDs that * represent a root module. A root TargetModuleID has no parent. A root * TargetModuleID module and all its child modules will be redeployed. A child * TargetModuleID module cannot be individually redeployed. The redeploy * operation is complete only when this action for all the modules has completed. * * @param moduleIDList An array of designators of the applications to be updated. * @param moduleArchive The file name of the application archive to be redeployed. * @param deploymentPlan The deployment configuration information associated with * this application archive. * * @return An object that tracks and reports the status of the redeploy operation. * * @throws UnsupportedOperationException this optional command is not supported by * this implementation. * @throws IllegalStateException is thrown when the method is called when running * in disconnected mode. */ public ProgressObject redeploy(TargetModuleID[] moduleIDList, File moduleArchive, File deploymentPlan) throws UnsupportedOperationException, IllegalStateException; /** * (optional) The redeploy method provides a means for updating currently * deployed J2EE applications. This is an optional method for vendor * implementation. Redeploy replaces a currently deployed application with an * updated version. The runtime configuration information for the updated * application must remain identical to the application it is updating. When * an application update is redeployed, all existing client connections to the * original running application must not be disrupted; new clients will connect * to the application update. This operation is valid for TargetModuleIDs that * represent a root module. A root TargetModuleID has no parent. A root * TargetModuleID module and all its child modules will be redeployed. A child * TargetModuleID module cannot be individually redeployed. The redeploy * operation is complete only when this action for all the modules has completed. * * @param moduleIDList An array of designators of the applications to be updated. * @param moduleArchive The stream containing the application archive to be redeployed. * @param deploymentPlan The streeam containing the deployment configuration information * associated with this application archive. * * @return An object that tracks and reports the status of the redeploy operation. * * @throws UnsupportedOperationException this optional command is not supported by * this implementation. * @throws IllegalStateException is thrown when the method is called when running * in disconnected mode. */ public ProgressObject redeploy(TargetModuleID[] moduleIDList, InputStream moduleArchive, InputStream deploymentPlan) throws UnsupportedOperationException, IllegalStateException; /** * The release method is the mechanism by which the tool signals to the * DeploymentManager that the tool does not need it to continue running * connected to the platform. The tool may be signaling it wants to run in a * disconnected mode or it is planning to shutdown. When release is called the * DeploymentManager may close any J2EE resource connections it had for * deployment configuration and perform other related resource cleanup. It * should not accept any new operation requests (i.e., distribute, start, stop, * undeploy, redeploy. It should finish any operations that are currently in * process. Each ProgressObject associated with a running operation should be * marked as released (see the ProgressObject). */ public void release(); /** * Returns the default locale supported by this implementation of * javax.enterprise.deploy.spi subpackages. * * @return the default locale for this implementation. */ public Locale getDefaultLocale(); /** * Returns the active locale this implementation of * javax.enterprise.deploy.spi subpackages is running. * * @return the active locale of this implementation. */ public Locale getCurrentLocale(); /** * Set the active locale for this implementation of * javax.enterprise.deploy.spi subpackages to run. * * @param locale the locale to set * * @throws UnsupportedOperationException the provide locale is not supported. */ public void setLocale(Locale locale) throws UnsupportedOperationException; /** * Returns an array of supported locales for this implementation. * * @return the list of supported locales. */ public Locale[] getSupportedLocales(); /** * Reports if this implementation supports the designated locale. * * @param locale the locale to check * * @return A value of <code>true</code> means it is supported and <code>false</code> it is not. */ public boolean isLocaleSupported(Locale locale); /** * Returns the J2EE platform version number for which the configuration * beans are provided. The beans must have been compiled with the J2SE * version required by the J2EE platform. * * @return a DConfigBeanVersionType object representing the platform * version number for which these beans are provided. */ public DConfigBeanVersionType getDConfigBeanVersion(); /** * Returns <code>true</code> if the configuration beans support the J2EE platform * version specified. It returns <code>false</code> if the version is not supported. * * @param version a DConfigBeanVersionType object representing the J2EE * platform version for which support is requested. * * @return <code>true</code> if the version is supported and 'false if not. */ public boolean isDConfigBeanVersionSupported(DConfigBeanVersionType version); /** * Set the configuration beans to be used to the J2EE platform version specified. * * @param version a DConfigBeanVersionType object representing the J2EE * platform version for which support is requested. * * @throws DConfigBeanVersionUnsupportedException when the requested bean * version is not supported. */ public void setDConfigBeanVersion(DConfigBeanVersionType version) throws DConfigBeanVersionUnsupportedException; }
1,581
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/TargetModuleID.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi; /** * A TargetModuleID interface represents a unique identifier for a deployed * application module. A deployable application module can be an EAR, JAR, WAR or * RAR file. A TargetModuleID can represent a root module or a child module. A * root module TargetModuleID has no parent. It represents a deployed EAR file or * standalone module. A child module TargetModuleID represents a deployed sub * module of a J2EE application. A child TargetModuleID has only one parent, the * super module it was bundled and deployed with. The identifier consists of the * target name and the unique identifier for the deployed application module. * * @version $Rev$ $Date$ */ public interface TargetModuleID { /** * Retrieve the target server that this module was deployed to. * * @return an object representing a server target. */ public Target getTarget(); /** * Retrieve the id assigned to represent the deployed module. */ public String getModuleID(); /** * If this TargetModulID represents a web module retrieve the URL for it. * * @return the URL of a web module or null if the module is not a web module. */ public String getWebURL(); /** * Retrieve the identifier representing the deployed module. */ public String toString(); /** * Retrieve the identifier of the parent object of this deployed module. If * there is no parent then this is the root object deployed. The root could * represent an EAR file or it could be a stand alone module that was deployed. * * @return the TargetModuleID of the parent of this object. A <code>null</code> * value means this module is the root object deployed. */ public TargetModuleID getParentTargetModuleID(); /** * Retrieve a list of identifiers of the children of this deployed module. * * @return a list of TargetModuleIDs identifying the childern of this object. * A <code>null</code> value means this module has no children */ public TargetModuleID[] getChildTargetModuleID(); }
1,582
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressListener.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.status; import java.util.EventListener; /** * The listener interface for receiving deployment progress events. * * @version $Rev$ $Date$ */ public interface ProgressListener extends EventListener { /** * Invoked when a deployment progress event occurs. * * @param event the progress event. */ public void handleProgressEvent(ProgressEvent event); }
1,583
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/status/ClientConfiguration.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.spi.exceptions.ClientExecuteException; import java.io.Serializable; /** * The ClientConfiguration object installs, configures and executes an * Application Client. This class resolves the settings for installing and * running the application client. * * @version $Rev$ $Date$ */ public interface ClientConfiguration extends Serializable { /** * This method performs an exec and starts the application client running * in another process. * * @throws ClientExecuteException when the configuration is incomplete. */ public void execute() throws ClientExecuteException; }
1,584
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/status/DeploymentStatus.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.shared.CommandType; import javax.enterprise.deploy.shared.StateType; import javax.enterprise.deploy.shared.ActionType; /** * The DeploymentStatus interface provides information about the progress of a * deployment action. * * @version $Rev$ $Date$ */ public interface DeploymentStatus { /** * Retrieve the StateType value. * * @return the StateType object */ public StateType getState(); /** * Retrieve the deployment CommandType of this event. * * @return the CommandType Object */ public CommandType getCommand(); /** * Retrieve the deployment ActionType for this event. * * @return the ActionType Object */ public ActionType getAction(); /** * Retrieve any additional information about the status of this event. * * @return message text */ public String getMessage(); /** * A convience method to report if the operation is in the completed state. * * @return <tt>true</tt> if this command has completed successfully */ public boolean isCompleted(); /** * A convience method to report if the operation is in the failed state. * * @return <tt>true</tt> if this command has failed */ public boolean isFailed(); /** * A convience method to report if the operation is in the running state. * * @return <tt>true</tt> if this command is still running */ public boolean isRunning(); }
1,585
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressEvent.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.spi.TargetModuleID; import java.util.EventObject; /** * An event which indicates that a deployment status change has occurred. * * @see ProgressObject * @see ProgressListener * * @version $Rev$ $Date$ */ public class ProgressEvent extends EventObject { private TargetModuleID targetModuleID; private DeploymentStatus deploymentStatus; /** * Creates a new object representing a deployment progress event. * * @param source the object on which the Event initially occurred. * @param targetModuleID the combination of target and module for which the * event occured. * @param sCode the object containing the status information. */ public ProgressEvent(Object source, TargetModuleID targetModuleID, DeploymentStatus sCode) { super(source); this.targetModuleID = targetModuleID; this.deploymentStatus = sCode; } /** * Retrieves the TargetModuleID for this event. * * @return the TargetModuleID */ public TargetModuleID getTargetModuleID() { return targetModuleID; } /** * Retrieves the status information for this event. * * @return the object containing the status information. */ public DeploymentStatus getDeploymentStatus() { return deploymentStatus; } }
1,586
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/status/ProgressObject.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.status; import javax.enterprise.deploy.spi.TargetModuleID; import javax.enterprise.deploy.spi.exceptions.OperationUnsupportedException; /** * The ProgressObject interface tracks and reports the progress of the * deployment activities: distribute, start, stop, undeploy. * * This class has an <i>optional</i> cancel method. The support of the cancel * function can be tested by the isCancelSupported method. * * The ProgressObject structure allows the user the option of polling for * status or to provide a callback. * * @version $Rev$ $Date$ */ public interface ProgressObject { /** * Retrieve the status of this activity. * * @return An object containing the status information. */ public DeploymentStatus getDeploymentStatus(); /** * Retrieve the list of TargetModuleIDs successfully processed or created * by the associated DeploymentManager operation. * * @return a list of TargetModuleIDs. */ public TargetModuleID[] getResultTargetModuleIDs(); /** * Return the ClientConfiguration object associated with the * TargetModuleID. * * @return ClientConfiguration for a given TargetModuleID or <tt>null</tt> * if none exists. */ public ClientConfiguration getClientConfiguration(TargetModuleID id); /** * Tests whether the vendor supports a cancel operation for this * deployment action. * * @return <tt>true</tt> if this platform allows this action to be * canceled. */ public boolean isCancelSupported(); /** * (optional) A cancel request on an in-process operation stops all further * processing of the operation and returns the environment to it original * state before the operation was executed. An operation that has run to * completion cannot be cancelled. * * @throws OperationUnsupportedException occurs when this optional command * is not supported by this implementation. */ public void cancel() throws OperationUnsupportedException; /** * Tests whether the vendor supports a stop operation for the deployment * action. * * @return <tt>true</tt> if this platform allows this action to be * stopped. */ public boolean isStopSupported(); /** * (optional) A stop request on an in-process operation allows the * operation on the current TargetModuleID to run to completion but does * not process any of the remaining unprocessed TargetModuleID objects. * The processed TargetModuleIDs must be returned by the method * getResultTargetModuleIDs. * * @throws OperationUnsupportedException occurs when this optional command * is not supported by this implementation. */ public void stop() throws OperationUnsupportedException; /** * Add a listener to receive progress events on deployment actions. * * @param pol the listener to receive events */ public void addProgressListener(ProgressListener pol); /** * Remove a progress listener. * * @param pol the listener to remove */ public void removeProgressListener(ProgressListener pol); }
1,587
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/ConfigurationException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception reports errors in generating a configuration bean. * * @version $Rev$ $Date$ */ public class ConfigurationException extends Exception { /** * Creates new <tt>ConfigurationException</tt> without a detail message. */ public ConfigurationException() { super(); } /** * Constructs a <tt>ConfigurationException</tt> with the specified detail * message. * * @param msg the detail message. */ public ConfigurationException(String msg) { super(msg); } public ConfigurationException(Throwable cause) { super(cause); } public ConfigurationException(String message, Throwable cause) { super(message, cause); } }
1,588
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/InvalidModuleException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report an invalid J2EE deployment module type. * * @version $Rev$ $Date$ */ public class InvalidModuleException extends Exception { /** * Creates a new InvalidModuleException. * * @param s a string indicating what was wrong with the module type. */ public InvalidModuleException(String s) { super(s); } }
1,589
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/TargetException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report bad target designators. Likely causes include: * the server has been reconfigured since the target was originally provided, * or the tools is forging targets instead of using the ones provided by the * DeploymentManager. * * @version $Rev$ $Date$ */ public class TargetException extends Exception { /** * Creates a new TargetException. * * @param s a string indicating what was wrong with the target. */ public TargetException(String s) { super(s); } }
1,590
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/DeploymentManagerCreationException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report problems in returning a DeploymentManager object * caused by such things as server down, unable to authenticate and the like. * * @version $Rev$ $Date$ */ public class DeploymentManagerCreationException extends Exception { /** * Creates a new DeploymentManagerCreationException. * * @param s a string providing more information about the problem. */ public DeploymentManagerCreationException(String s) { super(s); } }
1,591
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/BeanNotFoundException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report that the bean is not a child of the parent bean. * * @version $Rev$ $Date$ */ public class BeanNotFoundException extends Exception { /** * Creates an new BeanNotFoundException object. * * @param s a string indicating what was wrong with the target. */ public BeanNotFoundException(String s) { super(s); } }
1,592
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/DConfigBeanVersionUnsupportedException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report that there is no support for the DConfigBean * version requested. * * @version $Rev$ $Date$ */ public class DConfigBeanVersionUnsupportedException extends Exception { /** * Creates a new DConfigBeanVersionUnsupportedException. */ public DConfigBeanVersionUnsupportedException(String s) { super(s); } }
1,593
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/OperationUnsupportedException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception is to report that the method called is not supported by this * implementation. * * @version $Rev$ $Date$ */ public class OperationUnsupportedException extends Exception { /** * Creates a new OperationUnsupportedException. * * @param s a string giving more information about the unsupported * operation. */ public OperationUnsupportedException(String s) { super(s); } }
1,594
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/exceptions/ClientExecuteException.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.exceptions; /** * This exception reports errors in setting up an application client for * execution. * * @version $Rev$ $Date$ */ public class ClientExecuteException extends Exception { /** * Creates new <tt>ClientExecuteException</tt> without a detail message. */ public ClientExecuteException() { super(); } /** * Constructs a <tt>ClientExecuteException</tt> with the specified detail * message. * * @param msg the detail message. */ public ClientExecuteException(String msg) { super(msg); } }
1,595
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/spi/factories/DeploymentFactory.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.spi.factories; import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException; import javax.enterprise.deploy.spi.DeploymentManager; /** * The DeploymentFactory interface is a deployment driver for a J2EE plaform * product. It returns a DeploymentManager object which represents a * connection to a specific J2EE platform product. * * Each application server vendor must provide an implementation of this class * in order for the J2EE Deployment API to work with their product. * * The class implementing this interface should have a public no-argument * constructor, and it should be stateless (two instances of the class should * always behave the same). It is suggested but not required that the class * have a static initializer that registers an instance of the class with the * DeploymentFactoryManager class. * * A <tt>connected</tt> or <tt>disconnected</tt> DeploymentManager can be * requested. A DeploymentManager that runs connected to the platform can * provide access to J2EE resources. A DeploymentManager that runs * disconnected only provides module deployment configuration support. * * @see javax.enterprise.deploy.shared.factories.DeploymentFactoryManager * * @version $Rev$ $Date$ */ public interface DeploymentFactory { /** * Tests whether this factory can create a DeploymentManager object based * on the specified URI. This does not indicate whether such an attempt * will be successful, only whether the factory can handle the uri. * * @param uri The uri to check * * @return <tt>true</tt> if the factory can handle the uri. */ public boolean handlesURI(String uri); /** * Returns a <tt>connected</tt> DeploymentManager instance. * * @param uri The URI that specifies the connection parameters * @param username An optional username (may be <tt>null</tt> if no * authentication is required for this platform). * @param password An optional password (may be <tt>null</tt> if no * authentication is required for this platform). * * @return A ready DeploymentManager instance. * * @throws DeploymentManagerCreationException occurs when a * DeploymentManager could not be returned (server down, unable * to authenticate, etc). */ public DeploymentManager getDeploymentManager(String uri, String username, String password) throws DeploymentManagerCreationException; /** * Returns a <tt>disconnected</tt> DeploymentManager instance. * * @param uri the uri of the DeploymentManager to return. * * @return A DeploymentManager <tt>disconnected</tt> instance. * * @throws DeploymentManagerCreationException occurs if the * DeploymentManager could not be created. */ public DeploymentManager getDisconnectedDeploymentManager(String uri) throws DeploymentManagerCreationException; /** * Provide a string with the name of this vendor's DeploymentManager. * * @return the name of the vendor's DeploymentManager. */ public String getDisplayName(); /** * Provides a string identifying the version of this vendor's * DeploymentManager. * * @return the name of the vendor's DeploymentManager. */ public String getProductVersion(); }
1,596
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/model/XpathListener.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.model; /** * The listener interface for receiving XpathEvents * * @version $Rev$ $Date$ */ public interface XpathListener { /** * Invoked when an XpathEvent is generated for this listener * * @param xpe The XpathEvent */ public void fireXpathEvent(XpathEvent xpe); }
1,597
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/model/XpathEvent.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.model; import java.beans.PropertyChangeEvent; /** * An Event class describing DDBeans being added to or removed from a J2EE * application, or updated in place. * * @version $Rev$ $Date$ */ public class XpathEvent { /** * Adding a DDBean */ public static final Object BEAN_ADDED = new Object(); /** * Removing a DDBean */ public static final Object BEAN_REMOVED = new Object(); /** * Changing a DDBean */ public static final Object BEAN_CHANGED = new Object(); private PropertyChangeEvent pce; private DDBean bean; private Object type; /** * A description of a change in the DDBean tree. * * @param bean The DDBean being added, removed, or updated. * @param type Indicates whether this is an add, remove, or update event. */ public XpathEvent(DDBean bean, Object type) { this.bean = bean; this.type = type; } /** * Gets the underlying property change event, with new and * old values. This is typically used for change events. * It is not in the public API, but is included in the * downloadable JSR-88 classes. */ public PropertyChangeEvent getChangeEvent() { return pce; } /** * Sets the underlying property change event, with new and * old values. This is typically used for change events. * It is not in the public API, but is included in the * downloadable JSR-88 classes. * * @param pce The property change event that triggered this XpathEvent. */ public void setChangeEvent(PropertyChangeEvent pce) { this.pce = pce; } /** * The bean being added/removed/changed. * * @return The bean being added/removed/changed. */ public DDBean getBean() { return bean; } /** * Is this an add event? * * @return <code>true</code> if this is an add event. */ public boolean isAddEvent() { return BEAN_ADDED == type; } /** * Is this a remove event? * * @return <code>true</code> if this is a remove event. */ public boolean isRemoveEvent() { return BEAN_REMOVED == type; } /** * Is this a change event? * * @return <code>true</code> if this is a change event. */ public boolean isChangeEvent() { return BEAN_CHANGED == type; } }
1,598
0
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy
Create_ds/geronimo-specs/geronimo-j2ee-deployment_1.1_spec/src/main/java/javax/enterprise/deploy/model/J2eeApplicationObject.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. */ // // This source code implements specifications defined by the Java // Community Process. In order to remain compliant with the specification // DO NOT add / change / or delete method signatures! // package javax.enterprise.deploy.model; import javax.enterprise.deploy.shared.ModuleType; /** * J2eeApplicationObject is an interface that represents a J2EE application (EAR); * it maintains a DeployableObject for each module in the archive. * * @version $Rev$ $Date$ */ public interface J2eeApplicationObject extends DeployableObject { /** * Return the DeployableObject of the specified URI designator. * * @param uri Describes where to get the module from. * * @return the DeployableObject describing the j2ee module at this uri * or <code>null</code> if there is not match. */ public DeployableObject getDeployableObject(String uri); /** * Return the all DeployableObjects of the specified type. * * @param type The type of module to return. * * @return the list of DeployableObjects describing the j2ee modules of * this type or <code>null</code> if there are no matches. */ public DeployableObject[] getDeployableObjects(ModuleType type); /** * Return the all DeployableObjects in this application. * * @return the DeployableObject instances describing the j2ee modules in * this application or <code>null</code> if there are none available. */ public DeployableObject[] getDeployableObjects(); /** * Return the list of URIs of the designated module type. * * @param type The type of module to return. * * @return the Uris of the contained modules or <code>null</code> if there * are no matches. */ public String[] getModuleUris(ModuleType type); /** * Return the list of URIs for all modules in the application. * * @return the Uris of the contained modules or <code>null</code> if * the application is completely empty. */ public String[] getModuleUris(); /** * Return a list of DDBean instances based upon an XPath; all deployment * descriptors of the specified type are searched. * * @param type The type of deployment descriptor to query. * @param xpath An XPath string referring to a location in the deployment descriptor * * @return The list of DDBeans or <code>null</code> if there are no matches. */ public DDBean[] getChildBean(ModuleType type, String xpath); /** * Return the text value from the XPath; search only the deployment descriptors * of the specified type. * * @param type The type of deployment descriptor to query. * @param xpath The xpath to query for. * * @return The text values of this xpath or <code>null</code> if there are no matches. */ public String[] getText(ModuleType type, String xpath); /** * Register a listener for changes in XPath that are related to this deployableObject. * * @param type The type of deployment descriptor to query. * @param xpath The xpath to listen for. * @param xpl The listener. */ public void addXpathListener(ModuleType type, String xpath, XpathListener xpl); /** * Unregister the listener for an XPath. * @param type The type of deployment descriptor to query. * @param xpath The xpath to listen for. * @param xpl The listener. */ public void removeXpathListener(ModuleType type, String xpath, XpathListener xpl); }
1,599