View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  package javax.jdo.metadata;
    18
    19  /**
    20   * Represents a fetch plan for a class.
    21   * @since 3.0
    22   */
    23  public interface FetchPlanMetadata extends Metadata {
    24      /**
    25       * Accessor for the fetch plan name (set on construction).
    26       *
    27       * @return The fetch plan name
    28       */
    29      String getName();
    30
    31      /**
    32       * Method to set the max fetch depth for this plan.
    33       *
    34       * @param depth The max fetch depth
    35       */
    36      FetchPlanMetadata setMaxFetchDepth(int depth);
    37
    38      /**
    39       * Accessor for the max fetch depth.
    40       *
    41       * @return The max fetch depth
    42       */
    43      int getMaxFetchDepth();
    44
    45      /**
    46       * Method to set the fetch size.
    47       *
    48       * @param size The fetch size
    49       */
    50      FetchPlanMetadata setFetchSize(int size);
    51
    52      /**
    53       * Accessor for the max fetch depth.
    54       *
    55       * @return The max fetch depth
    56       */
    57      int getFetchSize();
    58
    59      /**
    60       * Accessor for all fetch groups defined for this fetch plan.
    61       *
    62       * @return The fetch groups
    63       */
    64      FetchGroupMetadata[] getFetchGroups();
    65
    66      /**
    67       * Add a new fetch group for this fetch plan.
    68       *
    69       * @param name Name of fetch group.
    70       * @return The FetchGroupMetadata
    71       */
    72      FetchGroupMetadata newFetchGroupMetadata(String name);
    73
    74      /**
    75       * Accessor for the number of fetch groups defined for this fetch plan.
    76       *
    77       * @return The number of fetch groups
    78       */
    79      int getNumberOfFetchGroups();
    80  }