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  import javax.jdo.annotations.SequenceStrategy;
    20
    21  /**
    22   * Represents a sequence.
    23   * @since 3.0
    24   */
    25  public interface SequenceMetadata extends Metadata {
    26      /**
    27       * Accessor for the name of the sequence (set on construction).
    28       *
    29       * @return The name
    30       */
    31      String getName();
    32
    33      /**
    34       * Accessor for the sequence strategy (set on construction).
    35       *
    36       * @return Sequence strategy
    37       */
    38      SequenceStrategy getSequenceStrategy();
    39
    40      /**
    41       * Method to set the name of the datastore sequence that this maps to.
    42       *
    43       * @param seq Datastore sequence name
    44       */
    45      SequenceMetadata setDatastoreSequence(String seq);
    46
    47      /**
    48       * Accessor for the name of the datastore sequence that this maps to
    49       *
    50       * @return The datastore sequence name
    51       */
    52      String getDatastoreSequence();
    53
    54      /**
    55       * Method to set the result class name for the query
    56       *
    57       * @param clsName Result class name
    58       */
    59      SequenceMetadata setFactoryClass(String clsName);
    60
    61      /**
    62       * Accessor for the factory class for this sequence.
    63       *
    64       * @return The factory class
    65       */
    66      String getFactoryClass();
    67  }