Index: api2/src/java/javax/jdo/FetchGroup.java =================================================================== --- api2/src/java/javax/jdo/FetchGroup.java (revision 0) +++ api2/src/java/javax/jdo/FetchGroup.java (revision 0) @@ -0,0 +1,154 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * FetchGroup.java + * + */ + +package javax.jdo; + +import java.util.Set; + +/** + * Fetch groups are updated using methods on this interface. An + * instance of this interface can be obtained from {@link + * PersistenceManager#getFetchGroup}. When a FetchGroup + * is created, it is immediately in scope of its + * PersistenceManager. + * Subsequent modifications of the FetchGroup also + * immediately affect FetchPlans that contain the + * FetchGroup. + * @version 2.2 + * @since 2.2 + */ +public interface FetchGroup { + + /** + * For use with {@link #addCategory} and {@link #removeCategory} calls. + * This category includes members defined in the default fetch group. + * @since 2.2 + */ + public static final String DEFAULT = "default"; + + /** + * For use with {@link #addCategory} and {@link #removeCategory} calls. + * This category includes members of all relationship types. + * @since 2.2 + */ + public static final String RELATIONSHIP = "relationship"; + + /** + * For use with {@link #addCategory} and {@link #removeCategory} calls. + * This category includes members of all multi-valued types, including + * Collection, array, and Map types. + * @since 2.2 + */ + public static final String MULTIVALUED = "multivalued"; + + /** + * For use with {@link #addCategory} and {@link #removeCategory} calls. + * This category includes members of all basic (primitive and wrapper) + * types as well as String, Date (and jdbc subtypes), Locale, + * and Enum types. + * @since 2.2 + */ + public static final String BASIC = "basic"; + + /** + * For use with {@link #addCategory} and {@link #removeCategory} calls. + * This category includes all members in the class. + * @since 2.2 + */ + public static final String ALL = "all"; + + /** + * Get the name of this FetchGroup. The name is set only in the + * factory method. + * @return the name + * @since 2.2 + */ + String getName(); + + /** + * Get the class of this FetchGroup. The class is set + * only in the factory method. + * @return the name of the class + * @since 2.2 + */ + Class getReferencedClass(); + + /** + * Get the post-load property of this FetchGroup. + * @return the post-load property + * @since 2.2 + */ + boolean getPostLoad(); + + /** + * Set the post-load property of this FetchGroup. + * @since 2.2 + */ + void setPostLoad(boolean postLoad); + + /** + * Add the member (field or property) to the set of members in this + * FetchGroup. + * @return the FetchGroup + * @throws JDOUserException if the parameter is not a member of the + * persistent type + * @since 2.2 + */ + FetchGroup addMember(String memberName); + + /** + * Remove the fetch group from the set active fetch groups. + * @return the FetchGroup + * @throws JDOUserException if the parameter is not a member of the + * persistent type + * @since 2.2 + */ + FetchGroup removeMember(String memberName); + + /** + * Add the members (fields or properties) of the named category + * to the set of members in this FetchGroup. + * @return the FetchGroup + * @since 2.2 + */ + FetchGroup addCategory(String categoryName); + + /** + * Remove the members (fields or properties) of the named category + * from the set of members in this FetchGroup. + * @return the FetchGroup + * @since 2.2 + */ + FetchGroup removeCategory(String categoryName); + + /** + * Return an immutable Set containing the names of all members. + * The Set is a copy of the currently defined members and will not change + * based on subsequent changes to the members. + * @return an immutable Set containing the names of all members + * in the FetchGroup + * @since 2.2 + */ + Set getMembers(); + +} + Property changes on: api2/src/java/javax/jdo/FetchGroup.java ___________________________________________________________________ Name: svn:eol-style + LF